mirror of
https://github.com/acpica/acpica/
synced 2025-01-09 02:52:45 +03:00
iASL: add disassembler support for PRMT
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
This commit is contained in:
parent
606fa37d24
commit
f70e7593e3
@ -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"},
|
||||
|
@ -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},
|
||||
|
@ -2003,6 +2003,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
|
||||
|
@ -1594,6 +1594,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
|
||||
|
@ -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[];
|
||||
@ -786,6 +789,10 @@ void
|
||||
AcpiDmDumpPptt (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpPrmt (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpRgrt (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
@ -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)
|
||||
|
@ -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 */
|
||||
@ -2141,6 +2142,52 @@ typedef struct acpi_pptt_id
|
||||
} 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)
|
||||
|
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user