diff options
| author | Missy Connell <missyc@us.ibm.com> | 2012-10-29 13:55:23 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-11-09 08:51:25 -0600 |
| commit | 0db3db91302876adc4490b9c3c1ff10945b38044 (patch) | |
| tree | 3ec7d6bd4730420e7103bb0b6b326c01f295092d /src/kernel/terminate.C | |
| parent | ed66b035444144109e66283e4b97087b918c6b93 (diff) | |
| download | talos-hostboot-0db3db91302876adc4490b9c3c1ff10945b38044.tar.gz talos-hostboot-0db3db91302876adc4490b9c3c1ff10945b38044.zip | |
Terminate Immediate on a shutdown and assert
Change-Id: I37c8956afb11c69201f4936821cff5e153327780
RTC:43793
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2194
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/terminate.C')
| -rw-r--r-- | src/kernel/terminate.C | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/src/kernel/terminate.C b/src/kernel/terminate.C index b5834a7b3..10daec717 100644 --- a/src/kernel/terminate.C +++ b/src/kernel/terminate.C @@ -28,6 +28,7 @@ #include <kernel/console.H> #include <builtins.h> +#include <kernel/kernel_reasoncodes.H> extern "C" void p8_force_attn() NO_RETURN; @@ -38,19 +39,34 @@ HB_TI_DataArea kernel_TIDataArea; /* Instance of the HB desriptor struct */ HB_Descriptor kernel_hbDescriptor = {&kernel_TIDataArea}; -void terminateAndUpdateSaveArea(uint16_t i_type, uint16_t i_source, uint64_t *i_src, uint64_t - plid) + + +void terminateExecuteTI() { + // Call the function that actually executes the TI code. + p8_force_attn(); +} -printk("Inside terminateandupdateSaveArea!!!!!!!!!!!!!!! \n"); - kernel_TIDataArea.type = i_type; - kernel_TIDataArea.source = i_source; - memcpy(i_src, kernel_TIDataArea.src, sizeof (kernel_TIDataArea.src)); - kernel_TIDataArea.plid = plid; - +void termWritePlid(uint16_t i_source, uint64_t plid) +{ + kernel_TIDataArea.type = TI_WITH_PLID; + kernel_TIDataArea.source = i_source; + kernel_TIDataArea.plid = plid; +} + +void termWriteSRC(uint16_t i_source, uint16_t i_reasoncode,uint64_t i_failAddr) +{ + // Update the TI structure with the type of TI and who called. + kernel_TIDataArea.type = TI_WITH_SRC; + kernel_TIDataArea.source = i_source; -printk("Calling p8_force_attn!!! dying.... \n"); - // After the data is set up .. call the function that actually executes the TI. - p8_force_attn(); + // Update TID data area with the SRC info we have avail + kernel_TIDataArea.src.ID = 0xBC; + kernel_TIDataArea.src.subsystem = 0x11; + kernel_TIDataArea.src.reasoncode = i_reasoncode; + kernel_TIDataArea.src.moduleID = MOD_KERNEL_TERMINATE; + kernel_TIDataArea.src.iType = TI_WITH_SRC; + // Update User Data with address of fail location + kernel_TIDataArea.src.word6 = i_failAddr; } |

