mirror of https://github.com/acidanthera/audk.git
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:
parent
4d83284aee
commit
39f58c9b40
|
@ -452,12 +452,13 @@ PrepareFdt (
|
||||||
}
|
}
|
||||||
|
|
||||||
// If Power State Coordination Interface (PSCI) is not supported then it is expected the secondary
|
// 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) {
|
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);
|
Method = fdt_getprop(fdt, cpu_node, "enable-method", &lenp);
|
||||||
if (Method == NULL) {
|
if ( (Method == NULL) || (!AsciiStrCmp((CHAR8 *)Method, "spin-table")) ) {
|
||||||
// No 'enable-method', we can create our entries
|
|
||||||
fdt_setprop_string(fdt, cpu_node, "enable-method", "spin-table");
|
fdt_setprop_string(fdt, cpu_node, "enable-method", "spin-table");
|
||||||
CpuReleaseAddr = cpu_to_fdt64(ArmCoreInfoTable[Index].MailboxSetAddress);
|
CpuReleaseAddr = cpu_to_fdt64(ArmCoreInfoTable[Index].MailboxSetAddress);
|
||||||
fdt_setprop(fdt, cpu_node, "cpu-release-addr", &CpuReleaseAddr, sizeof(CpuReleaseAddr));
|
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))) {
|
if (((ArmCoreInfoTable[Index].ClusterId != ClusterId) || (ArmCoreInfoTable[Index].CoreId != CoreId))) {
|
||||||
fdt_setprop_string(fdt, cpu_node, "status", "disabled");
|
fdt_setprop_string(fdt, cpu_node, "status", "disabled");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Print(L"Warning: Unsupported enable-method type for CPU[%d] : %a\n", Index, (CHAR8 *)Method);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue