Extract the logic from exceptions_panic.S as boot code might use it.
Stop zeroing registers x1-x3 as it doesn't seem to be required by PSCI.
Test: atest MicrodroidTestApp
Change-Id: I8c9eb371299152b173c8bb589dccfb6edf8d634e
Use the right literal for a PSCI_SYSTEM_RESET.
Fixes: d40ff91f65 ("vmbase: Handle very early exceptions")
Bug: 237659918
Test: m crosvm
Change-Id: I7df28e537191441628273510526ce4f839ed40e4
Introduce a vector table to provide a predictable behavior when
exceptions are raised before the Rust runtime is ready i.e. before
vector_table_el1 may be used. With this table, exceptions are "handled"
by attempting a PSCI_SYSTEM_RESET call and hanging if that returns. For
example, this may prevent a malicious host from triggering a fault when
entry.S accesses .data or .bss in entry.S and getting arbitrary code
execution from VBAR_EL1.
Bug: 237659918
Test: atest vmbase_example.integration_test
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Change-Id: I5106e32b3118ec691ea6a7a80516d8c29918563c