OSDN Git Service

ACPICA: disassembler: disassemble OEMx tables as AML
authorErik Schmauss <erik.schmauss@intel.com>
Thu, 13 Dec 2018 20:30:32 +0000 (12:30 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 13 Dec 2018 21:40:51 +0000 (22:40 +0100)
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/utmisc.c
include/acpi/actbl.h
include/acpi/actypes.h

index ed73d79..afaadc7 100644 (file)
@@ -62,7 +62,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_OSDT)) {
+           ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT) ||
+           ACPI_IS_OEM_SIG(table->signature)) {
                return (TRUE);
        }
 
index 517addd..0a977ec 100644 (file)
@@ -38,6 +38,7 @@
 #define ACPI_SIG_XSDT           "XSDT" /* Extended  System Description Table */
 #define ACPI_SIG_SSDT           "SSDT" /* Secondary System Description Table */
 #define ACPI_RSDP_NAME          "RSDP" /* Short name for RSDP, not signature */
+#define ACPI_OEM_NAME           "OEM"  /* Short name for OEM, not signature */
 
 /*
  * All tables and structures must be byte-packed to match the ACPI
index 91ff73e..2590627 100644 (file)
@@ -527,6 +527,10 @@ typedef u64 acpi_integer;
 #define ACPI_VALIDATE_RSDP_SIG(a)       (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8))
 #define ACPI_MAKE_RSDP_SIG(dest)        (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8))
 
+/* Support for OEMx signature (x can be any character) */
+#define ACPI_IS_OEM_SIG(a)        (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\
+        strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE)
+
 /*
  * Algorithm to obtain access bit width.
  * Can be used with access_width of struct acpi_generic_address and access_size of