diff options
-rw-r--r-- | source/common/ahtable.c | 1 | ||||
-rw-r--r-- | source/common/dmtable.c | 1 | ||||
-rw-r--r-- | source/common/dmtbdump2.c | 62 | ||||
-rw-r--r-- | source/common/dmtbinfo2.c | 46 | ||||
-rw-r--r-- | source/include/acdisasm.h | 7 | ||||
-rw-r--r-- | source/include/actbinfo.h | 3 | ||||
-rw-r--r-- | source/include/actbl2.h | 47 | ||||
-rw-r--r-- | source/tools/acpisrc/astable.c | 4 |
8 files changed, 171 insertions, 0 deletions
diff --git a/source/common/ahtable.c b/source/common/ahtable.c index 374b4b12a..80f248d2e 100644 --- a/source/common/ahtable.c +++ b/source/common/ahtable.c @@ -237,6 +237,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] = {ACPI_SIG_PHAT, "Platform Health Assessment Table"}, {ACPI_SIG_PMTT, "Platform Memory Topology Table"}, {ACPI_SIG_PPTT, "Processor Properties Topology Table"}, + {ACPI_SIG_PRMT, "Platform Runtime Mechanism Table"}, {ACPI_SIG_RASF, "RAS Features Table"}, {ACPI_SIG_RGRT, "Regulatory Graphics Resource Table"}, {ACPI_RSDP_NAME,"Root System Description Pointer"}, diff --git a/source/common/dmtable.c b/source/common/dmtable.c index 856c17012..bfac1d82d 100644 --- a/source/common/dmtable.c +++ b/source/common/dmtable.c @@ -567,6 +567,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_PHAT, NULL, AcpiDmDumpPhat, DtCompilePhat, TemplatePhat}, {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt}, {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt}, + {ACPI_SIG_PRMT, NULL, AcpiDmDumpPrmt, NULL, NULL}, {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf}, {ACPI_SIG_RGRT, NULL, AcpiDmDumpRgrt, DtCompileRgrt, TemplateRgrt}, {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt}, diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c index 2a4f9dcab..1b3cdf769 100644 --- a/source/common/dmtbdump2.c +++ b/source/common/dmtbdump2.c @@ -2005,6 +2005,68 @@ NextSubtable: /******************************************************************************* * + * FUNCTION: AcpiDmDumpPrmt + * + * PARAMETERS: Table - A PRMT table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a PRMT. This table type consists + * of an open-ended number of subtables. + * + ******************************************************************************/ + +void +AcpiDmDumpPrmt ( + ACPI_TABLE_HEADER *Table) +{ + UINT32 CurrentOffset = sizeof (ACPI_TABLE_HEADER); + ACPI_TABLE_PRMT_HEADER *PrmtHeader; + ACPI_PRMT_MODULE_INFO *PrmtModuleInfo; + ACPI_PRMT_HANDLER_INFO *PrmtHandlerInfo; + ACPI_STATUS Status; + UINT32 i, j; + + + /* Main table header */ + + PrmtHeader = ACPI_ADD_PTR (ACPI_TABLE_PRMT_HEADER, Table, CurrentOffset); + Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtHeader, + sizeof (ACPI_TABLE_PRMT_HEADER), AcpiDmTableInfoPrmtHdr); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Invalid PRMT header\n"); + return; + } + + CurrentOffset += sizeof (ACPI_TABLE_PRMT_HEADER); + + /* PRM Module Information Structure array */ + + for (i = 0; i < PrmtHeader->ModuleInfoCount; ++i) + { + PrmtModuleInfo = ACPI_ADD_PTR (ACPI_PRMT_MODULE_INFO, Table, CurrentOffset); + Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtModuleInfo, + sizeof (ACPI_PRMT_MODULE_INFO), AcpiDmTableInfoPrmtModule); + + CurrentOffset += sizeof (ACPI_PRMT_MODULE_INFO); + + /* PRM handler information structure array */ + + for (j = 0; j < PrmtModuleInfo->HandlerInfoCount; ++j) + { + PrmtHandlerInfo = ACPI_ADD_PTR (ACPI_PRMT_HANDLER_INFO, Table, CurrentOffset); + Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtHandlerInfo, + sizeof (ACPI_PRMT_HANDLER_INFO), AcpiDmTableInfoPrmtHandler); + + CurrentOffset += sizeof (ACPI_PRMT_HANDLER_INFO); + } + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmDumpRgrt * * PARAMETERS: Table - A RGRT table diff --git a/source/common/dmtbinfo2.c b/source/common/dmtbinfo2.c index 011c32953..00cf2e4d3 100644 --- a/source/common/dmtbinfo2.c +++ b/source/common/dmtbinfo2.c @@ -1596,6 +1596,52 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPptt2[] = /******************************************************************************* * + * PRMT - Platform Runtime Mechanism Table + * Version 1 + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHdr[] = +{ + {ACPI_DMT_UUID, ACPI_PRMTH_OFFSET (PlatformGuid[0]), "Platform GUID", 0}, + {ACPI_DMT_UINT32, ACPI_PRMTH_OFFSET (ModuleInfoOffset), "Module info offset", 0}, + {ACPI_DMT_UINT32, ACPI_PRMTH_OFFSET (ModuleInfoCount), "Module info count", 0}, + ACPI_DMT_NEW_LINE, + ACPI_DMT_TERMINATOR + +}; + +ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtModule[] = +{ + {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (Revision), "Revision", 0}, + {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (Length), "Length", 0}, + {ACPI_DMT_UUID, ACPI_PRMT0_OFFSET (ModuleGuid[0]), "Module GUID", 0}, + {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (MajorRev), "Major Revision", 0}, + {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (MinorRev), "Minor Revision", 0}, + {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (HandlerInfoCount), "Handler Info Count", 0}, + {ACPI_DMT_UINT32, ACPI_PRMT0_OFFSET (HandlerInfoOffset), "Handler Info Offset", 0}, + {ACPI_DMT_UINT64, ACPI_PRMT0_OFFSET (MmioListPointer), "Mmio List pointer", 0}, + ACPI_DMT_NEW_LINE, + ACPI_DMT_TERMINATOR + +}; + +ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHandler[] = +{ + {ACPI_DMT_UINT16, ACPI_PRMT1_OFFSET (Revision), "Revision", 0}, + {ACPI_DMT_UINT16, ACPI_PRMT1_OFFSET (Length), "Length", 0}, + {ACPI_DMT_UUID, ACPI_PRMT1_OFFSET (HandlerGuid[0]), "Handler GUID", 0}, + {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (HandlerAddress), "Handler address", 0}, + {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (StaticDataBufferAddress),"Satic Data Address", 0}, + {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (AcpiParamBufferAddress), "ACPI Parameter Address", 0}, + ACPI_DMT_NEW_LINE, + ACPI_DMT_TERMINATOR + +}; + + +/******************************************************************************* + * * RASF - RAS Feature table * ******************************************************************************/ diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index e9e20a31a..9b584d674 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -554,6 +554,9 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPpttHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtModule[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHandler[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoRgrt[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoRgrt0[]; @@ -787,6 +790,10 @@ AcpiDmDumpPptt ( ACPI_TABLE_HEADER *Table); void +AcpiDmDumpPrmt ( + ACPI_TABLE_HEADER *Table); + +void AcpiDmDumpRgrt ( ACPI_TABLE_HEADER *Table); diff --git a/source/include/actbinfo.h b/source/include/actbinfo.h index 844cc2de5..027e6085c 100644 --- a/source/include/actbinfo.h +++ b/source/include/actbinfo.h @@ -337,6 +337,9 @@ #define ACPI_PPTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_CACHE,f) #define ACPI_PPTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_CACHE_V1,f) #define ACPI_PPTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_ID,f) +#define ACPI_PRMTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PRMT_HEADER,f) +#define ACPI_PRMT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PRMT_MODULE_INFO,f) +#define ACPI_PRMT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PRMT_HANDLER_INFO,f) #define ACPI_S3PTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f) #define ACPI_S3PT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f) #define ACPI_S3PT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f) diff --git a/source/include/actbl2.h b/source/include/actbl2.h index 13f81bbc3..cb237a6b0 100644 --- a/source/include/actbl2.h +++ b/source/include/actbl2.h @@ -184,6 +184,7 @@ #define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */ #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ #define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */ +#define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */ #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */ #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ @@ -2143,6 +2144,52 @@ typedef struct acpi_pptt_id /******************************************************************************* * + * PRMT - Platform Runtime Mechanism Table + * Version 1 + * + ******************************************************************************/ + +typedef struct acpi_table_prmt +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + +} ACPI_TABLE_PRMT; + +typedef struct acpi_table_prmt_header +{ + UINT8 PlatformGuid[16]; + UINT32 ModuleInfoOffset; + UINT32 ModuleInfoCount; + +} ACPI_TABLE_PRMT_HEADER; + +typedef struct acpi_prmt_module_info +{ + UINT16 Revision; + UINT16 Length; + UINT8 ModuleGuid[16]; + UINT16 MajorRev; + UINT16 MinorRev; + UINT16 HandlerInfoCount; + UINT32 HandlerInfoOffset; + UINT64 MmioListPointer; + +} ACPI_PRMT_MODULE_INFO; + +typedef struct acpi_prmt_handler_info +{ + UINT16 Revision; + UINT16 Length; + UINT8 HandlerGuid[16]; + UINT64 HandlerAddress; + UINT64 StaticDataBufferAddress; + UINT64 AcpiParamBufferAddress; + +} ACPI_PRMT_HANDLER_INFO; + + +/******************************************************************************* + * * RASF - RAS Feature Table (ACPI 5.0) * Version 1 * diff --git a/source/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c index 1f0446499..86fe13d82 100644 --- a/source/tools/acpisrc/astable.c +++ b/source/tools/acpisrc/astable.c @@ -677,6 +677,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"ACPI_TABLE_PHAT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_PMTT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_PPTT", SRC_TYPE_STRUCT}, + {"ACPI_TABLE_PRMT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_RGRT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_RSDP", SRC_TYPE_STRUCT}, {"ACPI_TABLE_RSDT", SRC_TYPE_STRUCT}, @@ -849,6 +850,9 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"ACPI_PPTT_CACHE_V1", SRC_TYPE_STRUCT}, {"ACPI_PPTT_ID", SRC_TYPE_STRUCT}, {"ACPI_PPTT_PROCESSOR", SRC_TYPE_STRUCT}, + {"ACPI_TABLE_PRMT_HEADER", SRC_TYPE_STRUCT}, + {"ACPI_PRMT_MODULE_INFO", SRC_TYPE_STRUCT}, + {"ACPI_PRMT_HANDLER_INFO", SRC_TYPE_STRUCT}, {"ACPI_RSDP_COMMON", SRC_TYPE_STRUCT}, {"ACPI_RSDP_EXTENSION", SRC_TYPE_STRUCT}, {"ACPI_S3PT_RESUME", SRC_TYPE_STRUCT}, |