From 86d75840ab802dab7c341e14cc330f159faa4d97 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Wed, 19 Jun 2013 18:09:19 +0000 Subject: [PATCH] ArmPkg/BdsLib: Update FDT CPU node format - Based on Doc here: Repo: http://www.linux-arm.org/git?p=linux-2.6-lp.git Branch: dt-cpus-bindings File: Documentation/devicetree/bindings/arm/cpus.txt Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14434 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPkg/Library/BdsLib/BdsLinuxFdt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ArmPkg/Library/BdsLib/BdsLinuxFdt.c b/ArmPkg/Library/BdsLib/BdsLinuxFdt.c index 4ff0afeb7d..8217740204 100644 --- a/ArmPkg/Library/BdsLib/BdsLinuxFdt.c +++ b/ArmPkg/Library/BdsLib/BdsLinuxFdt.c @@ -535,7 +535,9 @@ PrepareFdt ( ArmCoreInfoTable = ArmProcessorTable->ArmCpus; for (Index = 0; Index < ArmProcessorTable->NumberOfEntries; Index++) { - AsciiSPrint (Name, 10, "cpu@%d", Index); + CoreMpId = (UINTN) GET_MPID (ArmCoreInfoTable[Index].ClusterId, + ArmCoreInfoTable[Index].CoreId); + AsciiSPrint (Name, 10, "cpu@%x", CoreMpId); // If the 'cpus' node did not exist then create all the 'cpu' nodes. // In case 'cpus' node is provided in the original FDT then we do not add @@ -549,8 +551,7 @@ PrepareFdt ( } fdt_setprop_string (fdt, cpu_node, "device_type", "cpu"); - CoreMpId = (UINTN) GET_MPID (ArmCoreInfoTable[Index].ClusterId, - ArmCoreInfoTable[Index].CoreId); + CoreMpId = cpu_to_fdtn (CoreMpId); fdt_setprop (fdt, cpu_node, "reg", &CoreMpId, sizeof (CoreMpId)); if (PsciSmcSupported) { -- 2.39.2