]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ProcessorSubClassDxe: Fix the format of ProcessorId
authorNhi Pham <nhi@os.amperecomputing.com>
Wed, 15 Sep 2021 13:55:32 +0000 (20:55 +0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 16 Sep 2021 14:45:48 +0000 (14:45 +0000)
According to SMBIOS 3.4, section 7.5.3.3 ARM64-class CPUs, if
SMCCC_ARCH_SOC_ID is supported, the first DWORD is the JEP-106 code and
the second DWORD is the SoC revision value. But in the current
implementation, they are set in reverse. This patch is to correct it.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Rebecca Cran <rebecca@nuviainc.com>
Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@nuviainc.com>
Acked-by: Leif Lindholm <leif@nuviainc.com>
ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c

index 292f10bf97ebe964fb05e4d4d894d9fdcc057250..d644cd33d2491d067868b44e19dcf276dad8a438 100644 (file)
@@ -2,6 +2,7 @@
   Functions for processor information common to ARM and AARCH64.\r
 \r
   Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>\r
+  Copyright (c) 2021, Ampere Computing LLC. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -171,7 +172,7 @@ SmbiosGetProcessorId (
 \r
   if (HasSmcArm64SocId ()) {\r
     SmbiosGetSmcArm64SocId (&Jep106Code, &SocRevision);\r
-    ProcessorId = ((UINT64)Jep106Code << 32) | SocRevision;\r
+    ProcessorId = ((UINT64)SocRevision << 32) | Jep106Code;\r
   } else {\r
     ProcessorId = ArmReadMidr ();\r
   }\r