summaryrefslogtreecommitdiffstats
path: root/meta-linaro-integration/recipes-overlayed/fwts/files/0002-ACPI-add-the-hardware-reduced-mode-check-function-in.patch
diff options
context:
space:
mode:
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.patch67
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 @@
1From ff40052c103ed67677b9c4a17cdcee62ca8f6aed Mon Sep 17 00:00:00 2001
2From: Fu Wei <fu.wei@linaro.org>
3Date: Tue, 25 Nov 2014 17:12:24 +0800
4Subject: [PATCH 2/3] ACPI: add the hardware reduced mode check function in
5 src/lib/src/fwts_acpi_tables.c.
6
7It is a prerequisite for ignoring a missing FACS table in hardware-reduced mode.
8
9Upstream-status: Accepted [14.12.00]
10Signed-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
17diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
18index 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 {
29diff --git a/src/lib/include/fwts_acpi_tables.h b/src/lib/include/fwts_acpi_tables.h
30index 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
40diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
41index 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--
662.1.1
67