summaryrefslogtreecommitdiffstats
path: root/src/kernel
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/kernel
parentb2e82859d8551ef4ee4c6e270794b2fd2d5ad3a4 (diff)
downloadtalos-hostboot-82af686f8456f594ae17409f1e1e70fc55485cd8.tar.gz
talos-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/kernel')
-rw-r--r--src/kernel/terminate.C23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/kernel/terminate.C b/src/kernel/terminate.C
index e657feb83..dd908b4e7 100644
--- a/src/kernel/terminate.C
+++ b/src/kernel/terminate.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2016 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -24,12 +26,14 @@
#include <kernel/hbdescriptor.H>
#include <kernel/hbterminatetypes.H>
#include <kernel/terminate.H>
+#ifndef bl_terminate_C
#include <stdint.h>
#include <kernel/console.H>
#include <kernel/ipc.H>
#include <builtins.h>
#include <kernel/kernel_reasoncodes.H>
+#endif // bl_terminate_C
extern "C" void p8_force_attn() NO_RETURN;
@@ -37,11 +41,15 @@ extern "C" void p8_force_attn() NO_RETURN;
/* Instance of the TI Data Area */
HB_TI_DataArea kernel_TIDataArea;
-/* Instance of the HB desriptor struct */
+/* Instance of the HB descriptor struct */
HB_Descriptor kernel_hbDescriptor =
{
&kernel_TIDataArea,
+#ifndef bl_terminate_C
&KernelIpc::ipc_data_area,
+#else
+ NULL,
+#endif // bl_terminate_C
0
};
@@ -72,7 +80,18 @@ void termWriteSRC(uint16_t i_source, uint16_t i_reasoncode,uint64_t i_failAddr)
kernel_TIDataArea.src.reasoncode = i_reasoncode;
kernel_TIDataArea.src.moduleID = 0;
kernel_TIDataArea.src.iType = TI_WITH_SRC;
+ kernel_TIDataArea.src.iSource = i_source;
// Update User Data with address of fail location
kernel_TIDataArea.src.word6 = i_failAddr;
}
+
+void termModifySRC(uint8_t i_moduleID, uint32_t i_word7, uint32_t i_word8)
+{
+ // Update module ID
+ kernel_TIDataArea.src.moduleID = i_moduleID;
+
+ // Update User Data with anything supplied for word7 or word8
+ kernel_TIDataArea.src.word7 = i_word7;
+ kernel_TIDataArea.src.word8 = i_word8;
+}
OpenPOWER on IntegriCloud