TianoCore EDK2 master
Loading...
Searching...
No Matches
RawGenerator.c
Go to the documentation of this file.
1
8#include <Library/AcpiLib.h>
9#include <Library/DebugLib.h>
10#include <Protocol/AcpiTable.h>
11
12// Module specific include files.
13#include <AcpiTableGenerator.h>
18
39EFIAPI
45 )
46{
47 ASSERT (This != NULL);
48 ASSERT (AcpiTableInfo != NULL);
49 ASSERT (CfgMgrProtocol != NULL);
50 ASSERT (Table != NULL);
51 ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
52 ASSERT (AcpiTableInfo->AcpiTableData != NULL);
53
54 if (AcpiTableInfo->AcpiTableData == NULL) {
55 *Table = NULL;
56 return EFI_INVALID_PARAMETER;
57 }
58
59 *Table = AcpiTableInfo->AcpiTableData;
60
61 return EFI_SUCCESS;
62}
63
66#define RAW_GENERATOR_REVISION CREATE_REVISION (1, 0)
67
73 // Generator ID
75 // Generator Description
76 L"ACPI.STD.RAW.GENERATOR",
77 // ACPI Table Signature - Unused
78 0,
79 // ACPI Table Revision - Unused
80 0,
81 // Minimum ACPI Table Revision - Unused
82 0,
83 // Creator ID
85 // Creator Revision
87 // Build Table function
89 // No additional resources are allocated by the generator.
90 // Hence the Free Resource function is not required.
91 NULL,
92 // Extended build function not needed
93 NULL,
94 // Extended build function not implemented by the generator.
95 // Hence extended free resource function is not required.
96 NULL
97};
98
110EFIAPI
112 IN EFI_HANDLE ImageHandle,
113 IN EFI_SYSTEM_TABLE *SystemTable
114 )
115{
116 EFI_STATUS Status;
117
119 DEBUG ((DEBUG_INFO, "RAW: Register Generator. Status = %r\n", Status));
120 ASSERT_EFI_ERROR (Status);
121 return Status;
122}
123
134EFIAPI
136 IN EFI_HANDLE ImageHandle,
137 IN EFI_SYSTEM_TABLE *SystemTable
138 )
139{
140 EFI_STATUS Status;
141
143 DEBUG ((DEBUG_INFO, "RAW: Deregister Generator. Status = %r\n", Status));
144 ASSERT_EFI_ERROR (Status);
145 return Status;
146}
EFI_STATUS EFIAPI RegisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
EFI_STATUS EFIAPI DeregisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId)
#define TABLE_GENERATOR_CREATOR_ID
@ EStdAcpiTableIdRaw
RAW Generator.
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define STATIC
Definition: Base.h:264
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define DEBUG(Expression)
Definition: DebugLib.h:434
EFI_STATUS EFIAPI AcpiRawLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: RawGenerator.c:135
#define RAW_GENERATOR_REVISION
Definition: RawGenerator.c:66
EFI_STATUS EFIAPI AcpiRawLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: RawGenerator.c:111
STATIC CONST ACPI_TABLE_GENERATOR RawGenerator
Definition: RawGenerator.c:72
STATIC EFI_STATUS EFIAPI BuildRawTable(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, OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
Definition: RawGenerator.c:40
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112