ACPICA: Namespace: Add support of OSDT table
authorBob Moore <robert.moore@intel.com>
Wed, 1 Jul 2015 06:44:23 +0000 (14:44 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 1 Jul 2015 21:17:54 +0000 (23:17 +0200)
ACPICA commit 27415c82fcecf467446f66d1007a0691cc5f3709

This patch adds OSDT (Override System Definition Table) support.
When OSDT is loaded, conflict namespace objects will be overridden
by the AML interpreter. Bob Moore, Lv Zheng.

Link: https://github.com/acpica/acpica/commit/27415c82
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/nsparse.c
drivers/acpi/acpica/tbxfload.c
drivers/acpi/acpica/utmisc.c
include/acpi/actbl.h

index c95a119767b56fad8569b31d904c42edb643361f..57a4cfe547e4921d09cd41c1a2005cd769b22f83 100644 (file)
@@ -117,6 +117,13 @@ acpi_ns_one_complete_parse(u32 pass_number,
                                               (u8) pass_number);
        }
 
+       /* Found OSDT table, enable the namespace override feature */
+
+       if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT) &&
+           pass_number == ACPI_IMODE_LOAD_PASS1) {
+               walk_state->namespace_override = TRUE;
+       }
+
        if (ACPI_FAILURE(status)) {
                acpi_ds_delete_walk_state(walk_state);
                goto cleanup;
index b63e35d6d1bf8d711340227d0644a9e1f760ed40..960bd999a6b31bce99377ffbde0e2d75a1303e49 100644 (file)
@@ -173,7 +173,11 @@ static acpi_status acpi_tb_load_namespace(void)
                     &&
                     !ACPI_COMPARE_NAME(&
                                        (acpi_gbl_root_table_list.tables[i].
-                                        signature), ACPI_SIG_PSDT))
+                                        signature), ACPI_SIG_PSDT)
+                    &&
+                    !ACPI_COMPARE_NAME(&
+                                       (acpi_gbl_root_table_list.tables[i].
+                                        signature), ACPI_SIG_OSDT))
                    ||
                    ACPI_FAILURE(acpi_tb_validate_table
                                 (&acpi_gbl_root_table_list.tables[i]))) {
index cbb7034d28d89d10944096ed8359caa5b6274b94..28099e23000824c92f13f02b57d6aa2094e45baf 100644 (file)
@@ -97,7 +97,8 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
 
        if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) ||
            ACPI_COMPARE_NAME(table->signature, ACPI_SIG_PSDT) ||
-           ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT)) {
+           ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT) ||
+           ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT)) {
                return (TRUE);
        }
 
index cb8a6b97cedae07b239fbc5eb671e1ddfe6d38ea..2d5faf508cadfd159a5b1213bc2bc16d66ae5535 100644 (file)
@@ -65,6 +65,7 @@
 #define ACPI_SIG_DSDT           "DSDT" /* Differentiated System Description Table */
 #define ACPI_SIG_FADT           "FACP" /* Fixed ACPI Description Table */
 #define ACPI_SIG_FACS           "FACS" /* Firmware ACPI Control Structure */
+#define ACPI_SIG_OSDT           "OSDT" /* Override System Description Table */
 #define ACPI_SIG_PSDT           "PSDT" /* Persistent System Description Table */
 #define ACPI_SIG_RSDP           "RSD PTR "     /* Root System Description Pointer */
 #define ACPI_SIG_RSDT           "RSDT" /* Root System Description Table */