@@ -553,7 +553,7 @@ GenerateLpiStates (
553
553
@param [in] Generator The SSDT Cpu Topology generator.
554
554
@param [in] ParentNode Parent node to attach the Cpu node to.
555
555
@param [in] GicCInfo CM_ARM_GICC_INFO object used to create the node.
556
- @param [in] CpuIndex Index used to generate the node name.
556
+ @param [in] CpuName Value used to generate the node name.
557
557
@param [out] CpuNodePtr If not NULL, return the created Cpu node.
558
558
559
559
@retval EFI_SUCCESS Success.
@@ -567,7 +567,7 @@ CreateAmlCpu (
567
567
IN ACPI_CPU_TOPOLOGY_GENERATOR * Generator ,
568
568
IN AML_NODE_HANDLE ParentNode ,
569
569
IN CM_ARM_GICC_INFO * GicCInfo ,
570
- IN UINT32 CpuIndex ,
570
+ IN UINT32 CpuName ,
571
571
OUT AML_OBJECT_NODE_HANDLE * CpuNodePtr OPTIONAL
572
572
)
573
573
{
@@ -579,7 +579,7 @@ CreateAmlCpu (
579
579
ASSERT (ParentNode != NULL );
580
580
ASSERT (GicCInfo != NULL );
581
581
582
- Status = WriteAslName ('C' , CpuIndex , AslName );
582
+ Status = WriteAslName ('C' , CpuName , AslName );
583
583
if (EFI_ERROR (Status )) {
584
584
ASSERT (0 );
585
585
return Status ;
@@ -628,7 +628,7 @@ CreateAmlCpu (
628
628
@param [in] CfgMgrProtocol Pointer to the Configuration Manager
629
629
Protocol Interface.
630
630
@param [in] ParentNode Parent node to attach the Cpu node to.
631
- @param [in] CpuIndex Index used to generate the node name.
631
+ @param [in] CpuName Value used to generate the node name.
632
632
@param [in] ProcHierarchyNodeInfo CM_ARM_PROC_HIERARCHY_INFO describing
633
633
the Cpu.
634
634
@@ -643,7 +643,7 @@ CreateAmlCpuFromProcHierarchy (
643
643
IN ACPI_CPU_TOPOLOGY_GENERATOR * Generator ,
644
644
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtocol ,
645
645
IN AML_NODE_HANDLE ParentNode ,
646
- IN UINT32 CpuIndex ,
646
+ IN UINT32 CpuName ,
647
647
IN CM_ARM_PROC_HIERARCHY_INFO * ProcHierarchyNodeInfo
648
648
)
649
649
{
@@ -668,7 +668,7 @@ CreateAmlCpuFromProcHierarchy (
668
668
return Status ;
669
669
}
670
670
671
- Status = CreateAmlCpu (Generator , ParentNode , GicCInfo , CpuIndex , & CpuNode );
671
+ Status = CreateAmlCpu (Generator , ParentNode , GicCInfo , CpuName , & CpuNode );
672
672
if (EFI_ERROR (Status )) {
673
673
ASSERT (0 );
674
674
return Status ;
@@ -735,7 +735,8 @@ CreateAmlProcessorContainer (
735
735
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtocol ,
736
736
IN AML_NODE_HANDLE ParentNode ,
737
737
IN CM_ARM_PROC_HIERARCHY_INFO * ProcHierarchyNodeInfo ,
738
- IN UINT32 ProcContainerIndex ,
738
+ IN UINT16 ProcContainerName ,
739
+ IN UINT32 ProcContainerUid ,
739
740
OUT AML_OBJECT_NODE_HANDLE * ProcContainerNodePtr
740
741
)
741
742
{
@@ -749,7 +750,7 @@ CreateAmlProcessorContainer (
749
750
ASSERT (ProcHierarchyNodeInfo != NULL );
750
751
ASSERT (ProcContainerNodePtr != NULL );
751
752
752
- Status = WriteAslName ('C' , ProcContainerIndex , AslNameProcContainer );
753
+ Status = WriteAslName ('C' , ProcContainerName , AslNameProcContainer );
753
754
if (EFI_ERROR (Status )) {
754
755
ASSERT (0 );
755
756
return Status ;
@@ -765,7 +766,7 @@ CreateAmlProcessorContainer (
765
766
// and EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID is set for non-Cpus.
766
767
Status = AmlCodeGenNameInteger (
767
768
"_UID" ,
768
- ProcContainerIndex ,
769
+ ProcContainerUid ,
769
770
ProcContainerNode ,
770
771
NULL
771
772
);
@@ -838,6 +839,8 @@ CreateAmlCpuTopologyTree (
838
839
UINT32 Index ;
839
840
UINT32 CpuIndex ;
840
841
AML_OBJECT_NODE_HANDLE ProcContainerNode ;
842
+ UINT32 Uid ;
843
+ UINT16 Name ;
841
844
842
845
ASSERT (Generator != NULL );
843
846
ASSERT (Generator -> ProcNodeList != NULL );
@@ -868,11 +871,17 @@ CreateAmlCpuTopologyTree (
868
871
return EFI_INVALID_PARAMETER ;
869
872
}
870
873
874
+ if (Generator -> ProcNodeList [Index ].OverrideNameUidEnabled ) {
875
+ Name = Generator -> ProcNodeList [Index ].OverrideName ;
876
+ } else {
877
+ Name = CpuIndex ;
878
+ }
879
+
871
880
Status = CreateAmlCpuFromProcHierarchy (
872
881
Generator ,
873
882
CfgMgrProtocol ,
874
883
ParentNode ,
875
- CpuIndex ,
884
+ Name ,
876
885
& Generator -> ProcNodeList [Index ]
877
886
);
878
887
if (EFI_ERROR (Status )) {
@@ -897,12 +906,21 @@ CreateAmlCpuTopologyTree (
897
906
return EFI_INVALID_PARAMETER ;
898
907
}
899
908
909
+ if (Generator -> ProcNodeList [Index ].OverrideNameUidEnabled ) {
910
+ Name = Generator -> ProcNodeList [Index ].OverrideName ;
911
+ Uid = Generator -> ProcNodeList [Index ].OverrideUid ;
912
+ } else {
913
+ Name = * ProcContainerIndex ;
914
+ Uid = * ProcContainerIndex ;
915
+ }
916
+
900
917
Status = CreateAmlProcessorContainer (
901
918
Generator ,
902
919
CfgMgrProtocol ,
903
920
ParentNode ,
904
921
& Generator -> ProcNodeList [Index ],
905
- * ProcContainerIndex ,
922
+ Name ,
923
+ Uid ,
906
924
& ProcContainerNode
907
925
);
908
926
if (EFI_ERROR (Status )) {
0 commit comments