TianoCore EDK2 master
Loading...
Searching...
No Matches
ConfigurationManager.c
Go to the documentation of this file.
1
18#include <Library/DebugLib.h>
20#include <Library/HobLib.h>
22#include <Library/IoLib.h>
23#include <Library/PcdLib.h>
26#include <Protocol/AcpiTable.h>
28
30
31//
32// The platform configuration repository information.
33//
35EDKII_PLATFORM_REPOSITORY_INFO mKvmtoolPlatRepositoryInfo = {
36 //
37 // Configuration Manager information
38 //
40
41 //
42 // ACPI Table List
43 //
44 {
45 //
46 // FADT Table
47 //
48 {
52 NULL
53 },
54 //
55 // GTDT Table
56 //
57 {
61 NULL
62 },
63 //
64 // MADT Table
65 //
66 {
70 NULL
71 },
72 //
73 // SPCR Table
74 //
75 {
79 NULL
80 },
81 //
82 // DSDT Table
83 //
84 {
86 0, // Unused
89 },
90 //
91 // SSDT Cpu Hierarchy Table
92 //
93 {
95 0, // Unused
97 NULL
98 },
99 //
100 // DBG2 Table
101 //
102 {
104 EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION,
106 NULL
107 },
108 //
109 // PCI MCFG Table
110 //
111 {
115 NULL
116 },
117 //
118 // SSDT table describing the PCI root complex
119 //
120 {
122 0, // Unused
124 NULL
125 },
126 //
127 // IORT Table
128 //
129 {
131 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00,
133 NULL
134 },
135 },
136
137 //
138 // Power management profile information
139 //
140 { EFI_ACPI_6_3_PM_PROFILE_ENTERPRISE_SERVER }, // PowerManagement Profile
141
142 //
143 // ITS group node
144 //
145 {
146 //
147 // Reference token for this Iort node
148 //
149 REFERENCE_TOKEN (ItsGroupInfo),
150 //
151 // The number of ITS identifiers in the ITS node.
152 //
153 1,
154 //
155 // Reference token for the ITS identifier array
156 //
157 REFERENCE_TOKEN (ItsIdentifierArray)
158 },
159
160 //
161 // ITS identifier array
162 //
163 {
164 { 0 }, // The ITS Identifier
165 },
166
167 //
168 // Root Complex node info
169 //
170 {
171 //
172 // Reference token for this Iort node
173 //
174 REFERENCE_TOKEN (RootComplexInfo),
175 //
176 // Number of ID mappings
177 //
178 1,
179 //
180 // Reference token for the ID mapping array
181 //
182 REFERENCE_TOKEN (DeviceIdMapping[0]),
183 //
184 // Memory access properties : Cache coherent attributes
185 //
186 EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA,
187 //
188 // Memory access properties : Allocation hints
189 //
190 0,
191 //
192 // Memory access properties : Memory access flags
193 //
194 0,
195 //
196 // ATS attributes
197 //
198 EFI_ACPI_IORT_ROOT_COMPLEX_ATS_UNSUPPORTED,
199 //
200 // PCI segment number
201 //
202 0,
207 },
208
209 //
210 // Array of Device ID mappings
211 //
212 {
213 //
214 // Device ID mapping for Root complex node
215 // RootComplex -> ITS Group
216 //
217 {
218 //
219 // Input base
220 //
221 0x0,
222 //
223 // Number of input IDs
224 //
225 0x0000FFFF,
226 //
227 // Output Base
228 //
229 0x0,
230 //
231 // Output reference
232 //
233 REFERENCE_TOKEN (ItsGroupInfo),
234 //
235 // Flags
236 //
237 0
238 },
239 },
240};
241
254STATIC
256EFIAPI
258 IN CONST CM_OBJECT_ID CmObjectId,
259 IN VOID *Object,
260 IN CONST UINTN ObjectSize,
261 IN CONST UINTN ObjectCount,
262 IN OUT CM_OBJ_DESCRIPTOR *CONST CmObjectDesc
263 )
264{
265 CmObjectDesc->ObjectId = CmObjectId;
266 CmObjectDesc->Size = ObjectSize;
267 CmObjectDesc->Data = Object;
268 CmObjectDesc->Count = ObjectCount;
269 DEBUG ((
270 DEBUG_INFO,
271 "INFO: CmObjectId = " FMT_CM_OBJECT_ID ", "
272 "Ptr = 0x%p, Size = %lu, Count = %lu\n",
273 CmObjectId,
274 CmObjectDesc->Data,
275 CmObjectDesc->Size,
276 CmObjectDesc->Count
277 ));
278 return EFI_SUCCESS;
279}
280
300STATIC
302EFIAPI
305 IN CONST CM_OBJECT_ID CmObjectId,
306 IN VOID *Object,
307 IN CONST UINTN ObjectSize,
308 IN CONST UINTN ObjectCount,
310 IN CONST CM_OBJECT_HANDLER_PROC HandlerProc,
311 IN OUT CM_OBJ_DESCRIPTOR *CONST CmObjectDesc
312 )
313{
314 EFI_STATUS Status;
315
316 CmObjectDesc->ObjectId = CmObjectId;
317 if (Token == CM_NULL_TOKEN) {
318 CmObjectDesc->Size = ObjectSize;
319 CmObjectDesc->Data = Object;
320 CmObjectDesc->Count = ObjectCount;
321 Status = EFI_SUCCESS;
322 } else {
323 Status = HandlerProc (This, CmObjectId, Token, CmObjectDesc);
324 }
325
326 DEBUG ((
327 DEBUG_INFO,
328 "INFO: Token = 0x%p, CmObjectId = " FMT_CM_OBJECT_ID ", "
329 "Ptr = 0x%p, Size = %lu, Count = %lu\n",
330 (VOID *)Token,
331 CmObjectId,
332 CmObjectDesc->Data,
333 CmObjectDesc->Size,
334 CmObjectDesc->Count
335 ));
336 return Status;
337}
338
353EFIAPI
356 IN CONST CM_OBJECT_ID CmObjectId,
358 OUT CM_OBJ_DESCRIPTOR *CONST CmObject
359 )
360{
361 EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
362
363 if ((This == NULL) || (CmObject == NULL)) {
364 ASSERT (This != NULL);
365 ASSERT (CmObject != NULL);
366 return EFI_INVALID_PARAMETER;
367 }
368
369 PlatformRepo = This->PlatRepoInfo;
370
371 if (Token != (CM_OBJECT_TOKEN)&PlatformRepo->ItsIdentifierArray) {
372 return EFI_NOT_FOUND;
373 }
374
375 CmObject->ObjectId = CmObjectId;
376 CmObject->Size = sizeof (PlatformRepo->ItsIdentifierArray);
377 CmObject->Data = (VOID *)&PlatformRepo->ItsIdentifierArray;
378 CmObject->Count = ARRAY_SIZE (PlatformRepo->ItsIdentifierArray);
379 return EFI_SUCCESS;
380}
381
396EFIAPI
399 IN CONST CM_OBJECT_ID CmObjectId,
401 OUT CM_OBJ_DESCRIPTOR *CONST CmObject
402 )
403{
404 EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
405
406 if ((This == NULL) || (CmObject == NULL)) {
407 ASSERT (This != NULL);
408 ASSERT (CmObject != NULL);
409 return EFI_INVALID_PARAMETER;
410 }
411
412 PlatformRepo = This->PlatRepoInfo;
413
414 if (Token != (CM_OBJECT_TOKEN)&PlatformRepo->DeviceIdMapping[0]) {
415 return EFI_NOT_FOUND;
416 }
417
418 CmObject->ObjectId = CmObjectId;
419 CmObject->Size = sizeof (CM_ARM_ID_MAPPING);
420 CmObject->Data = (VOID *)Token;
421 CmObject->Count = 1;
422 return EFI_SUCCESS;
423}
424
443STATIC
445EFIAPI
447 IN HW_INFO_PARSER_HANDLE ParserHandle,
448 IN VOID *Context,
449 IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc,
450 OUT CM_OBJECT_TOKEN *Token OPTIONAL
451 )
452{
453 EFI_STATUS Status;
454 EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
455
456 if ((ParserHandle == NULL) ||
457 (Context == NULL) ||
458 (CmObjDesc == NULL))
459 {
460 ASSERT (ParserHandle != NULL);
461 ASSERT (Context != NULL);
462 ASSERT (CmObjDesc != NULL);
463 return EFI_INVALID_PARAMETER;
464 }
465
466 PlatformRepo = (EDKII_PLATFORM_REPOSITORY_INFO *)Context;
467
469 //
470 // Print the received objects.
471 //
472 ParseCmObjDesc (CmObjDesc);
474
475 Status = DynPlatRepoAddObject (
476 PlatformRepo->DynamicPlatformRepo,
477 CmObjDesc,
478 Token
479 );
480 if (EFI_ERROR (Status)) {
481 ASSERT_EFI_ERROR (Status);
482 }
483
484 return Status;
485}
486
495STATIC
497EFIAPI
500 )
501{
502 EFI_STATUS Status;
503 EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
504
505 if (This == NULL) {
506 ASSERT (This != NULL);
507 return EFI_INVALID_PARAMETER;
508 }
509
510 PlatformRepo = This->PlatRepoInfo;
511
512 //
513 // Shutdown the dynamic repo and free all objects.
514 //
515 Status = DynamicPlatRepoShutdown (PlatformRepo->DynamicPlatformRepo);
516 if (EFI_ERROR (Status)) {
517 ASSERT_EFI_ERROR (Status);
518 return Status;
519 }
520
521 //
522 // Shutdown parser.
523 //
524 Status = HwInfoParserShutdown (PlatformRepo->FdtParserHandle);
525 if (EFI_ERROR (Status)) {
526 ASSERT_EFI_ERROR (Status);
527 }
528
529 return Status;
530}
531
541STATIC
543EFIAPI
546 )
547{
548 EFI_STATUS Status;
549 EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
550 VOID *Hob;
551
552 if (This == NULL) {
553 ASSERT (This != NULL);
554 return EFI_INVALID_PARAMETER;
555 }
556
557 Hob = GetFirstGuidHob (&gFdtHobGuid);
558 if ((Hob == NULL) || (GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64))) {
559 ASSERT (FALSE);
560 ASSERT (GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64));
561 return EFI_NOT_FOUND;
562 }
563
564 PlatformRepo = This->PlatRepoInfo;
565 PlatformRepo->FdtBase = (VOID *)*(UINTN *)GET_GUID_HOB_DATA (Hob);
566
567 //
568 // Initialise the dynamic platform repository.
569 //
570 Status = DynamicPlatRepoInit (&PlatformRepo->DynamicPlatformRepo);
571 if (EFI_ERROR (Status)) {
572 ASSERT_EFI_ERROR (Status);
573 return Status;
574 }
575
576 //
577 // Initialise the FDT parser
578 //
579 Status = HwInfoParserInit (
580 PlatformRepo->FdtBase,
581 PlatformRepo,
582 HwInfoAdd,
583 &PlatformRepo->FdtParserHandle
584 );
585 if (EFI_ERROR (Status)) {
586 ASSERT_EFI_ERROR (Status);
587 goto ErrorHandler;
588 }
589
590 Status = HwInfoParse (PlatformRepo->FdtParserHandle);
591 if (EFI_ERROR (Status)) {
592 ASSERT_EFI_ERROR (Status);
593 goto ErrorHandler;
594 }
595
596 Status = DynamicPlatRepoFinalise (PlatformRepo->DynamicPlatformRepo);
597 if (EFI_ERROR (Status)) {
598 ASSERT_EFI_ERROR (Status);
599 goto ErrorHandler;
600 }
601
602 return EFI_SUCCESS;
603
604ErrorHandler:
606 return Status;
607}
608
624EFIAPI
627 IN CONST CM_OBJECT_ID CmObjectId,
628 IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
629 IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
630 )
631{
632 EFI_STATUS Status;
633 EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
634 UINTN AcpiTableCount;
635 CM_OBJ_DESCRIPTOR CmObjDesc;
636
637 if ((This == NULL) || (CmObject == NULL)) {
638 ASSERT (This != NULL);
639 ASSERT (CmObject != NULL);
640 return EFI_INVALID_PARAMETER;
641 }
642
643 Status = EFI_NOT_FOUND;
644 PlatformRepo = This->PlatRepoInfo;
645
646 switch (GET_CM_OBJECT_ID (CmObjectId)) {
648 Status = HandleCmObject (
649 CmObjectId,
650 &PlatformRepo->CmInfo,
651 sizeof (PlatformRepo->CmInfo),
652 1,
653 CmObject
654 );
655 break;
656
658 AcpiTableCount = ARRAY_SIZE (PlatformRepo->CmAcpiTableList);
659
660 //
661 // Get Pci config space information.
662 //
663 Status = DynamicPlatRepoGetObject (
664 PlatformRepo->DynamicPlatformRepo,
667 ),
669 &CmObjDesc
670 );
671 if (Status == EFI_NOT_FOUND) {
672 //
673 // The last 3 tables are for PCIe. If PCIe information is not
674 // present, Kvmtool was launched without the PCIe option.
675 // Therefore, reduce the table count by 3.
676 //
677 AcpiTableCount -= 3;
678 } else if (EFI_ERROR (Status)) {
679 ASSERT_EFI_ERROR (Status);
680 return Status;
681 }
682
683 //
684 // Get the Gic version.
685 //
686 Status = DynamicPlatRepoGetObject (
687 PlatformRepo->DynamicPlatformRepo,
690 &CmObjDesc
691 );
692 if (EFI_ERROR (Status)) {
693 ASSERT_EFI_ERROR (Status);
694 return Status;
695 }
696
697 if (((CM_ARM_GICD_INFO *)CmObjDesc.Data)->GicVersion < 3) {
698 //
699 // IORT is only required for GicV3/4
700 //
701 AcpiTableCount -= 1;
702 }
703
704 Status = HandleCmObject (
705 CmObjectId,
706 PlatformRepo->CmAcpiTableList,
707 (sizeof (PlatformRepo->CmAcpiTableList[0]) * AcpiTableCount),
708 AcpiTableCount,
709 CmObject
710 );
711 break;
712
713 default:
714 Status = EFI_NOT_FOUND;
715 DEBUG ((
716 DEBUG_ERROR,
717 "ERROR: CmObjectId " FMT_CM_OBJECT_ID ". Status = %r\n",
718 CmObjectId,
719 Status
720 ));
721 break;
722 }
723
724 return Status;
725}
726
742EFIAPI
745 IN CONST CM_OBJECT_ID CmObjectId,
746 IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
747 IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
748 )
749{
750 EFI_STATUS Status;
751 EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
752
753 if ((This == NULL) || (CmObject == NULL)) {
754 ASSERT (This != NULL);
755 ASSERT (CmObject != NULL);
756 return EFI_INVALID_PARAMETER;
757 }
758
759 Status = EFI_NOT_FOUND;
760 PlatformRepo = This->PlatRepoInfo;
761
762 //
763 // First check among the static objects.
764 //
765 switch (GET_CM_OBJECT_ID (CmObjectId)) {
767 Status = HandleCmObject (
768 CmObjectId,
769 &PlatformRepo->PmProfileInfo,
770 sizeof (PlatformRepo->PmProfileInfo),
771 1,
772 CmObject
773 );
774 break;
775
776 default:
777 //
778 // No match found among the static objects.
779 // Check the dynamic objects.
780 //
781 Status = DynamicPlatRepoGetObject (
782 PlatformRepo->DynamicPlatformRepo,
783 CmObjectId,
784 Token,
785 CmObject
786 );
787 break;
788 } // switch
789
790 if (Status == EFI_NOT_FOUND) {
791 DEBUG ((
792 DEBUG_INFO,
793 "INFO: CmObjectId " FMT_CM_OBJECT_ID ". Status = %r\n",
794 CmObjectId,
795 Status
796 ));
797 } else {
798 ASSERT_EFI_ERROR (Status);
799 }
800
801 return Status;
802}
803
819EFIAPI
822 IN CONST CM_OBJECT_ID CmObjectId,
823 IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
824 IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
825 )
826{
827 EFI_STATUS Status;
828 EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
829
830 if ((This == NULL) || (CmObject == NULL)) {
831 ASSERT (This != NULL);
832 ASSERT (CmObject != NULL);
833 return EFI_INVALID_PARAMETER;
834 }
835
836 Status = EFI_NOT_FOUND;
837 PlatformRepo = This->PlatRepoInfo;
838
839 //
840 // First check among the static objects.
841 //
842 switch (GET_CM_OBJECT_ID (CmObjectId)) {
843 case EArmObjItsGroup:
844 Status = HandleCmObject (
845 CmObjectId,
846 &PlatformRepo->ItsGroupInfo,
847 sizeof (PlatformRepo->ItsGroupInfo),
848 1,
849 CmObject
850 );
851 break;
852
854 Status = HandleCmObjectRefByToken (
855 This,
856 CmObjectId,
857 PlatformRepo->ItsIdentifierArray,
858 sizeof (PlatformRepo->ItsIdentifierArray),
859 ARRAY_SIZE (PlatformRepo->ItsIdentifierArray),
860 Token,
862 CmObject
863 );
864 break;
865
867 Status = HandleCmObject (
868 CmObjectId,
869 &PlatformRepo->RootComplexInfo,
870 sizeof (PlatformRepo->RootComplexInfo),
871 1,
872 CmObject
873 );
874 break;
875
877 Status = HandleCmObjectRefByToken (
878 This,
879 CmObjectId,
880 PlatformRepo->DeviceIdMapping,
881 sizeof (PlatformRepo->DeviceIdMapping),
882 ARRAY_SIZE (PlatformRepo->DeviceIdMapping),
883 Token,
885 CmObject
886 );
887 break;
888
889 default:
890 //
891 // No match found among the static objects.
892 // Check the dynamic objects.
893 //
894 Status = DynamicPlatRepoGetObject (
895 PlatformRepo->DynamicPlatformRepo,
896 CmObjectId,
897 Token,
898 CmObject
899 );
900 break;
901 } // switch
902
903 if (Status == EFI_NOT_FOUND) {
904 DEBUG ((
905 DEBUG_INFO,
906 "INFO: CmObjectId " FMT_CM_OBJECT_ID ". Status = %r\n",
907 CmObjectId,
908 Status
909 ));
910 } else {
911 ASSERT_EFI_ERROR (Status);
912 }
913
914 return Status;
915}
916
932EFIAPI
935 IN CONST CM_OBJECT_ID CmObjectId,
936 IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
937 IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
938 )
939{
940 EFI_STATUS Status;
941
942 Status = EFI_SUCCESS;
943 if ((This == NULL) || (CmObject == NULL)) {
944 ASSERT (This != NULL);
945 ASSERT (CmObject != NULL);
946 return EFI_INVALID_PARAMETER;
947 }
948
949 switch (GET_CM_OBJECT_ID (CmObjectId)) {
950 default:
951 Status = EFI_NOT_FOUND;
952 DEBUG ((
953 DEBUG_ERROR,
954 "ERROR: CmObjectId " FMT_CM_OBJECT_ID ". Status = %r\n",
955 CmObjectId,
956 Status
957 ));
958 break;
959 }
960
961 return Status;
962}
963
981EFIAPI
984 IN CONST CM_OBJECT_ID CmObjectId,
985 IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
986 IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
987 )
988{
989 EFI_STATUS Status;
990
991 if ((This == NULL) || (CmObject == NULL)) {
992 ASSERT (This != NULL);
993 ASSERT (CmObject != NULL);
994 return EFI_INVALID_PARAMETER;
995 }
996
997 switch (GET_CM_NAMESPACE_ID (CmObjectId)) {
999 Status = GetStandardNameSpaceObject (This, CmObjectId, Token, CmObject);
1000 break;
1002 Status = GetArchCommonNameSpaceObject (This, CmObjectId, Token, CmObject);
1003 break;
1004 case EObjNameSpaceArm:
1005 Status = GetArmNameSpaceObject (This, CmObjectId, Token, CmObject);
1006 break;
1007 case EObjNameSpaceOem:
1008 Status = GetOemNameSpaceObject (This, CmObjectId, Token, CmObject);
1009 break;
1010 default:
1011 Status = EFI_INVALID_PARAMETER;
1012 DEBUG ((
1013 DEBUG_ERROR,
1014 "ERROR: Unknown Namespace CmObjectId " FMT_CM_OBJECT_ID ". "
1015 "Status = %r\n",
1016 CmObjectId,
1017 Status
1018 ));
1019 break;
1020 }
1021
1022 return Status;
1023}
1024
1040EFIAPI
1043 IN CONST CM_OBJECT_ID CmObjectId,
1044 IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
1045 IN CM_OBJ_DESCRIPTOR *CONST CmObject
1046 )
1047{
1048 return EFI_UNSUPPORTED;
1049}
1050
1051//
1052// A structure describing the configuration manager protocol interface.
1053//
1054STATIC
1055CONST
1056EDKII_CONFIGURATION_MANAGER_PROTOCOL mKvmtoolPlatformConfigManagerProtocol = {
1057 CREATE_REVISION (1, 0),
1060 &mKvmtoolPlatRepositoryInfo
1061};
1062
1074EFIAPI
1076 IN EFI_HANDLE ImageHandle,
1077 IN EFI_SYSTEM_TABLE *SystemTable
1078 )
1079{
1080 EFI_STATUS Status;
1081
1082 Status = gBS->InstallProtocolInterface (
1083 &ImageHandle,
1086 (VOID *)&mKvmtoolPlatformConfigManagerProtocol
1087 );
1088 if (EFI_ERROR (Status)) {
1089 DEBUG ((
1090 DEBUG_ERROR,
1091 "ERROR: Failed to get Install Configuration Manager Protocol." \
1092 " Status = %r\n",
1093 Status
1094 ));
1095 return Status;
1096 }
1097
1099 &mKvmtoolPlatformConfigManagerProtocol
1100 );
1101 if (EFI_ERROR (Status)) {
1102 DEBUG ((
1103 DEBUG_ERROR,
1104 "ERROR: Failed to initialize the Platform Configuration Repository." \
1105 " Status = %r\n",
1106 Status
1107 ));
1108 goto ErrorHandler;
1109 }
1110
1111 return Status;
1112
1113ErrorHandler:
1114 gBS->UninstallProtocolInterface (
1115 &ImageHandle,
1117 (VOID *)&mKvmtoolPlatformConfigManagerProtocol
1118 );
1119 return Status;
1120}
1121
1131EFIAPI
1133 IN EFI_HANDLE ImageHandle
1134 )
1135{
1136 return CleanupPlatformRepository (&mKvmtoolPlatformConfigManagerProtocol);
1137}
UINT64 UINTN
#define EFI_ACPI_6_3_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE
Definition: Acpi63.h:2716
#define EFI_ACPI_6_3_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE
Definition: Acpi63.h:2936
#define EFI_ACPI_6_3_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE
Definition: Acpi63.h:2831
#define EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE
Definition: Acpi63.h:2736
#define EFI_ACPI_6_3_DEBUG_PORT_2_TABLE_SIGNATURE
Definition: Acpi63.h:2851
#define EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE
Definition: Acpi63.h:2751
#define EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
Definition: Acpi63.h:305
#define EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_REVISION
Definition: Acpi63.h:186
#define EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION
Definition: Acpi63.h:1366
#define EFI_ACPI_6_3_IO_REMAPPING_TABLE_SIGNATURE
Definition: Acpi63.h:2891
#define EFI_ACPI_6_3_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE
Definition: Acpi63.h:2906
#define EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE
Definition: Acpi63.h:2686
#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId)
@ EStdAcpiTableIdFadt
FADT Generator.
@ EStdAcpiTableIdSpcr
SPCR Generator.
@ EStdAcpiTableIdMadt
MADT Generator.
@ EStdAcpiTableIdDbg2
DBG2 Generator.
@ EStdAcpiTableIdIort
IORT Generator.
@ EStdAcpiTableIdSsdtCpuTopology
SSDT Cpu Topology.
@ EStdAcpiTableIdMcfg
MCFG Generator.
@ EStdAcpiTableIdGtdt
GTDT Generator.
@ EStdAcpiTableIdSsdtPciExpress
SSDT Pci Express Generator.
@ EStdAcpiTableIdDsdt
DSDT Generator.
@ EArchCommonObjPowerManagementProfileInfo
1 - Power Management Profile Info
@ EArchCommonObjPciConfigSpaceInfo
8 - PCI Configuration Space Info
@ EArmObjIdMappingArray
18 - ID Mapping Array
@ EArmObjItsGroup
11 - ITS Group
@ EArmObjGicDInfo
3 - GIC Distributor Info
@ EArmObjRootComplex
13 - Root Complex
@ EArmObjGicItsIdentifierArray
17 - GIC ITS Identifier Array
struct CmArmIdMapping CM_ARM_ID_MAPPING
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
Definition: HobLib.c:215
STATIC EFI_STATUS EFIAPI InitializePlatformRepository(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This)
EFI_STATUS EFIAPI ArmKvmtoolPlatformGetObject(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token OPTIONAL, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
EFI_STATUS EFIAPI GetStandardNameSpaceObject(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token OPTIONAL, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
EFI_STATUS EFIAPI ConfigurationManagerDxeInitialize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI GetItsIdentifierArray(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token, OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
EFI_STATUS EFIAPI GetDeviceIdMappingArray(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token, OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
STATIC EFI_STATUS EFIAPI HandleCmObjectRefByToken(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN VOID *Object, IN CONST UINTN ObjectSize, IN CONST UINTN ObjectCount, IN CONST CM_OBJECT_TOKEN Token, IN CONST CM_OBJECT_HANDLER_PROC HandlerProc, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObjectDesc)
EFI_STATUS EFIAPI GetArmNameSpaceObject(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token OPTIONAL, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
STATIC EFI_STATUS EFIAPI HandleCmObject(IN CONST CM_OBJECT_ID CmObjectId, IN VOID *Object, IN CONST UINTN ObjectSize, IN CONST UINTN ObjectCount, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObjectDesc)
STATIC EFI_STATUS EFIAPI HwInfoAdd(IN HW_INFO_PARSER_HANDLE ParserHandle, IN VOID *Context, IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc, OUT CM_OBJECT_TOKEN *Token OPTIONAL)
EFI_STATUS EFIAPI GetArchCommonNameSpaceObject(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token OPTIONAL, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
EFI_STATUS EFIAPI ConfigurationManagerDxeUnloadImage(IN EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI ArmKvmtoolPlatformSetObject(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token OPTIONAL, IN CM_OBJ_DESCRIPTOR *CONST CmObject)
EFI_STATUS EFIAPI GetOemNameSpaceObject(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token OPTIONAL, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
STATIC EFI_STATUS EFIAPI CleanupPlatformRepository(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This)
#define CFG_MGR_OEM_ID
EFI_STATUS(* CM_OBJECT_HANDLER_PROC)(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This, IN CONST CM_OBJECT_ID CmObjectId, IN CONST CM_OBJECT_TOKEN Token, IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject)
#define MEMORY_ADDRESS_SIZE_LIMIT
#define CONFIGURATION_MANAGER_REVISION
#define REFERENCE_TOKEN(Field)
CHAR8 dsdt_aml_code[]
#define GET_CM_NAMESPACE_ID(CmObjectId)
#define GET_CM_OBJECT_ID(CmObjectId)
@ EObjNameSpaceArm
ARM Objects Namespace.
@ EObjNameSpaceOem
OEM Objects Namespace.
@ EObjNameSpaceArchCommon
Arch Common Objects Namespace.
@ EObjNameSpaceStandard
Standard Objects Namespace.
UINT32 CM_OBJECT_ID
#define CREATE_CM_ARCH_COMMON_OBJECT_ID(ObjectId)
#define CREATE_CM_ARM_OBJECT_ID(ObjectId)
EFI_GUID gEdkiiConfigurationManagerProtocolGuid
EFI_STATUS EFIAPI DynamicPlatRepoGetObject(IN DYNAMIC_PLATFORM_REPOSITORY_INFO *This, IN CM_OBJECT_ID CmObjectId, IN CM_OBJECT_TOKEN Token OPTIONAL, IN OUT CM_OBJ_DESCRIPTOR *CmObjDesc)
EFI_STATUS EFIAPI DynamicPlatRepoShutdown(IN DYNAMIC_PLATFORM_REPOSITORY_INFO *DynPlatRepo)
EFI_STATUS EFIAPI DynPlatRepoAddObject(IN DYNAMIC_PLATFORM_REPOSITORY_INFO *This, IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc, OUT CM_OBJECT_TOKEN *Token OPTIONAL)
EFI_STATUS EFIAPI DynamicPlatRepoInit(OUT DYNAMIC_PLATFORM_REPOSITORY_INFO **DynPlatRepo)
EFI_STATUS EFIAPI DynamicPlatRepoFinalise(IN DYNAMIC_PLATFORM_REPOSITORY_INFO *This)
VOID * HW_INFO_PARSER_HANDLE
EFI_STATUS EFIAPI HwInfoParse(IN HW_INFO_PARSER_HANDLE ParserHandle)
EFI_STATUS EFIAPI HwInfoParserShutdown(IN HW_INFO_PARSER_HANDLE ParserHandle)
EFI_STATUS EFIAPI HwInfoParserInit(IN VOID *HwDataSource, IN VOID *Context, IN HW_INFO_ADD_OBJECT HwInfoAdd, OUT HW_INFO_PARSER_HANDLE *ParserHandle)
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define STATIC
Definition: Base.h:264
#define FALSE
Definition: Base.h:307
#define ARRAY_SIZE(Array)
Definition: Base.h:1393
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define DEBUG_CODE_BEGIN()
Definition: DebugLib.h:564
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define DEBUG_CODE_END()
Definition: DebugLib.h:578
#define EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_REVISION
#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION
@ EStdObjAcpiTableList
1 - ACPI table Info List
@ EStdObjCfgMgrInfo
0 - Configuration Manager Info
UINTN CM_OBJECT_TOKEN
#define CM_NULL_TOKEN
#define CREATE_REVISION(Major, Minor)
VOID EFIAPI ParseCmObjDesc(IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
@ EFI_NATIVE_INTERFACE
Definition: UefiSpec.h:1193
VOID * Data
Pointer to the described Object or Object List.
CM_ARM_ROOT_COMPLEX_NODE RootComplexInfo
CM_ARM_ITS_IDENTIFIER ItsIdentifierArray[1]
CM_STD_OBJ_ACPI_TABLE_INFO CmAcpiTableList[PLAT_ACPI_TABLE_COUNT]
DYNAMIC_PLATFORM_REPOSITORY_INFO * DynamicPlatformRepo
CM_ARCH_COMMON_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo
CM_ARM_ID_MAPPING DeviceIdMapping[1]
CM_ARM_ITS_GROUP_NODE ItsGroupInfo
CM_STD_OBJ_CONFIGURATION_MANAGER_INFO CmInfo
HW_INFO_PARSER_HANDLE FdtParserHandle