TianoCore EDK2 master
Loading...
Searching...
No Matches
MadtGenerator.c
Go to the documentation of this file.
1
12#include <Library/AcpiLib.h>
13#include <Library/DebugLib.h>
15#include <Protocol/AcpiTable.h>
16
17// Module specific include files.
18#include <AcpiTableGenerator.h>
23
43 );
44
53 );
54
62 );
63
72 );
73
82 );
83
92VOID
96 IN CONST UINT8 MadtRev
97 )
98{
99 ASSERT (Gicc != NULL);
100 ASSERT (GicCInfo != NULL);
101
102 // UINT8 Type
103 Gicc->Type = EFI_ACPI_6_5_GIC;
104 // UINT8 Length
105 Gicc->Length = sizeof (EFI_ACPI_6_5_GIC_STRUCTURE);
106 // UINT16 Reserved
107 Gicc->Reserved = EFI_ACPI_RESERVED_WORD;
108
109 // UINT32 CPUInterfaceNumber
110 Gicc->CPUInterfaceNumber = GicCInfo->CPUInterfaceNumber;
111 // UINT32 AcpiProcessorUid
112 Gicc->AcpiProcessorUid = GicCInfo->AcpiProcessorUid;
113 // UINT32 Flags
114 Gicc->Flags = GicCInfo->Flags;
115 // UINT32 ParkingProtocolVersion
116 Gicc->ParkingProtocolVersion = GicCInfo->ParkingProtocolVersion;
117 // UINT32 PerformanceInterruptGsiv
118 Gicc->PerformanceInterruptGsiv = GicCInfo->PerformanceInterruptGsiv;
119 // UINT64 ParkedAddress
120 Gicc->ParkedAddress = GicCInfo->ParkedAddress;
121
122 // UINT64 PhysicalBaseAddress
123 Gicc->PhysicalBaseAddress = GicCInfo->PhysicalBaseAddress;
124 // UINT64 GICV
125 Gicc->GICV = GicCInfo->GICV;
126 // UINT64 GICH
127 Gicc->GICH = GicCInfo->GICH;
128
129 // UINT32 VGICMaintenanceInterrupt
130 Gicc->VGICMaintenanceInterrupt = GicCInfo->VGICMaintenanceInterrupt;
131 // UINT64 GICRBaseAddress
132 Gicc->GICRBaseAddress = GicCInfo->GICRBaseAddress;
133
134 // UINT64 MPIDR
135 Gicc->MPIDR = GicCInfo->MPIDR;
136 // UINT8 ProcessorPowerEfficiencyClass
137 Gicc->ProcessorPowerEfficiencyClass =
138 GicCInfo->ProcessorPowerEfficiencyClass;
139 // UINT8 Reserved2
140 Gicc->Reserved2 = EFI_ACPI_RESERVED_BYTE;
141
142 // UINT16 SpeOverflowInterrupt
144 Gicc->SpeOverflowInterrupt = GicCInfo->SpeOverflowInterrupt;
145 } else {
146 // Setting SpeOverflowInterrupt to 0 ensures backward compatibility with
147 // ACPI 6.2 by also clearing the Reserved2[1] and Reserved2[2] fields
148 // in EFI_ACPI_6_2_GIC_STRUCTURE.
149 Gicc->SpeOverflowInterrupt = 0;
150 }
151
152 // UINT16 TrbeInterrupt
154 Gicc->TrbeInterrupt = GicCInfo->TrbeInterrupt;
155 }
156}
157
172BOOLEAN
173EFIAPI
175 IN CONST VOID *GicCInfo1,
176 IN CONST VOID *GicCInfo2,
177 IN UINTN Index1,
178 IN UINTN Index2
179 )
180{
181 UINT32 Uid1;
182 UINT32 Uid2;
183
184 ASSERT ((GicCInfo1 != NULL) && (GicCInfo2 != NULL));
185
186 Uid1 = ((CM_ARM_GICC_INFO *)GicCInfo1)->AcpiProcessorUid;
187 Uid2 = ((CM_ARM_GICC_INFO *)GicCInfo2)->AcpiProcessorUid;
188
189 if (Uid1 == Uid2) {
190 DEBUG ((
191 DEBUG_ERROR,
192 "ERROR: MADT: GICC Info Structures %d and %d have the same ACPI " \
193 "Processor UID: 0x%x.\n",
194 Index1,
195 Index2,
196 Uid1
197 ));
198 return TRUE;
199 }
200
201 return FALSE;
202}
203
219STATIC
223 IN CONST CM_ARM_GICC_INFO *GicCInfo,
224 IN UINT32 GicCCount,
225 IN CONST UINT8 MadtRev
226 )
227{
228 BOOLEAN IsAcpiProcUidDuplicated;
229
230 ASSERT (Gicc != NULL);
231 ASSERT (GicCInfo != NULL);
232
233 IsAcpiProcUidDuplicated = FindDuplicateValue (
234 GicCInfo,
235 GicCCount,
236 sizeof (CM_ARM_GICC_INFO),
238 );
239 // Duplicate ACPI Processor UID was found so the GICC info provided
240 // is invalid
241 if (IsAcpiProcUidDuplicated) {
242 return EFI_INVALID_PARAMETER;
243 }
244
245 while (GicCCount-- != 0) {
246 AddGICC (Gicc++, GicCInfo++, MadtRev);
247 }
248
249 return EFI_SUCCESS;
250}
251
257STATIC
258VOID
262 )
263{
264 ASSERT (Gicd != NULL);
265 ASSERT (GicDInfo != NULL);
266
267 // UINT8 Type
268 Gicd->Type = EFI_ACPI_6_5_GICD;
269 // UINT8 Length
270 Gicd->Length = sizeof (EFI_ACPI_6_5_GIC_DISTRIBUTOR_STRUCTURE);
271 // UINT16 Reserved
272 Gicd->Reserved1 = EFI_ACPI_RESERVED_WORD;
273 // UINT32 Identifier
274 // One, and only one, GIC distributor structure must be present
275 // in the MADT for an ARM based system
276 Gicd->GicId = 0;
277 // UINT64 PhysicalBaseAddress
278 Gicd->PhysicalBaseAddress = GicDInfo->PhysicalBaseAddress;
279 // UINT32 VectorBase
280 Gicd->SystemVectorBase = EFI_ACPI_RESERVED_DWORD;
281 // UINT8 GicVersion
282 Gicd->GicVersion = GicDInfo->GicVersion;
283 // UINT8 Reserved2[3]
284 Gicd->Reserved2[0] = EFI_ACPI_RESERVED_BYTE;
285 Gicd->Reserved2[1] = EFI_ACPI_RESERVED_BYTE;
286 Gicd->Reserved2[2] = EFI_ACPI_RESERVED_BYTE;
287}
288
294STATIC
295VOID
298 IN CONST CM_ARM_GIC_MSI_FRAME_INFO *CONST GicMsiFrameInfo
299 )
300{
301 ASSERT (GicMsiFrame != NULL);
302 ASSERT (GicMsiFrameInfo != NULL);
303
304 GicMsiFrame->Type = EFI_ACPI_6_5_GIC_MSI_FRAME;
305 GicMsiFrame->Length = sizeof (EFI_ACPI_6_5_GIC_MSI_FRAME_STRUCTURE);
306 GicMsiFrame->Reserved1 = EFI_ACPI_RESERVED_WORD;
307 GicMsiFrame->GicMsiFrameId = GicMsiFrameInfo->GicMsiFrameId;
308 GicMsiFrame->PhysicalBaseAddress = GicMsiFrameInfo->PhysicalBaseAddress;
309
310 GicMsiFrame->Flags = GicMsiFrameInfo->Flags;
311 GicMsiFrame->SPICount = GicMsiFrameInfo->SPICount;
312 GicMsiFrame->SPIBase = GicMsiFrameInfo->SPIBase;
313}
314
321STATIC
322VOID
325 IN CONST CM_ARM_GIC_MSI_FRAME_INFO *GicMsiFrameInfo,
326 IN UINT32 GicMsiFrameCount
327 )
328{
329 ASSERT (GicMsiFrame != NULL);
330 ASSERT (GicMsiFrameInfo != NULL);
331
332 while (GicMsiFrameCount-- != 0) {
333 AddGICMsiFrame (GicMsiFrame++, GicMsiFrameInfo++);
334 }
335}
336
342STATIC
343VOID
346 IN CONST CM_ARM_GIC_REDIST_INFO *CONST GicRedistributorInfo
347 )
348{
349 ASSERT (Gicr != NULL);
350 ASSERT (GicRedistributorInfo != NULL);
351
352 Gicr->Type = EFI_ACPI_6_5_GICR;
353 Gicr->Length = sizeof (EFI_ACPI_6_5_GICR_STRUCTURE);
354 Gicr->Reserved = EFI_ACPI_RESERVED_WORD;
355 Gicr->DiscoveryRangeBaseAddress =
356 GicRedistributorInfo->DiscoveryRangeBaseAddress;
357 Gicr->DiscoveryRangeLength = GicRedistributorInfo->DiscoveryRangeLength;
358}
359
366STATIC
367VOID
371 IN UINT32 GicRCount
372 )
373{
374 ASSERT (Gicr != NULL);
375 ASSERT (GicRInfo != NULL);
376
377 while (GicRCount-- != 0) {
378 AddGICRedistributor (Gicr++, GicRInfo++);
379 }
380}
381
387STATIC
388VOID
392 )
393{
394 ASSERT (GicIts != NULL);
395 ASSERT (GicItsInfo != NULL);
396
397 GicIts->Type = EFI_ACPI_6_5_GIC_ITS;
398 GicIts->Length = sizeof (EFI_ACPI_6_5_GIC_ITS_STRUCTURE);
399 GicIts->Reserved = EFI_ACPI_RESERVED_WORD;
400 GicIts->GicItsId = GicItsInfo->GicItsId;
401 GicIts->PhysicalBaseAddress = GicItsInfo->PhysicalBaseAddress;
402 GicIts->Reserved2 = EFI_ACPI_RESERVED_DWORD;
403}
404
412STATIC
413VOID
416 IN CONST CM_ARM_GIC_ITS_INFO *GicItsInfo,
417 IN UINT32 GicItsCount
418 )
419{
420 ASSERT (GicIts != NULL);
421 ASSERT (GicItsInfo != NULL);
422
423 while (GicItsCount-- != 0) {
424 AddGICInterruptTranslationService (GicIts++, GicItsInfo++);
425 }
426}
427
450STATIC
452EFIAPI
458 )
459{
460 EFI_STATUS Status;
461 UINT32 TableSize;
462 UINT32 GicCCount;
463 UINT32 GicDCount;
464 UINT32 GicMSICount;
465 UINT32 GicRedistCount;
466 UINT32 GicItsCount;
467 CM_ARM_GICC_INFO *GicCInfo;
468 CM_ARM_GICD_INFO *GicDInfo;
469 CM_ARM_GIC_MSI_FRAME_INFO *GicMSIInfo;
470 CM_ARM_GIC_REDIST_INFO *GicRedistInfo;
471 CM_ARM_GIC_ITS_INFO *GicItsInfo;
472 UINT32 GicCOffset;
473 UINT32 GicDOffset;
474 UINT32 GicMSIOffset;
475 UINT32 GicRedistOffset;
476 UINT32 GicItsOffset;
477
479
480 ASSERT (This != NULL);
481 ASSERT (AcpiTableInfo != NULL);
482 ASSERT (CfgMgrProtocol != NULL);
483 ASSERT (Table != NULL);
484 ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
485 ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
486
487 if ((AcpiTableInfo->AcpiTableRevision < This->MinAcpiTableRevision) ||
488 (AcpiTableInfo->AcpiTableRevision > This->AcpiTableRevision))
489 {
490 DEBUG ((
491 DEBUG_ERROR,
492 "ERROR: MADT: Requested table revision = %d, is not supported."
493 "Supported table revision: Minimum = %d, Maximum = %d\n",
494 AcpiTableInfo->AcpiTableRevision,
495 This->MinAcpiTableRevision,
496 This->AcpiTableRevision
497 ));
498 return EFI_INVALID_PARAMETER;
499 }
500
501 *Table = NULL;
502
503 Status = GetEArmObjGicCInfo (
504 CfgMgrProtocol,
506 &GicCInfo,
507 &GicCCount
508 );
509 if (EFI_ERROR (Status)) {
510 DEBUG ((
511 DEBUG_ERROR,
512 "ERROR: MADT: Failed to get GICC Info. Status = %r\n",
513 Status
514 ));
515 goto error_handler;
516 }
517
518 if (GicCCount == 0) {
519 DEBUG ((
520 DEBUG_ERROR,
521 "ERROR: MADT: GIC CPU Interface information not provided.\n"
522 ));
523 ASSERT (GicCCount != 0);
524 Status = EFI_INVALID_PARAMETER;
525 goto error_handler;
526 }
527
528 Status = GetEArmObjGicDInfo (
529 CfgMgrProtocol,
531 &GicDInfo,
532 &GicDCount
533 );
534 if (EFI_ERROR (Status)) {
535 DEBUG ((
536 DEBUG_ERROR,
537 "ERROR: MADT: Failed to get GICD Info. Status = %r\n",
538 Status
539 ));
540 goto error_handler;
541 }
542
543 if (GicDCount == 0) {
544 DEBUG ((
545 DEBUG_ERROR,
546 "ERROR: MADT: GIC Distributor information not provided.\n"
547 ));
548 ASSERT (GicDCount != 0);
549 Status = EFI_INVALID_PARAMETER;
550 goto error_handler;
551 }
552
553 if (GicDCount > 1) {
554 DEBUG ((
555 DEBUG_ERROR,
556 "ERROR: MADT: One, and only one, GIC distributor must be present."
557 "GicDCount = %d\n",
558 GicDCount
559 ));
560 ASSERT (GicDCount <= 1);
561 Status = EFI_INVALID_PARAMETER;
562 goto error_handler;
563 }
564
565 Status = GetEArmObjGicMsiFrameInfo (
566 CfgMgrProtocol,
568 &GicMSIInfo,
569 &GicMSICount
570 );
571 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
572 DEBUG ((
573 DEBUG_ERROR,
574 "ERROR: MADT: Failed to get GIC MSI Info. Status = %r\n",
575 Status
576 ));
577 goto error_handler;
578 }
579
580 Status = GetEArmObjGicRedistributorInfo (
581 CfgMgrProtocol,
583 &GicRedistInfo,
584 &GicRedistCount
585 );
586 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
587 DEBUG ((
588 DEBUG_ERROR,
589 "ERROR: MADT: Failed to get GIC Redistributor Info. Status = %r\n",
590 Status
591 ));
592 goto error_handler;
593 }
594
595 Status = GetEArmObjGicItsInfo (
596 CfgMgrProtocol,
598 &GicItsInfo,
599 &GicItsCount
600 );
601 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
602 DEBUG ((
603 DEBUG_ERROR,
604 "ERROR: MADT: Failed to get GIC ITS Info. Status = %r\n",
605 Status
606 ));
607 goto error_handler;
608 }
609
611
612 GicCOffset = TableSize;
613 TableSize += (sizeof (EFI_ACPI_6_5_GIC_STRUCTURE) * GicCCount);
614
615 GicDOffset = TableSize;
616 TableSize += (sizeof (EFI_ACPI_6_5_GIC_DISTRIBUTOR_STRUCTURE) * GicDCount);
617
618 GicMSIOffset = TableSize;
619 TableSize += (sizeof (EFI_ACPI_6_5_GIC_MSI_FRAME_STRUCTURE) * GicMSICount);
620
621 GicRedistOffset = TableSize;
622 TableSize += (sizeof (EFI_ACPI_6_5_GICR_STRUCTURE) * GicRedistCount);
623
624 GicItsOffset = TableSize;
625 TableSize += (sizeof (EFI_ACPI_6_5_GIC_ITS_STRUCTURE) * GicItsCount);
626
627 // Allocate the Buffer for MADT table
628 *Table = (EFI_ACPI_DESCRIPTION_HEADER *)AllocateZeroPool (TableSize);
629 if (*Table == NULL) {
630 Status = EFI_OUT_OF_RESOURCES;
631 DEBUG ((
632 DEBUG_ERROR,
633 "ERROR: MADT: Failed to allocate memory for MADT Table, Size = %d," \
634 " Status = %r\n",
635 TableSize,
636 Status
637 ));
638 goto error_handler;
639 }
640
642
643 DEBUG ((
644 DEBUG_INFO,
645 "MADT: Madt = 0x%p TableSize = 0x%x\n",
646 Madt,
647 TableSize
648 ));
649
650 Status = AddAcpiHeader (
651 CfgMgrProtocol,
652 This,
653 &Madt->Header,
654 AcpiTableInfo,
655 TableSize
656 );
657 if (EFI_ERROR (Status)) {
658 DEBUG ((
659 DEBUG_ERROR,
660 "ERROR: MADT: Failed to add ACPI header. Status = %r\n",
661 Status
662 ));
663 goto error_handler;
664 }
665
666 Status = AddGICCList (
667 (EFI_ACPI_6_5_GIC_STRUCTURE *)((UINT8 *)Madt + GicCOffset),
668 GicCInfo,
669 GicCCount,
670 Madt->Header.Revision
671 );
672 if (EFI_ERROR (Status)) {
673 DEBUG ((
674 DEBUG_ERROR,
675 "ERROR: MADT: Failed to add GICC structures. Status = %r\n",
676 Status
677 ));
678 goto error_handler;
679 }
680
681 AddGICD (
682 (EFI_ACPI_6_5_GIC_DISTRIBUTOR_STRUCTURE *)((UINT8 *)Madt + GicDOffset),
683 GicDInfo
684 );
685
686 if (GicMSICount != 0) {
688 (EFI_ACPI_6_5_GIC_MSI_FRAME_STRUCTURE *)((UINT8 *)Madt + GicMSIOffset),
689 GicMSIInfo,
690 GicMSICount
691 );
692 }
693
694 if (GicRedistCount != 0) {
696 (EFI_ACPI_6_5_GICR_STRUCTURE *)((UINT8 *)Madt + GicRedistOffset),
697 GicRedistInfo,
698 GicRedistCount
699 );
700 }
701
702 if (GicItsCount != 0) {
704 (EFI_ACPI_6_5_GIC_ITS_STRUCTURE *)((UINT8 *)Madt + GicItsOffset),
705 GicItsInfo,
706 GicItsCount
707 );
708 }
709
710 return EFI_SUCCESS;
711
712error_handler:
713 if (*Table != NULL) {
714 FreePool (*Table);
715 *Table = NULL;
716 }
717
718 return Status;
719}
720
732STATIC
739 )
740{
741 ASSERT (This != NULL);
742 ASSERT (AcpiTableInfo != NULL);
743 ASSERT (CfgMgrProtocol != NULL);
744 ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
745 ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
746
747 if ((Table == NULL) || (*Table == NULL)) {
748 DEBUG ((DEBUG_ERROR, "ERROR: MADT: Invalid Table Pointer\n"));
749 ASSERT ((Table != NULL) && (*Table != NULL));
750 return EFI_INVALID_PARAMETER;
751 }
752
753 FreePool (*Table);
754 *Table = NULL;
755 return EFI_SUCCESS;
756}
757
760#define MADT_GENERATOR_REVISION CREATE_REVISION (1, 0)
761
764STATIC
765CONST
767 // Generator ID
769 // Generator Description
770 L"ACPI.STD.MADT.GENERATOR",
771 // ACPI Table Signature
773 // ACPI Table Revision supported by this Generator
775 // Minimum supported ACPI Table Revision
777 // Creator ID
779 // Creator Revision
781 // Build Table function
783 // Free Resource function
785 // Extended build function not needed
786 NULL,
787 // Extended build function not implemented by the generator.
788 // Hence extended free resource function is not required.
789 NULL
790};
791
803EFIAPI
805 IN EFI_HANDLE ImageHandle,
806 IN EFI_SYSTEM_TABLE *SystemTable
807 )
808{
809 EFI_STATUS Status;
810
812 DEBUG ((DEBUG_INFO, "MADT: Register Generator. Status = %r\n", Status));
813 ASSERT_EFI_ERROR (Status);
814 return Status;
815}
816
827EFIAPI
829 IN EFI_HANDLE ImageHandle,
830 IN EFI_SYSTEM_TABLE *SystemTable
831 )
832{
833 EFI_STATUS Status;
834
836 DEBUG ((DEBUG_INFO, "MADT: Deregister Generator. Status = %r\n", Status));
837 ASSERT_EFI_ERROR (Status);
838 return Status;
839}
UINT64 UINTN
#define EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
Definition: Acpi62.h:397
#define EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
Definition: Acpi64.h:305
#define EFI_ACPI_6_5_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE
Definition: Acpi65.h:3027
#define EFI_ACPI_6_5_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
Definition: Acpi65.h:307
EFI_STATUS EFIAPI RegisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
EFI_STATUS EFIAPI DeregisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
#define TABLE_GENERATOR_CREATOR_ID_ARM
#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId)
@ EStdAcpiTableIdMadt
MADT Generator.
@ EArmObjGicCInfo
2 - GIC CPU Interface Info
@ EArmObjGicMsiFrameInfo
4 - GIC MSI Frame Info
@ EArmObjGicItsInfo
6 - GIC ITS Info
@ EArmObjGicRedistributorInfo
5 - GIC Redistributor Info
@ EArmObjGicDInfo
3 - GIC Distributor Info
#define GET_OBJECT_LIST(CmObjectNameSpace, CmObjectId, Type)
@ EObjNameSpaceArm
ARM Objects Namespace.
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
STATIC VOID AddGICMsiFrame(IN EFI_ACPI_6_5_GIC_MSI_FRAME_STRUCTURE *CONST GicMsiFrame, IN CONST CM_ARM_GIC_MSI_FRAME_INFO *CONST GicMsiFrameInfo)
STATIC VOID AddGICRedistributor(IN EFI_ACPI_6_5_GICR_STRUCTURE *CONST Gicr, IN CONST CM_ARM_GIC_REDIST_INFO *CONST GicRedistributorInfo)
STATIC VOID AddGICInterruptTranslationService(IN EFI_ACPI_6_5_GIC_ITS_STRUCTURE *CONST GicIts, IN CONST CM_ARM_GIC_ITS_INFO *CONST GicItsInfo)
STATIC VOID AddGICRedistributorList(IN EFI_ACPI_6_5_GICR_STRUCTURE *Gicr, IN CONST CM_ARM_GIC_REDIST_INFO *GicRInfo, IN UINT32 GicRCount)
STATIC VOID AddGICMsiFrameInfoList(IN EFI_ACPI_6_5_GIC_MSI_FRAME_STRUCTURE *GicMsiFrame, IN CONST CM_ARM_GIC_MSI_FRAME_INFO *GicMsiFrameInfo, IN UINT32 GicMsiFrameCount)
BOOLEAN EFIAPI IsAcpiUidEqual(IN CONST VOID *GicCInfo1, IN CONST VOID *GicCInfo2, IN UINTN Index1, IN UINTN Index2)
STATIC VOID AddGICD(EFI_ACPI_6_5_GIC_DISTRIBUTOR_STRUCTURE *CONST Gicd, CONST CM_ARM_GICD_INFO *CONST GicDInfo)
STATIC EFI_STATUS EFIAPI BuildMadtTable(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)
STATIC EFI_STATUS FreeMadtTableResources(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 AcpiMadtLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC VOID AddGICItsList(IN EFI_ACPI_6_5_GIC_ITS_STRUCTURE *GicIts, IN CONST CM_ARM_GIC_ITS_INFO *GicItsInfo, IN UINT32 GicItsCount)
STATIC VOID AddGICC(IN EFI_ACPI_6_5_GIC_STRUCTURE *CONST Gicc, IN CONST CM_ARM_GICC_INFO *CONST GicCInfo, IN CONST UINT8 MadtRev)
Definition: MadtGenerator.c:93
#define MADT_GENERATOR_REVISION
EFI_STATUS EFIAPI AcpiMadtLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC CONST ACPI_TABLE_GENERATOR MadtGenerator
STATIC EFI_STATUS AddGICCList(IN EFI_ACPI_6_5_GIC_STRUCTURE *Gicc, IN CONST CM_ARM_GICC_INFO *GicCInfo, IN UINT32 GicCCount, IN CONST UINT8 MadtRev)
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define STATIC
Definition: Base.h:264
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#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
#define CM_NULL_TOKEN
EFI_STATUS EFIAPI AddAcpiHeader(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN OUT EFI_ACPI_DESCRIPTION_HEADER *CONST AcpiHeader, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST UINT32 Length)
Definition: TableHelper.c:114
BOOLEAN EFIAPI FindDuplicateValue(IN CONST VOID *Array, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN PFN_IS_EQUAL EqualTestFunction)
Definition: TableHelper.c:299
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112