summaryrefslogtreecommitdiffstats
path: root/src/bootloader
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2017-05-09 09:41:18 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-05-17 11:58:44 -0400
commit9fe37b817a8862347166fc89fc4d2f7248174783 (patch)
tree50bb71d8e6f3c3d30e9d45cab3f91a6966d1bea0 /src/bootloader
parente83375df62d017f3d43c47cb6bdbea1b21fa4cfa (diff)
downloadtalos-hostboot-9fe37b817a8862347166fc89fc4d2f7248174783.tar.gz
talos-hostboot-9fe37b817a8862347166fc89fc4d2f7248174783.zip
Save space in Bootloader with exception handlers
The exception handlers save and restore the register used to save the exception address. The Bootloader does not need to preserve all registers when an exception occurs and can remove two assembly instructions per exception. It will use gpr17 to save the exception address, since that register is less used in Bootloader than gpr1. Change-Id: Ia736040e3975508f40c106d4a8ea1a05f3b75c29 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40284 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/bootloader')
-rw-r--r--src/bootloader/bl_start.S18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/bootloader/bl_start.S b/src/bootloader/bl_start.S
index 0105380b8..210089c34 100644
--- a/src/bootloader/bl_start.S
+++ b/src/bootloader/bl_start.S
@@ -267,28 +267,22 @@ _main_loop:
#define STD_INTERRUPT(name, address) \
intvect_##name: \
or 2,2,2; /* Ensure thread priority is high. */ \
- mtsprg1 r1; /* Save GPR1 */ \
- li r1, address; /* Save exception address. */ \
- mtsprg2 r1; /* Move exception address to SPRG2 */ \
- mfsprg1 r1; /* Restore GPR1 */ \
+ li r17, address; /* Save exception address. */ \
+ mtsprg2 r17; /* Move exception address to SPRG2 */ \
b kernel_std_exception; /* Process interrupt. */
#define STD_INTERRUPT_WITH(name, address, with) \
intvect_##name: \
or 2,2,2; /* Ensure thread priority is high. */ \
- mtsprg1 r1; /* Save GPR1 */ \
- li r1, address; /* Save exception address. */ \
- mtsprg2 r1; /* Move exception address to SPRG2 */ \
- mfsprg1 r1; /* Restore GPR1 */ \
+ li r17, address; /* Save exception address. */ \
+ mtsprg2 r17; /* Move exception address to SPRG2 */ \
b kernel_std_exception_w_##with; /* Process interrupt. */
#define HYPE_INTERRUPT(name, address) \
intvect_##name: \
or 2,2,2; /* Ensure thread priority is high. */ \
- mtsprg1 r1; /* Save GPR1 */ \
- li r1, address; /* Save exception address. */ \
- mtsprg2 r1; /* Move exception address to SPRG2 */ \
- mfsprg1 r1; /* Restore GPR1 */ \
+ li r17, address; /* Save exception address. */ \
+ mtsprg2 r17; /* Move exception address to SPRG2 */ \
b kernel_hype_exception; /* Process interrupt. */
STD_INTERRUPT(system_reset, HBBL_system_reset)
OpenPOWER on IntegriCloud