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
This commit is contained in:
oliviermartin 2013-03-12 01:01:11 +00:00
parent 4d83284aee
commit 39f58c9b40
1 changed files with 7 additions and 4 deletions

View File

@ -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);
}
}
}