summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/BdsLib
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-12 01:01:11 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-12 01:01:11 +0000
commit39f58c9b40ca55cec4eeab45ff624bc3551ef56e (patch)
tree0328e6acd0f185d7d91b563031b95f841d20f399 /ArmPkg/Library/BdsLib
parent4d83284aeecb8c2e6e5fe16bfd2cc75346709625 (diff)
downloadedk2-platforms-39f58c9b40ca55cec4eeab45ff624bc3551ef56e.tar.xz
ArmPkg/BdsLib: Update 'cpu-release-addr' with the UEFI locations if the method is 'spin-table'
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14191 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Library/BdsLib')
-rw-r--r--ArmPkg/Library/BdsLib/BdsLinuxFdt.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ArmPkg/Library/BdsLib/BdsLinuxFdt.c b/ArmPkg/Library/BdsLib/BdsLinuxFdt.c
index 98cd1db328..5fccf8cac7 100644
--- a/ArmPkg/Library/BdsLib/BdsLinuxFdt.c
+++ b/ArmPkg/Library/BdsLib/BdsLinuxFdt.c
@@ -452,12 +452,13 @@ PrepareFdt (
}
// If Power State Coordination Interface (PSCI) is not supported then it is expected the secondary
- // cores are spinning waiting for the Operation System to release them
+ // cores are spinning waiting for the Operating System to release them
if (PsciSmcSupported == FALSE) {
- // Before to write our method check if a method is already exposed in the CPU node
+ // We as the bootloader are responsible for either creating or updating
+ // these entries. Do not trust the entries in the DT. We only know about
+ // 'spin-table' type. Do not try to update other types if defined.
Method = fdt_getprop(fdt, cpu_node, "enable-method", &lenp);
- if (Method == NULL) {
- // No 'enable-method', we can create our entries
+ if ( (Method == NULL) || (!AsciiStrCmp((CHAR8 *)Method, "spin-table")) ) {
fdt_setprop_string(fdt, cpu_node, "enable-method", "spin-table");
CpuReleaseAddr = cpu_to_fdt64(ArmCoreInfoTable[Index].MailboxSetAddress);
fdt_setprop(fdt, cpu_node, "cpu-release-addr", &CpuReleaseAddr, sizeof(CpuReleaseAddr));
@@ -466,6 +467,8 @@ PrepareFdt (
if (((ArmCoreInfoTable[Index].ClusterId != ClusterId) || (ArmCoreInfoTable[Index].CoreId != CoreId))) {
fdt_setprop_string(fdt, cpu_node, "status", "disabled");
}
+ } else {
+ Print(L"Warning: Unsupported enable-method type for CPU[%d] : %a\n", Index, (CHAR8 *)Method);
}
}
}