diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2014-02-17 13:32:15 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-27 11:20:44 -0600 |
commit | 850f884974dac7973f22341920fbb7277cf80245 (patch) | |
tree | 4a870919aa2b2e8dcfce16ebddbc5cc3cba0dcf8 /src/kernel/start.S | |
parent | 19cd4e5ddb80c98365612590cc58e7d0de49f69c (diff) | |
download | talos-hostboot-850f884974dac7973f22341920fbb7277cf80245.tar.gz talos-hostboot-850f884974dac7973f22341920fbb7277cf80245.zip |
Clean up TODOs in Kernel.
* Ensure that unhandled SRESET will trigger TI.
Change-Id: I34807bc357ba6908327ede975afc9c6b6b17c098
RTC: 92848
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8933
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/start.S')
-rw-r--r-- | src/kernel/start.S | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/kernel/start.S b/src/kernel/start.S index c9f2663ed..790281305 100644 --- a/src/kernel/start.S +++ b/src/kernel/start.S @@ -5,7 +5,7 @@ # # IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2010,2013 +# COPYRIGHT International Business Machines Corp. 2010,2014 # # p1 # @@ -172,13 +172,7 @@ STD_INTERRUPT_STUB(system_reset, 0x100) intvect_inst_start: b _start - /* TODO: Eventually we likely need specific code for machine check - * interrupts because they can happen at any time, including - * while we're already in an interrupt path. (Don't want to - * save kernel state over top of a user-space task structure). - */ STD_INTERRUPT(machine_check, 0x200) - STD_INTERRUPT(data_storage, 0x300) STD_INTERRUPT(data_segment, 0x380) STD_INTERRUPT(inst_storage, 0x400) @@ -628,9 +622,22 @@ intvect_system_reset: beq+ intvect_system_reset_external ;// Check for HMI (bits = 101). cmpi cr0, r2, 0x5 - beq+ 1f ;// TODO: need to handle HMIs? -1: ;// Unknown reason. - b 1b + beq+ 1f ;// Unable to handle HMI, jump to 'unknown reason'. + +1: ;// Unknown reason, call as unhandled_exception. + sldi r1, r2, 32 ;// Save 42:44 of SRR1 and + ori r1, r1, 0x100 ;// SRESET address to + mtsprg2 r1 ;// SPRG2 for unhandled_exception. + ;/* Restore R2 and R1 */ + mfsprg1 r2 + mfsprg0 r1 + ;/* Need to load unhandled_exception into SPRG0 for kernel_save_task */ + mtsprg1 r1 ;/* Save off R1 again. */ + lis r1, intvect_unhandled_finish_save@h + ori r1, r1, intvect_unhandled_finish_save@l + mtsprg0 r1; + mfsprg1 r1; /* Restore GPR1 */ + b kernel_save_task ; /* Save current task, call unhandled_exception */ ;// @fn intvect_system_reset_inactive ;// Handle SRESET on an inactive processor. |