On 6 July 2015 at 18:11, Ryan Harkin ryan.harkin@linaro.org wrote:
The following 3 patches break reboot/shutdown from within UEFI on TC2 and probably all 32-bit ARM Ltd platforms:
ee171cc 2015-05-08 ArmVExpressPkg: restrict ArmVExpressSysConfigLib to SEC and DXE_DRIVER [Ard Biesheuvel] c889bf2 2015-05-08 ArmVExpressPkg: avoid the use of ArmVExpressSysConfigLib at runtime [Ard Biesheuvel] 7b99da9 2015-05-08 ArmVExpressPkg: use PSCI for system reset at runtime [Ard Biesheuvel]
The symptoms are that the board hangs when I try to call reboot/shutdown. If I revert the top two patches only (ee171cc and c889bf2), then the board crashes and continuously spews out the following message:
Undefined OpCode Exception PC at 0xBF419DBC CPSR 0x800001D6
Reverting all three gets reboot/shutdown working again.
Patch 7b99da9 is adding PSCI support to all ARM Ltd platforms. PSCI is a 64-bit only feature.
PSCI is definitely not a 64-bit only feature, but I agree that this breakage is bad.
The reason for these patches was that the system registers that are used to issue the reboot or shutdown are not (and cannot be) virtually remapped, so DXE_RUNTIME_DRIVERS should not be able to use ArmVExpressSysConfigLib. But apparently, the same DXE that is responsible for boot time reset is responsible for it at runtime.
Perhaps we should clone ArmVExpressSysConfigLib to create a version that is allowed at runtime, and takes care to only poke the sysreg interface at boot time? It wasn't feasible to add this functionality to the original, since it relies on features that the SEC phase does not provide. I am happy to propose a patch that implements the above.