[edk2-devel] [PATCH v3 11/13] DynamicTablesPkg: Fix referencing of CPC token

Sami Mujawar posted 11 patches 11 months, 3 weeks ago
[edk2-devel] [PATCH v3 11/13] DynamicTablesPkg: Fix referencing of CPC token
Posted by Sami Mujawar 11 months, 3 weeks ago
The CpcToken has been incorrectly referenced in the
CreateTopologyFromGicC() and always points to the
CPC token in the first GICC Info object.

Therefore, fix this by correctly indexing into the
GicCInfo object array.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Pierre Gondois  <pierre.gondois@arm.com>
---

Notes:
    v3:
     - No code change from v2 patch series.      [SAMI]
    
    v2:
     - No code change from v1 patch series.      [SAMI]

 DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
index 6fbba12a010bf987797f0901a032735e8e0be598..8228c7845ac0c26ca0f319fd86abf89bb3bfaf50 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
@@ -1298,7 +1298,7 @@ CreateTopologyFromGicC (
 
     // If a CPC info is associated with the
     // GicCinfo, create an _CPC method returning them.
-    if (GicCInfo->CpcToken != CM_NULL_TOKEN) {
+    if (GicCInfo[Index].CpcToken != CM_NULL_TOKEN) {
       Status = CreateAmlCpcNode (Generator, CfgMgrProtocol, &GicCInfo[Index], CpuNode);
       if (EFI_ERROR (Status)) {
         ASSERT_EFI_ERROR (Status);
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109001): https://edk2.groups.io/g/devel/message/109001
Mute This Topic: https://groups.io/mt/101522268/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-