diff options
author | Robert Moore <Robert.Moore@intel.com> | 2021-05-19 08:14:00 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2021-05-19 08:14:00 -0700 |
commit | 81eb9c383e6dee0f1b6620e91e5c3dbb48234831 (patch) | |
tree | e4fff5c821a4bc3b629c793654718ba11fc0bf10 | |
parent | 16f4f94a683252db5cec66cba8a334b6e7c79e71 (diff) | |
download | acpica-81eb9c383e6dee0f1b6620e91e5c3dbb48234831.tar.gz |
iASL: Add support for the BDAT ACPI table
Includes: Table compiler, disassembler, and template generator.
-rw-r--r-- | source/common/ahtable.c | 1 | ||||
-rw-r--r-- | source/common/dmtable.c | 1 | ||||
-rw-r--r-- | source/common/dmtbinfo1.c | 13 | ||||
-rw-r--r-- | source/compiler/aslmessages.c | 3 | ||||
-rw-r--r-- | source/compiler/aslmessages.h | 3 | ||||
-rw-r--r-- | source/compiler/dtcompiler.h | 1 | ||||
-rw-r--r-- | source/compiler/dtfield.c | 4 | ||||
-rw-r--r-- | source/compiler/dttemplate.h | 10 | ||||
-rw-r--r-- | source/include/acdisasm.h | 1 | ||||
-rw-r--r-- | source/include/actbinfo.h | 1 | ||||
-rw-r--r-- | source/include/actbl2.h | 18 | ||||
-rw-r--r-- | source/tools/acpisrc/astable.c | 1 |
12 files changed, 53 insertions, 4 deletions
diff --git a/source/common/ahtable.c b/source/common/ahtable.c index c7810e3b6..374b4b12a 100644 --- a/source/common/ahtable.c +++ b/source/common/ahtable.c @@ -200,6 +200,7 @@ AcpiAhGetTableInfo ( const AH_TABLE AcpiGbl_SupportedTables[] = { {ACPI_SIG_ASF, "Alert Standard Format Table"}, + {ACPI_SIG_BDAT, "BIOS Data ACPI Table"}, {ACPI_SIG_BERT, "Boot Error Record Table"}, {ACPI_SIG_BGRT, "Boot Graphics Resource Table"}, {ACPI_SIG_BOOT, "Simple Boot Flag Table"}, diff --git a/source/common/dmtable.c b/source/common/dmtable.c index b8314db3e..856c17012 100644 --- a/source/common/dmtable.c +++ b/source/common/dmtable.c @@ -532,6 +532,7 @@ static const char *AcpiDmGasAccessWidth[] = const ACPI_DMTABLE_DATA AcpiDmTableData[] = { {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf}, + {ACPI_SIG_BDAT, AcpiDmTableInfoBdat, NULL, NULL, TemplateBdat}, {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert}, {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt}, {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot}, diff --git a/source/common/dmtbinfo1.c b/source/common/dmtbinfo1.c index ea545f53a..fbf3980de 100644 --- a/source/common/dmtbinfo1.c +++ b/source/common/dmtbinfo1.c @@ -297,6 +297,19 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[] = /******************************************************************************* * + * BDAT - BIOS Data ACPI Table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoBdat[] = +{ + {ACPI_DMT_GAS, ACPI_BDAT_OFFSET (Gas), "BDAT Generic Address", 0}, + ACPI_DMT_TERMINATOR +}; + + +/******************************************************************************* + * * BERT - Boot Error Record table * ******************************************************************************/ diff --git a/source/compiler/aslmessages.c b/source/compiler/aslmessages.c index 438ccaf9c..889850e81 100644 --- a/source/compiler/aslmessages.c +++ b/source/compiler/aslmessages.c @@ -400,7 +400,7 @@ const char *AslTableCompilerMsgs [] = /* ASL_MSG_INVALID_FIELD_NAME */ "Invalid Field Name", /* ASL_MSG_INVALID_HEX_INTEGER */ "Invalid hex integer constant", /* ASL_MSG_OEM_TABLE */ "OEM table - unknown contents", -/* ASL_MSG_RESERVED_VALUE */ "Reserved field", +/* ASL_MSG_RESERVED_FIELD */ "Reserved field", /* ASL_MSG_UNKNOWN_LABEL */ "Label is undefined", /* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type", /* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature", @@ -409,6 +409,7 @@ const char *AslTableCompilerMsgs [] = /* ASL_MSG_BUFFER_LIST */ "Invalid buffer initializer list", /* ASL_MSG_ENTRY_LIST */ "Invalid entry initializer list", /* ASL_MSG_UNKNOWN_FORMAT */ "Unknown format value" +/* ASL_MSG_RESERVED_VALUE */ "Value for field is reserved or unknown", }; /* Preprocessor */ diff --git a/source/compiler/aslmessages.h b/source/compiler/aslmessages.h index 00cdee8cc..69c2561ba 100644 --- a/source/compiler/aslmessages.h +++ b/source/compiler/aslmessages.h @@ -402,7 +402,7 @@ typedef enum ASL_MSG_INVALID_FIELD_NAME, ASL_MSG_INVALID_HEX_INTEGER, ASL_MSG_OEM_TABLE, - ASL_MSG_RESERVED_VALUE, + ASL_MSG_RESERVED_FIELD, ASL_MSG_UNKNOWN_LABEL, ASL_MSG_UNKNOWN_SUBTABLE, ASL_MSG_UNKNOWN_TABLE, @@ -411,6 +411,7 @@ typedef enum ASL_MSG_BUFFER_LIST, ASL_MSG_ENTRY_LIST, ASL_MSG_UNKNOWN_FORMAT, + ASL_MSG_RESERVED_VALUE, /* These messages are used by the Preprocessor only */ diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h index 116ca020d..810d7327b 100644 --- a/source/compiler/dtcompiler.h +++ b/source/compiler/dtcompiler.h @@ -751,6 +751,7 @@ DtGetGenericTableInfo ( extern const unsigned char TemplateAsf[]; extern const unsigned char TemplateBoot[]; +extern const unsigned char TemplateBdat[]; extern const unsigned char TemplateBert[]; extern const unsigned char TemplateBgrt[]; extern const unsigned char TemplateCedt[]; diff --git a/source/compiler/dtfield.c b/source/compiler/dtfield.c index ee7788e3b..729791d7a 100644 --- a/source/compiler/dtfield.c +++ b/source/compiler/dtfield.c @@ -434,14 +434,14 @@ DtCompileInteger ( { if (Value != 1) { - DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field, + DtError (ASL_WARNING, ASL_MSG_RESERVED_FIELD, Field, "Must be one, setting to one"); Value = 1; } } else if (Value != 0) { - DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field, + DtError (ASL_WARNING, ASL_MSG_RESERVED_FIELD, Field, "Must be zero, setting to zero"); Value = 0; } diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h index 516d4dd9f..db1de0872 100644 --- a/source/compiler/dttemplate.h +++ b/source/compiler/dttemplate.h @@ -174,6 +174,16 @@ const unsigned char TemplateAsf[] = 0x01,0x00 /* 00000070 ".." */ }; +const unsigned char TemplateBdat[] = +{ + 0x42,0x44,0x41,0x54,0x30,0x00,0x00,0x00, /* 00000000 "BDAT0..." */ + 0x01,0xED,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ + 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */ + 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x31,0x03,0x21,0x20,0x01,0x08,0x00,0x01, /* 00000020 "1.! ...." */ + 0xF0,0xDE,0xBC,0x9A,0x78,0x56,0x34,0x12 /* 00000028 "....xV4." */ +}; + const unsigned char TemplateBgrt[] = { 0x42,0x47,0x52,0x54,0x38,0x00,0x00,0x00, /* 00000000 "BGRT8..." */ diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index 12acfcc89..e9e20a31a 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -368,6 +368,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf2a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf3[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoBdat[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[]; diff --git a/source/include/actbinfo.h b/source/include/actbinfo.h index 622961d85..844cc2de5 100644 --- a/source/include/actbinfo.h +++ b/source/include/actbinfo.h @@ -156,6 +156,7 @@ #define ACPI_GAS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f) #define ACPI_HDR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEADER,f) #define ACPI_RSDP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RSDP,f) +#define ACPI_BDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BDAT,f) #define ACPI_BERT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f) #define ACPI_BGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f) #define ACPI_BOOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f) diff --git a/source/include/actbl2.h b/source/include/actbl2.h index bba780b94..13f81bbc3 100644 --- a/source/include/actbl2.h +++ b/source/include/actbl2.h @@ -168,6 +168,7 @@ * file. Useful because they make it more difficult to inadvertently type in * the wrong signature. */ +#define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */ #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ @@ -213,6 +214,23 @@ /******************************************************************************* * + * BDAT - BIOS Data ACPI Table + * + * Conforms to "BIOS Data ACPI Table", Interface Specification v4.0 Draft 5 + * Nov 2020 + * + ******************************************************************************/ + +typedef struct acpi_table_bdat +{ + ACPI_TABLE_HEADER Header; + ACPI_GENERIC_ADDRESS Gas; + +} ACPI_TABLE_BDAT; + + +/******************************************************************************* + * * IORT - IO Remapping Table * * Conforms to "IO Remapping Table System Software on ARM Platforms", diff --git a/source/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c index 92c4b347d..1f0446499 100644 --- a/source/tools/acpisrc/astable.c +++ b/source/tools/acpisrc/astable.c @@ -640,6 +640,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { * Acpi table definition names. */ {"ACPI_TABLE_ASF", SRC_TYPE_STRUCT}, + {"ACPI_TABLE_BDAT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_BERT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_BGRT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_BOOT", SRC_TYPE_STRUCT}, |