TianoCore EDK2 master
Loading...
Searching...
No Matches
AcpiTableGenerator.h
Go to the documentation of this file.
1
15#ifndef ACPI_TABLE_GENERATOR_H_
16#define ACPI_TABLE_GENERATOR_H_
17
19
20// Module specific include files.
21#include <TableGenerator.h>
22
23#pragma pack(1)
24
86
90typedef enum StdAcpiTableId {
114 EStdAcpiTableIdMax
116
124#define IS_GENERATOR_TYPE_ACPI(TableGeneratorId) \
125 (GET_TABLE_TYPE (TableGeneratorId) == ETableGeneratorTypeAcpi)
126
135#define IS_VALID_STD_ACPI_GENERATOR_ID(TableGeneratorId) \
136 ( \
137 IS_GENERATOR_NAMESPACE_STD (TableGeneratorId) && \
138 IS_GENERATOR_TYPE_ACPI (TableGeneratorId) && \
139 ((GET_TABLE_ID (GeneratorId) >= EStdAcpiTableIdRaw) && \
140 (GET_TABLE_ID (GeneratorId) < EStdAcpiTableIdMax)) \
141 )
142
149#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId) \
150 CREATE_TABLE_GEN_ID ( \
151 ETableGeneratorTypeAcpi, \
152 ETableGeneratorNameSpaceStd, \
153 TableId \
154 )
155
162#define CREATE_OEM_ACPI_TABLE_GEN_ID(TableId) \
163 CREATE_TABLE_GEN_ID ( \
164 ETableGeneratorTypeAcpi, \
165 ETableGeneratorNameSpaceOem, \
166 TableId \
167 )
168
172#define TABLE_GENERATOR_CREATOR_ID SIGNATURE_32('D', 'Y', 'N', 'T')
173
177#define TABLE_GENERATOR_CREATOR_ID_ARM SIGNATURE_32('A', 'R', 'M', 'H')
178
186#define ACPI_HEADER(Signature, Type, Revision) { \
187 Signature, /* UINT32 Signature */ \
188 sizeof (Type), /* UINT32 Length */ \
189 Revision, /* UINT8 Revision */ \
190 0, /* UINT8 Checksum */ \
191 { 0, 0, 0, 0, 0, 0 }, /* UINT8 OemId[6] */ \
192 0, /* UINT64 OemTableId */ \
193 0, /* UINT32 OemRevision */ \
194 0, /* UINT32 CreatorId */ \
195 0 /* UINT32 CreatorRevision */ \
196 }
197
203#define DUMP_ACPI_TABLE_HEADER(AcpiHeader) \
204 DEBUG (( \
205 DEBUG_INFO, \
206 "ACPI TABLE %c%c%c%c : Rev 0x%x : Length : 0x%x\n", \
207 (AcpiHeader->Signature & 0xFF), \
208 ((AcpiHeader->Signature >> 8) & 0xFF), \
209 ((AcpiHeader->Signature >> 16) & 0xFF), \
210 ((AcpiHeader->Signature >> 24) & 0xFF), \
211 AcpiHeader->Revision, \
212 AcpiHeader->Length \
213 ));
214
220
239 );
240
259 );
260
282 OUT UINTN *CONST TableCount
283 );
284
305 IN CONST UINTN TableCount
306 );
307
317typedef struct AcpiTableGenerator {
320
323
326
329
332
334 UINT32 CreatorId;
335
338
341
346
349
356
372EFIAPI
375 );
376
390EFIAPI
393 );
394
395#pragma pack()
396
397#endif // ACPI_TABLE_GENERATOR_H_
UINT64 UINTN
struct AcpiTableGenerator ACPI_TABLE_GENERATOR
enum StdAcpiTableId ESTD_ACPI_TABLE_ID
EFI_STATUS(EFIAPI * ACPI_TABLE_GENERATOR_FREE_TABLE)(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
EFI_STATUS EFIAPI RegisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
EFI_STATUS EFIAPI DeregisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
EFI_STATUS(EFIAPI * ACPI_TABLE_GENERATOR_FREE_TABLEEX)(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_DESCRIPTION_HEADER ***CONST Table, IN CONST UINTN TableCount)
EFI_STATUS(EFIAPI * ACPI_TABLE_GENERATOR_BUILD_TABLEEX)(IN CONST ACPI_TABLE_GENERATOR *This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT EFI_ACPI_DESCRIPTION_HEADER ***Table, OUT UINTN *CONST TableCount)
StdAcpiTableId
@ EStdAcpiTableIdFadt
FADT Generator.
@ EStdAcpiTableIdSsdt
SSDT Generator.
@ EStdAcpiTableIdSpcr
SPCR Generator.
@ EStdAcpiTableIdPcct
PCCT Generator.
@ EStdAcpiTableIdMadt
MADT Generator.
@ EStdAcpiTableIdSsdtCmn600
SSDT Cmn-600 Generator.
@ EStdAcpiTableIdDbg2
DBG2 Generator.
@ EStdAcpiTableIdIort
IORT Generator.
@ EStdAcpiTableIdRaw
RAW Generator.
@ EStdAcpiTableIdHpet
HPET Generator.
@ EStdAcpiTableIdSsdtSerialPort
SSDT Serial-Port Generator.
@ EStdAcpiTableIdSsdtCpuTopology
SSDT Cpu Topology.
@ EStdAcpiTableIdSsdtHpet
SSDT HPET Generator.
@ EStdAcpiTableIdMcfg
MCFG Generator.
@ EStdAcpiTableIdGtdt
GTDT Generator.
@ EStdAcpiTableIdTpm2
TPM2 Generator.
@ EStdAcpiTableIdSsdtPciExpress
SSDT Pci Express Generator.
@ EStdAcpiTableIdWsmt
WSMT Generator.
@ EStdAcpiTableIdPptt
PPTT Generator.
@ EStdAcpiTableIdReserved
Reserved.
@ EStdAcpiTableIdSrat
SRAT Generator.
@ EStdAcpiTableIdDsdt
DSDT Generator.
@ EStdAcpiTableIdSpmi
SPMI Generator.
TABLE_GENERATOR_ID ACPI_TABLE_GENERATOR_ID
EFI_STATUS(EFIAPI * ACPI_TABLE_GENERATOR_BUILD_TABLE)(IN CONST ACPI_TABLE_GENERATOR *This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT EFI_ACPI_DESCRIPTION_HEADER **Table)
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT32 TABLE_GENERATOR_ID
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UINT32 CreatorRevision
The ACPI table creator revision.
ACPI_TABLE_GENERATOR_ID GeneratorID
The ACPI table generator ID.
UINT32 CreatorId
The ACPI table creator ID.
UINT8 MinAcpiTableRevision
The minimum supported ACPI table revision.
ACPI_TABLE_GENERATOR_FREE_TABLE FreeTableResources
CONST CHAR16 * Description
String describing the ACPI table generator.
ACPI_TABLE_GENERATOR_FREE_TABLEEX FreeTableResourcesEx
UINT8 AcpiTableRevision
The ACPI table revision.
UINT32 AcpiTableSignature
The ACPI table signature.
ACPI_TABLE_GENERATOR_BUILD_TABLEEX BuildAcpiTableEx
ACPI table extended build function pointer.
ACPI_TABLE_GENERATOR_BUILD_TABLE BuildAcpiTable
ACPI table build function pointer.