4 Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
8 - ACPI 6.2 Specification - Errata A, September 2017
12 #include <Library/AcpiLib.h>
13 #include <Library/DebugLib.h>
14 #include <Library/MemoryAllocationLib.h>
15 #include <Protocol/AcpiTable.h>
17 // Module specific include files.
18 #include <AcpiTableGenerator.h>
19 #include <ConfigurationManagerObject.h>
20 #include <ConfigurationManagerHelper.h>
21 #include <Library/TableHelperLib.h>
22 #include <Protocol/ConfigurationManagerProtocol.h>
24 /** ARM standard GTDT Generator
27 The following Configuration Manager Object(s) are required by
29 - EArmObjGenericTimerInfo
30 - EArmObjPlatformGenericWatchdogInfo (OPTIONAL)
31 - EArmObjPlatformGTBlockInfo (OPTIONAL)
32 - EArmObjGTBlockTimerFrameInfo (OPTIONAL)
35 /** This macro expands to a function that retrieves the Generic
36 Timer Information from the Configuration Manager.
40 EArmObjGenericTimerInfo
,
41 CM_ARM_GENERIC_TIMER_INFO
44 /** This macro expands to a function that retrieves the SBSA Generic
45 Watchdog Timer Information from the Configuration Manager.
49 EArmObjPlatformGenericWatchdogInfo
,
50 CM_ARM_GENERIC_WATCHDOG_INFO
53 /** This macro expands to a function that retrieves the Platform Generic
54 Timer Block Information from the Configuration Manager.
58 EArmObjPlatformGTBlockInfo
,
62 /** This macro expands to a function that retrieves the Generic
63 Timer Block Timer Frame Information from the Configuration Manager.
67 EArmObjGTBlockTimerFrameInfo
,
68 CM_ARM_GTBLOCK_TIMER_FRAME_INFO
71 /** Add the Generic Timer Information to the GTDT table.
73 Also update the Platform Timer offset information if the platform
74 implements platform timers.
76 @param [in] CfgMgrProtocol Pointer to the Configuration Manager
78 @param [in] Gtdt Pointer to the GTDT Table.
79 @param [in] PlatformTimerCount Platform timer count.
81 @retval EFI_SUCCESS Success.
82 @retval EFI_INVALID_PARAMETER A parameter is invalid.
83 @retval EFI_NOT_FOUND The required object was not found.
84 @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration
85 Manager is less than the Object size for the
92 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL
* CONST CfgMgrProtocol
,
93 IN EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE
* CONST Gtdt
,
94 IN CONST UINT32 PlatformTimerCount
98 CM_ARM_GENERIC_TIMER_INFO
* GenericTimerInfo
;
100 ASSERT (CfgMgrProtocol
!= NULL
);
101 ASSERT (Gtdt
!= NULL
);
103 Status
= GetEArmObjGenericTimerInfo (
110 if (EFI_ERROR (Status
)) {
113 "ERROR: GTDT: Failed to get GenericTimerInfo. Status = %r\n",
119 Gtdt
->CntControlBasePhysicalAddress
=
120 GenericTimerInfo
->CounterControlBaseAddress
;
121 Gtdt
->Reserved
= EFI_ACPI_RESERVED_DWORD
;
122 Gtdt
->SecurePL1TimerGSIV
= GenericTimerInfo
->SecurePL1TimerGSIV
;
123 Gtdt
->SecurePL1TimerFlags
= GenericTimerInfo
->SecurePL1TimerFlags
;
124 Gtdt
->NonSecurePL1TimerGSIV
= GenericTimerInfo
->NonSecurePL1TimerGSIV
;
125 Gtdt
->NonSecurePL1TimerFlags
= GenericTimerInfo
->NonSecurePL1TimerFlags
;
126 Gtdt
->VirtualTimerGSIV
= GenericTimerInfo
->VirtualTimerGSIV
;
127 Gtdt
->VirtualTimerFlags
= GenericTimerInfo
->VirtualTimerFlags
;
128 Gtdt
->NonSecurePL2TimerGSIV
= GenericTimerInfo
->NonSecurePL2TimerGSIV
;
129 Gtdt
->NonSecurePL2TimerFlags
= GenericTimerInfo
->NonSecurePL2TimerFlags
;
130 Gtdt
->CntReadBasePhysicalAddress
=
131 GenericTimerInfo
->CounterReadBaseAddress
;
132 Gtdt
->PlatformTimerCount
= PlatformTimerCount
;
133 Gtdt
->PlatformTimerOffset
= (PlatformTimerCount
== 0) ? 0 :
134 sizeof (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE
);
139 /** Add the SBSA Generic Watchdog Timers to the GTDT table.
141 @param [in] Gtdt Pointer to the GTDT Table.
142 @param [in] WatchdogOffset Offset to the watchdog information in the
144 @param [in] WatchdogInfoList Pointer to the watchdog information list.
145 @param [in] WatchdogCount Platform timer count.
149 AddGenericWatchdogList (
150 IN EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE
* CONST Gtdt
,
151 IN CONST UINT32 WatchdogOffset
,
152 IN CONST CM_ARM_GENERIC_WATCHDOG_INFO
* WatchdogInfoList
,
153 IN UINT32 WatchdogCount
156 EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE
* Watchdog
;
158 ASSERT (Gtdt
!= NULL
);
159 ASSERT (WatchdogInfoList
!= NULL
);
161 Watchdog
= (EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE
*)
162 ((UINT8
*)Gtdt
+ WatchdogOffset
);
164 while (WatchdogCount
-- != 0) {
165 // Add watchdog entry
166 DEBUG ((DEBUG_INFO
, "GTDT: Watchdog = 0x%p\n", Watchdog
));
167 Watchdog
->Type
= EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG
;
169 sizeof (EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE
);
170 Watchdog
->Reserved
= EFI_ACPI_RESERVED_BYTE
;
171 Watchdog
->RefreshFramePhysicalAddress
=
172 WatchdogInfoList
->RefreshFrameAddress
;
173 Watchdog
->WatchdogControlFramePhysicalAddress
=
174 WatchdogInfoList
->ControlFrameAddress
;
175 Watchdog
->WatchdogTimerGSIV
= WatchdogInfoList
->TimerGSIV
;
176 Watchdog
->WatchdogTimerFlags
= WatchdogInfoList
->Flags
;
183 Function to test if two Generic Timer Block Frame Info structures have the
186 @param [in] Frame1 Pointer to the first GT Block Frame Info
188 @param [in] Frame2 Pointer to the second GT Block Frame Info
190 @param [in] Index1 Index of Frame1 in the shared GT Block Frame
192 @param [in] Index2 Index of Frame2 in the shared GT Block Frame
195 @retval TRUE Frame1 and Frame2 have the same frame number.
196 @return FALSE Frame1 and Frame2 have different frame numbers.
201 IsGtFrameNumberEqual (
202 IN CONST VOID
* Frame1
,
203 IN CONST VOID
* Frame2
,
211 ASSERT ((Frame1
!= NULL
) && (Frame2
!= NULL
));
213 FrameNumber1
= ((CM_ARM_GTBLOCK_TIMER_FRAME_INFO
*)Frame1
)->FrameNumber
;
214 FrameNumber2
= ((CM_ARM_GTBLOCK_TIMER_FRAME_INFO
*)Frame2
)->FrameNumber
;
216 if (FrameNumber1
== FrameNumber2
) {
219 "ERROR: GTDT: GT Block Frame Info Structures %d and %d have the same " \
220 "frame number: 0x%x.\n",
231 /** Update the GT Block Timer Frame lists in the GTDT Table.
233 @param [in] GtBlockFrame Pointer to the GT Block Frames
235 @param [in] GTBlockTimerFrameList Pointer to the GT Block Frame
237 @param [in] GTBlockFrameCount Number of GT Block Frames.
239 @retval EFI_SUCCESS Table generated successfully.
240 @retval EFI_INVALID_PARAMETER A parameter is invalid.
244 AddGTBlockTimerFrames (
245 IN EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE
* GtBlockFrame
,
246 IN CONST CM_ARM_GTBLOCK_TIMER_FRAME_INFO
* GTBlockTimerFrameList
,
247 IN UINT32 GTBlockFrameCount
250 BOOLEAN IsFrameNumberDuplicated
;
252 ASSERT (GtBlockFrame
!= NULL
);
253 ASSERT (GTBlockTimerFrameList
!= NULL
);
255 if (GTBlockFrameCount
> 8) {
258 "ERROR: GTDT: GT Block Frame Count %d is greater than 8\n",
261 ASSERT (GTBlockFrameCount
<= 8);
262 return EFI_INVALID_PARAMETER
;
265 IsFrameNumberDuplicated
= FindDuplicateValue (
266 GTBlockTimerFrameList
,
268 sizeof (CM_ARM_GTBLOCK_TIMER_FRAME_INFO
),
271 // Duplicate entry was found so timer frame numbers provided are invalid
272 if (IsFrameNumberDuplicated
) {
273 return EFI_INVALID_PARAMETER
;
276 while (GTBlockFrameCount
-- != 0) {
279 "GTDT: GtBlockFrame = 0x%p\n",
283 if (GTBlockTimerFrameList
->FrameNumber
>= 8) {
286 "ERROR: GTDT: Frame number %d is not in the range 0-7\n",
287 GTBlockTimerFrameList
->FrameNumber
289 return EFI_INVALID_PARAMETER
;
292 GtBlockFrame
->GTFrameNumber
= GTBlockTimerFrameList
->FrameNumber
;
293 GtBlockFrame
->Reserved
[0] = EFI_ACPI_RESERVED_BYTE
;
294 GtBlockFrame
->Reserved
[1] = EFI_ACPI_RESERVED_BYTE
;
295 GtBlockFrame
->Reserved
[2] = EFI_ACPI_RESERVED_BYTE
;
297 GtBlockFrame
->CntBaseX
= GTBlockTimerFrameList
->PhysicalAddressCntBase
;
298 GtBlockFrame
->CntEL0BaseX
=
299 GTBlockTimerFrameList
->PhysicalAddressCntEL0Base
;
301 GtBlockFrame
->GTxPhysicalTimerGSIV
=
302 GTBlockTimerFrameList
->PhysicalTimerGSIV
;
303 GtBlockFrame
->GTxPhysicalTimerFlags
=
304 GTBlockTimerFrameList
->PhysicalTimerFlags
;
306 GtBlockFrame
->GTxVirtualTimerGSIV
= GTBlockTimerFrameList
->VirtualTimerGSIV
;
307 GtBlockFrame
->GTxVirtualTimerFlags
=
308 GTBlockTimerFrameList
->VirtualTimerFlags
;
310 GtBlockFrame
->GTxCommonFlags
= GTBlockTimerFrameList
->CommonFlags
;
312 GTBlockTimerFrameList
++;
317 /** Add the GT Block Timers in the GTDT Table.
319 @param [in] CfgMgrProtocol Pointer to the Configuration Manager
321 @param [in] Gtdt Pointer to the GTDT Table.
322 @param [in] GTBlockOffset Offset of the GT Block
323 information in the GTDT Table.
324 @param [in] GTBlockInfo Pointer to the GT Block
326 @param [in] BlockTimerCount Number of GT Block Timers.
328 @retval EFI_SUCCESS Table generated successfully.
329 @retval EFI_INVALID_PARAMETER A parameter is invalid.
334 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL
* CONST CfgMgrProtocol
,
335 IN EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE
* CONST Gtdt
,
336 IN CONST UINT32 GTBlockOffset
,
337 IN CONST CM_ARM_GTBLOCK_INFO
* GTBlockInfo
,
338 IN UINT32 BlockTimerCount
342 EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE
* GTBlock
;
343 EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE
* GtBlockFrame
;
344 CM_ARM_GTBLOCK_TIMER_FRAME_INFO
* GTBlockTimerFrameList
;
345 UINT32 GTBlockTimerFrameCount
;
347 ASSERT (Gtdt
!= NULL
);
348 ASSERT (GTBlockInfo
!= NULL
);
350 GTBlock
= (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE
*)((UINT8
*)Gtdt
+
353 while (BlockTimerCount
-- != 0) {
354 DEBUG ((DEBUG_INFO
, "GTDT: GTBlock = 0x%p\n", GTBlock
));
356 Status
= GetEArmObjGTBlockTimerFrameInfo (
358 GTBlockInfo
->GTBlockTimerFrameToken
,
359 >BlockTimerFrameList
,
360 >BlockTimerFrameCount
362 if (EFI_ERROR (Status
) ||
363 (GTBlockTimerFrameCount
!= GTBlockInfo
->GTBlockTimerFrameCount
)) {
366 "ERROR: GTDT: Failed to get Generic Timer Frames. Status = %r\n",
372 GTBlock
->Type
= EFI_ACPI_6_2_GTDT_GT_BLOCK
;
373 GTBlock
->Length
= sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE
) +
374 (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE
) *
375 GTBlockInfo
->GTBlockTimerFrameCount
);
377 GTBlock
->Reserved
= EFI_ACPI_RESERVED_BYTE
;
378 GTBlock
->CntCtlBase
= GTBlockInfo
->GTBlockPhysicalAddress
;
379 GTBlock
->GTBlockTimerCount
= GTBlockInfo
->GTBlockTimerFrameCount
;
380 GTBlock
->GTBlockTimerOffset
=
381 sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE
);
383 GtBlockFrame
= (EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE
*)
384 ((UINT8
*)GTBlock
+ GTBlock
->GTBlockTimerOffset
);
386 // Add GT Block Timer frames
387 Status
= AddGTBlockTimerFrames (
389 GTBlockTimerFrameList
,
390 GTBlockTimerFrameCount
392 if (EFI_ERROR (Status
)) {
395 "ERROR: GTDT: Failed to add Generic Timer Frames. Status = %r\n",
402 GTBlock
= (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE
*)((UINT8
*)GTBlock
+
409 /** Construct the GTDT ACPI table.
411 Called by the Dynamic Table Manager, this function invokes the
412 Configuration Manager protocol interface to get the required hardware
413 information for generating the ACPI table.
415 If this function allocates any resources then they must be freed
416 in the FreeXXXXTableResources function.
418 @param [in] This Pointer to the table generator.
419 @param [in] AcpiTableInfo Pointer to the ACPI Table Info.
420 @param [in] CfgMgrProtocol Pointer to the Configuration Manager
422 @param [out] Table Pointer to the constructed ACPI Table.
424 @retval EFI_SUCCESS Table generated successfully.
425 @retval EFI_INVALID_PARAMETER A parameter is invalid.
426 @retval EFI_NOT_FOUND The required object was not found.
427 @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration
428 Manager is less than the Object size for the
430 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
436 IN CONST ACPI_TABLE_GENERATOR
* CONST This
,
437 IN CONST CM_STD_OBJ_ACPI_TABLE_INFO
* CONST AcpiTableInfo
,
438 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL
* CONST CfgMgrProtocol
,
439 OUT EFI_ACPI_DESCRIPTION_HEADER
** CONST Table
444 UINT32 PlatformTimerCount
;
445 UINT32 WatchdogCount
;
446 UINT32 BlockTimerCount
;
447 CM_ARM_GENERIC_WATCHDOG_INFO
* WatchdogInfoList
;
448 CM_ARM_GTBLOCK_INFO
* GTBlockInfo
;
449 EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE
* Gtdt
;
451 UINT32 GTBlockOffset
;
452 UINT32 WatchdogOffset
;
454 ASSERT (This
!= NULL
);
455 ASSERT (AcpiTableInfo
!= NULL
);
456 ASSERT (CfgMgrProtocol
!= NULL
);
457 ASSERT (Table
!= NULL
);
458 ASSERT (AcpiTableInfo
->TableGeneratorId
== This
->GeneratorID
);
459 ASSERT (AcpiTableInfo
->AcpiTableSignature
== This
->AcpiTableSignature
);
461 if ((AcpiTableInfo
->AcpiTableRevision
< This
->MinAcpiTableRevision
) ||
462 (AcpiTableInfo
->AcpiTableRevision
> This
->AcpiTableRevision
)) {
465 "ERROR: GTDT: Requested table revision = %d, is not supported."
466 "Supported table revision: Minimum = %d, Maximum = %d\n",
467 AcpiTableInfo
->AcpiTableRevision
,
468 This
->MinAcpiTableRevision
,
469 This
->AcpiTableRevision
471 return EFI_INVALID_PARAMETER
;
475 Status
= GetEArmObjPlatformGTBlockInfo (
481 if (EFI_ERROR (Status
) && (Status
!= EFI_NOT_FOUND
)) {
484 "ERROR: GTDT: Failed to Get Platform GT Block Information." \
491 Status
= GetEArmObjPlatformGenericWatchdogInfo (
497 if (EFI_ERROR (Status
) && (Status
!= EFI_NOT_FOUND
)) {
500 "ERROR: GTDT: Failed to Get Platform Generic Watchdog Information." \
509 "GTDT: BlockTimerCount = %d, WatchdogCount = %d\n",
514 // Calculate the GTDT Table Size
515 PlatformTimerCount
= 0;
516 TableSize
= sizeof (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE
);
517 if (BlockTimerCount
!= 0) {
518 GTBlockOffset
= TableSize
;
519 PlatformTimerCount
+= BlockTimerCount
;
520 TableSize
+= (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE
) *
523 for (Idx
= 0; Idx
< BlockTimerCount
; Idx
++) {
524 if (GTBlockInfo
[Idx
].GTBlockTimerFrameCount
> 8) {
525 Status
= EFI_INVALID_PARAMETER
;
528 "GTDT: GTBockFrameCount cannot be more than 8." \
529 " GTBockFrameCount = %d, Status = %r\n",
530 GTBlockInfo
[Idx
].GTBlockTimerFrameCount
,
535 TableSize
+= (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE
) *
536 GTBlockInfo
[Idx
].GTBlockTimerFrameCount
);
541 "GTDT: GTBockOffset = 0x%x, PLATFORM_TIMER_COUNT = %d\n",
548 if (WatchdogCount
!= 0) {
549 WatchdogOffset
= TableSize
;
550 PlatformTimerCount
+= WatchdogCount
;
551 TableSize
+= (sizeof (EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE
) *
555 "GTDT: WatchdogOffset = 0x%x, PLATFORM_TIMER_COUNT = %d\n",
561 *Table
= (EFI_ACPI_DESCRIPTION_HEADER
*)AllocateZeroPool (TableSize
);
562 if (*Table
== NULL
) {
563 Status
= EFI_OUT_OF_RESOURCES
;
566 "ERROR: GTDT: Failed to allocate memory for GTDT Table, Size = %d," \
574 Gtdt
= (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE
*)*Table
;
577 "GTDT: Gtdt = 0x%p TableSize = 0x%x\n",
582 Status
= AddAcpiHeader (
589 if (EFI_ERROR (Status
)) {
592 "ERROR: GTDT: Failed to add ACPI header. Status = %r\n",
598 Status
= AddGenericTimerInfo (
603 if (EFI_ERROR (Status
)) {
606 "ERROR: GTDT: Failed to add Generic Timer Info. Status = %r\n",
612 if (BlockTimerCount
!= 0) {
613 Status
= AddGTBlockList (
620 if (EFI_ERROR (Status
)) {
623 "ERROR: GTDT: Failed to add GT Block timers. Status = %r\n",
630 if (WatchdogCount
!= 0) {
631 AddGenericWatchdogList (
642 if (*Table
!= NULL
) {
649 /** Free any resources allocated for constructing the GTDT.
651 @param [in] This Pointer to the table generator.
652 @param [in] AcpiTableInfo Pointer to the ACPI Table Info.
653 @param [in] CfgMgrProtocol Pointer to the Configuration Manager
655 @param [in, out] Table Pointer to the ACPI Table.
657 @retval EFI_SUCCESS The resources were freed successfully.
658 @retval EFI_INVALID_PARAMETER The table pointer is NULL or invalid.
662 FreeGtdtTableResources (
663 IN CONST ACPI_TABLE_GENERATOR
* CONST This
,
664 IN CONST CM_STD_OBJ_ACPI_TABLE_INFO
* CONST AcpiTableInfo
,
665 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL
* CONST CfgMgrProtocol
,
666 IN OUT EFI_ACPI_DESCRIPTION_HEADER
** CONST Table
669 ASSERT (This
!= NULL
);
670 ASSERT (AcpiTableInfo
!= NULL
);
671 ASSERT (CfgMgrProtocol
!= NULL
);
672 ASSERT (AcpiTableInfo
->TableGeneratorId
== This
->GeneratorID
);
673 ASSERT (AcpiTableInfo
->AcpiTableSignature
== This
->AcpiTableSignature
);
675 if ((Table
== NULL
) || (*Table
== NULL
)) {
676 DEBUG ((DEBUG_ERROR
, "ERROR: GTDT: Invalid Table Pointer\n"));
677 ASSERT ((Table
!= NULL
) && (*Table
!= NULL
));
678 return EFI_INVALID_PARAMETER
;
686 /** This macro defines the GTDT Table Generator revision.
688 #define GTDT_GENERATOR_REVISION CREATE_REVISION (1, 0)
690 /** The interface for the GTDT Table Generator.
694 ACPI_TABLE_GENERATOR GtdtGenerator
= {
696 CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdGtdt
),
697 // Generator Description
698 L
"ACPI.STD.GTDT.GENERATOR",
699 // ACPI Table Signature
700 EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE
,
701 // ACPI Table Revision supported by this Generator
702 EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION
,
703 // Minimum ACPI Table Revision supported by this Generator
704 EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION
,
706 TABLE_GENERATOR_CREATOR_ID_ARM
,
708 GTDT_GENERATOR_REVISION
,
709 // Build Table function
711 // Free Resource function
712 FreeGtdtTableResources
,
713 // Extended build function not needed
715 // Extended build function not implemented by the generator.
716 // Hence extended free resource function is not required.
720 /** Register the Generator with the ACPI Table Factory.
722 @param [in] ImageHandle The handle to the image.
723 @param [in] SystemTable Pointer to the System Table.
725 @retval EFI_SUCCESS The Generator is registered.
726 @retval EFI_INVALID_PARAMETER A parameter is invalid.
727 @retval EFI_ALREADY_STARTED The Generator for the Table ID
728 is already registered.
732 AcpiGtdtLibConstructor (
733 IN CONST EFI_HANDLE ImageHandle
,
734 IN EFI_SYSTEM_TABLE
* CONST SystemTable
738 Status
= RegisterAcpiTableGenerator (&GtdtGenerator
);
739 DEBUG ((DEBUG_INFO
, "GTDT: Register Generator. Status = %r\n", Status
));
740 ASSERT_EFI_ERROR (Status
);
744 /** Deregister the Generator from the ACPI Table Factory.
746 @param [in] ImageHandle The handle to the image.
747 @param [in] SystemTable Pointer to the System Table.
749 @retval EFI_SUCCESS The Generator is deregistered.
750 @retval EFI_INVALID_PARAMETER A parameter is invalid.
751 @retval EFI_NOT_FOUND The Generator is not registered.
755 AcpiGtdtLibDestructor (
756 IN CONST EFI_HANDLE ImageHandle
,
757 IN EFI_SYSTEM_TABLE
* CONST SystemTable
761 Status
= DeregisterAcpiTableGenerator (&GtdtGenerator
);
762 DEBUG ((DEBUG_INFO
, "GTDT: Deregister Generator. Status = %r\n", Status
));
763 ASSERT_EFI_ERROR (Status
);