ArmPkg/ArmSmcPsciResetSystemLib: implement fallback for warm reboot
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 6 Jun 2018 12:32:42 +0000 (14:32 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 15 Jun 2018 16:18:37 +0000 (18:18 +0200)
commitdde2dd64f07041c2ccc23dc7a5a846e667b7bb1a
treee9e7a0dacb660f6bf63f9a595a99ecc098fef458
parentcae823161249198976a7e8c2711d39f3832a09cd
ArmPkg/ArmSmcPsciResetSystemLib: implement fallback for warm reboot

Implement ResetSystemLib's EnterS3WithImmediateWake() routine using
a jump back to the PEI entry point with interrupts and MMU+caches
disabled. This is only possible at boot time, when we are sure that
the current CPU is the only one up and running. Also, it depends on
the platform whether the PEI code is preserved in memory (it may be
copied to DRAM rather than execute in place), so also add a feature
PCD to selectively enable this feature.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/ArmPkg.dec
ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.c
ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf