diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:46:13 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:46:13 +0200 |
commit | 8d89651ef729e560ad96dcfc002fcde6ff7f923b (patch) | |
tree | eb5be01c25f735d12fe9881ee6327c9b7e8bbe39 /meta-linaro-integration/recipes-overlayed/fwts/files/0002-ACPI-add-the-hardware-reduced-mode-check-function-in.patch | |
download | meta-linaro-dizzy-enea.tar.gz |
initial commit for Enea Linux 5.0 armdizzy-enea
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-linaro-integration/recipes-overlayed/fwts/files/0002-ACPI-add-the-hardware-reduced-mode-check-function-in.patch')
-rw-r--r-- | meta-linaro-integration/recipes-overlayed/fwts/files/0002-ACPI-add-the-hardware-reduced-mode-check-function-in.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-linaro-integration/recipes-overlayed/fwts/files/0002-ACPI-add-the-hardware-reduced-mode-check-function-in.patch b/meta-linaro-integration/recipes-overlayed/fwts/files/0002-ACPI-add-the-hardware-reduced-mode-check-function-in.patch new file mode 100644 index 0000000..0e0805b --- /dev/null +++ b/meta-linaro-integration/recipes-overlayed/fwts/files/0002-ACPI-add-the-hardware-reduced-mode-check-function-in.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From ff40052c103ed67677b9c4a17cdcee62ca8f6aed Mon Sep 17 00:00:00 2001 | ||
2 | From: Fu Wei <fu.wei@linaro.org> | ||
3 | Date: Tue, 25 Nov 2014 17:12:24 +0800 | ||
4 | Subject: [PATCH 2/3] ACPI: add the hardware reduced mode check function in | ||
5 | src/lib/src/fwts_acpi_tables.c. | ||
6 | |||
7 | It is a prerequisite for ignoring a missing FACS table in hardware-reduced mode. | ||
8 | |||
9 | Upstream-status: Accepted [14.12.00] | ||
10 | Signed-off-by: Fu Wei <fu.wei@linaro.org> | ||
11 | --- | ||
12 | src/lib/include/fwts_acpi.h | 1 + | ||
13 | src/lib/include/fwts_acpi_tables.h | 2 ++ | ||
14 | src/lib/src/fwts_acpi_tables.c | 14 ++++++++++++++ | ||
15 | 3 files changed, 17 insertions(+) | ||
16 | |||
17 | diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h | ||
18 | index 24ebc84..73a3461 100644 | ||
19 | --- a/src/lib/include/fwts_acpi.h | ||
20 | +++ b/src/lib/include/fwts_acpi.h | ||
21 | @@ -46,6 +46,7 @@ extern const char *fwts_acpi_fadt_preferred_pm_profile[]; | ||
22 | |||
23 | #define FWTS_ACPI_FADT_PREFERRED_PM_PROFILE(x) \ | ||
24 | ((x) > 8) ? "Reserved" : fwts_acpi_fadt_preferred_pm_profile[x] | ||
25 | +#define FWTS_ACPI_FADT_FLAGS_HW_REDUCED_ACPI (1<<20) | ||
26 | |||
27 | /* 5.2.3.1 Generic Address Structure */ | ||
28 | typedef struct { | ||
29 | diff --git a/src/lib/include/fwts_acpi_tables.h b/src/lib/include/fwts_acpi_tables.h | ||
30 | index 6977e87..798dfc5 100644 | ||
31 | --- a/src/lib/include/fwts_acpi_tables.h | ||
32 | +++ b/src/lib/include/fwts_acpi_tables.h | ||
33 | @@ -45,4 +45,6 @@ int fwts_acpi_find_table_by_addr(fwts_framework *fw, const uint64_t addr, fwts_a | ||
34 | int fwts_acpi_get_table(fwts_framework *fw, const int index, fwts_acpi_table_info **info); | ||
35 | uint8_t fwts_acpi_checksum(const uint8_t *data, const int length); | ||
36 | |||
37 | +fwts_bool fwts_acpi_is_reduced_hardware(const fwts_acpi_table_fadt *fadt); | ||
38 | + | ||
39 | #endif | ||
40 | diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c | ||
41 | index 96a117e..7f73a10 100644 | ||
42 | --- a/src/lib/src/fwts_acpi_tables.c | ||
43 | +++ b/src/lib/src/fwts_acpi_tables.c | ||
44 | @@ -275,6 +275,20 @@ int fwts_acpi_free_tables(void) | ||
45 | } | ||
46 | |||
47 | /* | ||
48 | + * fwts_acpi_is_reduced_hardware() | ||
49 | + * Check the ACPI tables for HW_REDUCED_ACPI bit in flag field. | ||
50 | + */ | ||
51 | +fwts_bool fwts_acpi_is_reduced_hardware(const fwts_acpi_table_fadt *fadt) | ||
52 | +{ | ||
53 | + if ((fadt->header.revision >= 5) && | ||
54 | + (fadt->header.length >= 116)&& | ||
55 | + (fadt->flags && FWTS_ACPI_FADT_FLAGS_HW_REDUCED_ACPI)) { | ||
56 | + return FWTS_TRUE; | ||
57 | + } | ||
58 | + return FWTS_FALSE; | ||
59 | +} | ||
60 | + | ||
61 | +/* | ||
62 | * fwts_acpi_handle_fadt_tables() | ||
63 | * depending on whether 32 or 64 bit address is usable, get the table | ||
64 | * address and load it. This handles the DSDT and FACS as pointed to | ||
65 | -- | ||
66 | 2.1.1 | ||
67 | |||