TianoCore EDK2 master
Loading...
Searching...
No Matches
PrmAcpiTable.h
Go to the documentation of this file.
1
11#ifndef PRMT_ACPI_TABLE_H_
12#define PRMT_ACPI_TABLE_H_
13
14#include <Base.h>
16
17#define PRM_TABLE_SIGNATURE SIGNATURE_32 ('P', 'R', 'M', 'T')
18
19#define PRM_TABLE_REVISION 0x0
20#define PRM_MODULE_INFORMATION_STRUCT_REVISION 0x00
21#define PRM_HANDLER_INFORMATION_STRUCT_REVISION 0x00
22
23#pragma pack(push, 1)
24
25//
26// Platform Runtime Mechanism (PRM) ACPI Table (PRMT) structures
27//
28typedef struct {
41
42typedef struct {
49 UINT16 HandlerCount;
54 PRM_HANDLER_INFORMATION_STRUCT HandlerInfoStructure[1];
56
57typedef struct {
65 PRM_MODULE_INFORMATION_STRUCT PrmModuleInfoStructure[1];
67
68#pragma pack(pop)
69
70//
71// Helper macros to build PRM Information structures
72//
73// Todo: Revisit whether to use; currently both macros are not used
74//
75#define PRM_MODULE_INFORMATION_STRUCTURE(ModuleGuid, ModuleRevision, HandlerCount, PrmHanderInfoStructureArray) { \
76 { \
77 PRM_MODULE_INFORMATION_STRUCT_REVISION, /* UINT16 StructureRevision; */ \
78 (OFFSET_OF (PRM_MODULE_INFORMATION_STRUCT, HandlerInfoStructure) + (HandlerCount * sizeof (PRM_HANDLER_INFORMATION_STRUCT))) /* UINT16 StructureLength; */ \
79 ModuleGuid, /* GUID ModuleGuid; */ \
80 ModuleRevision, /* UINT16 ModuleRevision */ \
81 HandlerCount, /* UINT16 HandlerCount */ \
82 OFFSET_OF (PRM_MODULE_INFORMATION_STRUCT, HandlerInfoOffset), /* UINT32 HandlerInfoOffset */ \
83 PrmHanderInfoStructureArray /* PRM_HANDLER_INFORMATION_STRUCT HandlerInfoStructure */ \
84 } \
85 }
86
87#define PRM_HANDLER_INFORMATION_STRUCTURE(HandlerGuid, PhysicalAddress) { \
88 { \
89 PRM_HANDLER_INFORMATION_STRUCT_REVISION, /* UINT16 StructureRevision; */ \
90 sizeof (PRM_HANDLER_INFORMATION_STRUCT), /* UINT16 StructureLength; */ \
91 HandlerGuid, /* GUID HandlerGuid; */ \
92 PhysicalAddress, /* UINT64 PhysicalAddress */ \
93 } \
94 }
95
96#endif // _PRMT_ACPI_TABLE_H_
Definition: Base.h:213
UINT32 PrmModuleInfoCount
Number of entries in the PRM Module Info array.
Definition: PrmAcpiTable.h:64
EFI_ACPI_DESCRIPTION_HEADER Header
Standard ACPI description header.
Definition: PrmAcpiTable.h:58
UINT16 StructureRevision
Revision of this structure.
Definition: PrmAcpiTable.h:29
UINT16 StructureLength
Length in bytes of this structure.
Definition: PrmAcpiTable.h:30
GUID Identifier
GUID of the PRM handler for this structure.
Definition: PrmAcpiTable.h:31
UINT64 PhysicalAddress
Physical address of this PRM handler.
Definition: PrmAcpiTable.h:32
UINT16 HandlerCount
Number of entries in the Handler Info array.
Definition: PrmAcpiTable.h:49
UINT16 StructureRevision
Revision of this structure.
Definition: PrmAcpiTable.h:43
UINT16 MinorRevision
PRM module minor revision.
Definition: PrmAcpiTable.h:48
GUID Identifier
GUID of the PRM module for this structure.
Definition: PrmAcpiTable.h:46
UINT16 MajorRevision
PRM module major revision.
Definition: PrmAcpiTable.h:47