summaryrefslogtreecommitdiffstats
path: root/src/include/bootloader/bootloader.H
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2016-11-08 14:29:38 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-01-04 21:15:44 -0500
commit82af686f8456f594ae17409f1e1e70fc55485cd8 (patch)
treedfb45ebed75b31efdc09f0e5d248d30c6d0a52a6 /src/include/bootloader/bootloader.H
parentb2e82859d8551ef4ee4c6e270794b2fd2d5ad3a4 (diff)
downloadblackbird-hostboot-82af686f8456f594ae17409f1e1e70fc55485cd8.tar.gz
blackbird-hostboot-82af686f8456f594ae17409f1e1e70fc55485cd8.zip
Bootloader - Error handling - Add terminate function
As a first step to providing Bootloader error handling add support for a terminate function. Change-Id: Id4f8f130376d1396cd4feb796d1a3a908558225b RTC:135746 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32390 Tested-by: Jenkins Server <pfd-jenkins+hostboot@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: Christian R. Geddes <crgeddes@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/include/bootloader/bootloader.H')
-rw-r--r--src/include/bootloader/bootloader.H38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/include/bootloader/bootloader.H b/src/include/bootloader/bootloader.H
index ebcc4e1de..26f7f84df 100644
--- a/src/include/bootloader/bootloader.H
+++ b/src/include/bootloader/bootloader.H
@@ -36,6 +36,8 @@
#include <pnor_const.H>
#include <pnor_utils.H>
#include <common/ffs_hb.H>
+#include <kernel/terminate.H>
+#include <kernel/hbterminatetypes.H>
extern "C" void task_end_stub();
extern "C" void enterHBB(uint64_t i_hbb_hrmor, uint64_t i_hbb_offset);
@@ -105,6 +107,42 @@ namespace Bootloader{
uint32_t i_size,
MMIOLoadStoreSizes i_ld_st_size);
+ /**
+ * @brief Handle setting up to terminate Bootloader
+ *
+ * @param[in] i_moduleID ID for module where terminate is occurring
+ * @param[in] i_reasoncode Reason code for why terminating
+ * @param[in] i_word7 Data for SRC word 7 / @userdata2[0:31]
+ * (optional, default is 0)
+ * @param[in] i_word8 Data for SRC word 8 / @userdata2[32:63]
+ * (optional, default is 0)
+ * @param[in] i_executeTI Flag for calling terminateExecuteTI
+ * (optional, default is true)
+ * @param[in] i_failAddr Address associated with termination
+ * (SRC word 6 / @userdata1[32:63],
+ * optional, default is 0)
+ */
+ inline void bl_terminate(uint8_t i_moduleID,
+ uint16_t i_reasoncode,
+ uint32_t i_word7 = 0,
+ uint32_t i_word8 = 0,
+ bool i_executeTI = true,
+ uint64_t i_failAddr = 0)
+ {
+ termWriteSRC(TI_BOOTLOADER,
+ i_reasoncode,
+ i_failAddr);
+
+ termModifySRC(i_moduleID,
+ i_word7,
+ i_word8);
+
+ if(i_executeTI)
+ {
+ terminateExecuteTI();
+ }
+ }
+
/** @enum HbbLengths
* @brief List of HBB lengths.
*
OpenPOWER on IntegriCloud