diff options
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/dttemplate.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/dttemplate.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.c b/sys/contrib/dev/acpica/compiler/dttemplate.c index 90b6b17..07e930f 100644 --- a/sys/contrib/dev/acpica/compiler/dttemplate.c +++ b/sys/contrib/dev/acpica/compiler/dttemplate.c @@ -85,6 +85,7 @@ AcpiUtIsSpecialTable ( { if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT) || + ACPI_COMPARE_NAME (Signature, ACPI_SIG_OSDT) || ACPI_COMPARE_NAME (Signature, ACPI_SIG_SSDT) || ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS) || ACPI_COMPARE_NAME (Signature, ACPI_RSDP_NAME)) @@ -127,8 +128,8 @@ DtCreateTemplates ( } AcpiUtStrupr (Signature); - if (!ACPI_STRCMP (Signature, "ALL") || - !ACPI_STRCMP (Signature, "*")) + if (!strcmp (Signature, "ALL") || + !strcmp (Signature, "*")) { /* Create all available/known templates */ @@ -327,7 +328,7 @@ DtCreateOneTemplate ( AcpiOsPrintf ("/*\n"); AcpiOsPrintf (ACPI_COMMON_HEADER ("iASL Compiler/Disassembler", " * ")); - AcpiOsPrintf (" * Template for [%4.4s] ACPI Table\n", + AcpiOsPrintf (" * Template for [%4.4s] ACPI Table", Signature); /* Dump the actual ACPI table */ @@ -336,6 +337,8 @@ DtCreateOneTemplate ( { /* Normal case, tables that appear in AcpiDmTableData */ + AcpiOsPrintf (" (static data table)\n"); + if (Gbl_VerboseTemplates) { AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength]" @@ -344,7 +347,7 @@ DtCreateOneTemplate ( else { AcpiOsPrintf (" * Format: [ByteLength]" - " FieldName : HexFieldValue\n */\n\n"); + " FieldName : HexFieldValue\n */\n"); } AcpiDmDumpDataTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER, @@ -352,9 +355,11 @@ DtCreateOneTemplate ( } else { - /* Special ACPI tables - DSDT, SSDT, FADT, RSDP */ + /* Special ACPI tables - DSDT, SSDT, OSDT, FADT, RSDP */ + + AcpiOsPrintf (" (AML byte code table)\n"); - AcpiOsPrintf (" */\n\n"); + AcpiOsPrintf (" */\n"); if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT)) { Actual = fwrite (TemplateDsdt, 1, sizeof (TemplateDsdt) -1, File); @@ -377,6 +382,17 @@ DtCreateOneTemplate ( goto Cleanup; } } + else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_OSDT)) + { + Actual = fwrite (TemplateOsdt, 1, sizeof (TemplateOsdt) -1, File); + if (Actual != sizeof (TemplateOsdt) -1) + { + fprintf (stderr, + "Could not write to output file %s\n", DisasmFilename); + Status = AE_ERROR; + goto Cleanup; + } + } else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS)) /* FADT */ { AcpiDmDumpDataTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER, |