arm64: Add support for save/restore registers for CPU startup.
startup.c provides function to enable CPU in any stage to save register data
that can be used by secondary CPU (for normal boot) or any CPU (for resume
boot). stage_entry.S defines space for saving arm64_startup_data. This can be
1) Primary CPU before bringing up secondary CPUs so that the secondary can use
register values to initialize MMU-related and other required registers to
2) CPU suspend path to ensure that on resume the values which were saved are
stage_entry.S provides a common path for both normal and resume boot to
initialize saved registers. For resume path, it is important to set the
secondary entry point for startup since x26 needs to be 1 for enabling MMU and
This also ensures that we do not fall into false memory cache errors which
caused CPU to fail during normal / resume boot. Thus, we can get rid of the
stack cache invalidate for secondary CPUs.
TEST=Compiles and boots both CPU0 and CPU1 on ryu without mmu_enable and stack
cache invalidate for CPU1.
Signed-off-by: Patrick Georgi <firstname.lastname@example.org>
Original-Signed-off-by: Furquan Shaikh <email@example.com>
Original-Reviewed-by: Aaron Durbin <firstname.lastname@example.org>
Original-Tested-by: Furquan Shaikh <email@example.com>
Original-Commit-Queue: Furquan Shaikh <firstname.lastname@example.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <email@example.com>
8 files changed