summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMissy Connell <missyc@us.ibm.com>2012-10-29 13:55:23 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-11-09 08:51:25 -0600
commit0db3db91302876adc4490b9c3c1ff10945b38044 (patch)
tree3ec7d6bd4730420e7103bb0b6b326c01f295092d /src/include
parented66b035444144109e66283e4b97087b918c6b93 (diff)
downloadtalos-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/include')
-rw-r--r--src/include/kernel/cpumgr.H7
-rw-r--r--src/include/kernel/hbterminatetypes.H51
-rw-r--r--src/include/kernel/kernel_reasoncodes.H43
-rw-r--r--src/include/kernel/syscalls.H3
-rw-r--r--src/include/kernel/terminate.H30
-rw-r--r--src/include/sys/misc.h9
-rw-r--r--src/include/usr/hbotcompid.H10
7 files changed, 138 insertions, 15 deletions
diff --git a/src/include/kernel/cpumgr.H b/src/include/kernel/cpumgr.H
index 3d9fd2e02..f55bf0ff5 100644
--- a/src/include/kernel/cpumgr.H
+++ b/src/include/kernel/cpumgr.H
@@ -145,6 +145,13 @@ class CpuManager
*/
static void forceMemoryPeriodic();
+
+ /** @fn critAssert()
+ * Functional call to force terminate immediate on all threads
+ * @param[in] i_failAddr - Address from where the assert was called
+ */
+ static void critAssert(uint64_t i_failAddr);
+
/** Desired value for MSR after wakeup.
*
* bit 0 - 64 bit mode.
diff --git a/src/include/kernel/hbterminatetypes.H b/src/include/kernel/hbterminatetypes.H
index 353dea06f..487704b96 100644
--- a/src/include/kernel/hbterminatetypes.H
+++ b/src/include/kernel/hbterminatetypes.H
@@ -27,6 +27,47 @@
#define __KERNEL_HBTERMINATETYPES_H
#include <stdint.h>
+/** @struct HB_T_SRC_DataAreaw
+ * @brief Defines the data space recreating an SRC needed for a TI from kernel
+ * space
+ */
+struct HB_T_SRC_DataArea
+{
+
+ union{
+ struct {
+ uint32_t ID:8; /**< B1 or what we are using now*/
+ uint32_t subsystem:8; /**< Caller of the TI */
+ uint32_t reasoncode:16; /**< reasoncode */
+ };
+ uint32_t SRCword0; /**< Full SRC word0 */
+ };
+ uint32_t SRCword1; /**< Full SRC word2 */
+ union{
+ struct {
+ uint32_t bpCCIN:16; /**< BP CCIN*/
+ uint32_t moduleID:8; /**< Module ID */
+ uint32_t FSP:8; /**< subsystem */
+ };
+ uint32_t SRCword2; /**< Full SRC word1 */
+ };
+
+ uint32_t SRCword3; /**< Full SRC word3 */
+ uint32_t SRCword4; /**< Full SRC word4 */
+ /* Word 5-8 - user data */
+ union{
+ struct {
+ uint32_t iType:16; /**< SRC of PLID failure*/
+ uint32_t iSource:16; /**< Source of the src */
+ };
+ uint32_t SRCword5; /**< Full Dword5 */
+ };
+ uint32_t word6; /**< Full Dword6 */
+
+ uint32_t word7; /**< Full Dword7 */
+ uint32_t word8; /**< Full Dword8 */
+
+};
/** @struct TI_DataArea
@@ -43,10 +84,10 @@ struct HB_TI_DataArea
uint64_t reserved2:16; /**< Reserved space */
uint64_t reserved3:16; /**< Reserved space */
};
- uint64_t flag; /**< Full Dword0 */
- };
- uint64_t src[4];
- uint64_t plid;
+ uint64_t flag; /**< Full word - flag */
+ };
+ uint64_t plid; /**< Plid */
+ HB_T_SRC_DataArea src; /**< SRC */
};
// Enum indicating whether a SRC or PLID is stored
@@ -59,7 +100,7 @@ enum hb_terminate_type
// Enum used in the flag indicating who initiated the TI
enum hb_terminate_source
{
- TI_KERNAL_ASSERT = 0x0001,
+ TI_KERNEL_ASSERT = 0x0001,
TI_CRIT_ASSERT = 0x0002,
TI_SHUTDOWN = 0x0003,
};
diff --git a/src/include/kernel/kernel_reasoncodes.H b/src/include/kernel/kernel_reasoncodes.H
new file mode 100644
index 000000000..fe4748a19
--- /dev/null
+++ b/src/include/kernel/kernel_reasoncodes.H
@@ -0,0 +1,43 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/kernel/kernel_reasoncodes.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __KERNEL_REASONCODES_H
+#define __KERNEL_REASONCODES_H
+
+
+#include <usr/hbotcompid.H>
+
+
+ enum KernelModuleId
+ {
+ MOD_KERNEL_INVALID = 0x00, /**< Zero is an invalid module id */
+ MOD_KERNEL_TERMINATE = 0x01, /**< terminate.C : save SRC */
+
+ };
+
+ enum KernelReasonCode
+ {
+ RC_ASSERT = KERNEL_COMP_ID | 0x01, /**< Assert */
+ RC_SHUTDOWN = KERNEL_COMP_ID | 0x02, /**< Shutdown */
+ };
+
+#endif
diff --git a/src/include/kernel/syscalls.H b/src/include/kernel/syscalls.H
index 2a3ba6095..b8f252258 100644
--- a/src/include/kernel/syscalls.H
+++ b/src/include/kernel/syscalls.H
@@ -116,6 +116,9 @@ namespace Systemcalls
/** mm_linear_map() */
MM_LINEAR_MAP,
+ /** critassert() */
+ MISC_CRITASSERT,
+
SYSCALL_MAX
};
diff --git a/src/include/kernel/terminate.H b/src/include/kernel/terminate.H
index db93a1b0b..3cedf6a72 100644
--- a/src/include/kernel/terminate.H
+++ b/src/include/kernel/terminate.H
@@ -28,18 +28,30 @@
#include <kernel/types.h>
-/** @fn terminateAndUpdateSaveArea
- * Update TI data area with src or PLID and force a TI
- * @param[in] i_type : indicates if an src or plid is stored
+
+/** @fn terminateExecuteTI
+ * @brief Sequence to execute a TI attn
+ */
+void terminateExecuteTI();
+
+/** @fn termWritePlid
+ * Update TI data area with a PLID.
* @param[in] i_source: indicates what type of fail forced the TI
- * @param[in] *i_src: SRC to be stored
* @param[in] i_plid: plid to be stored
* @param[out] NONE:
*/
-void terminateAndUpdateSaveArea(uint16_t i_type,
- uint16_t i_source,
- uint64_t *i_src,
- uint64_t plid = 0);
-
+void termWritePlid(uint16_t i_source, uint64_t plid);
+
+/** @fn termWriteSRC
+ * Create an SRC and Update the TI data area with the src created
+ * @param[in] i_source: indicates what type of fail forced the TI
+ * @param[in] i_reasoncode: reasoncode for the failure(assert or shutdown)
+ * @param[in] i_failAddr: i_linkRegister() value (address of failure)
+ * @param[out] NONE:
+ */
+void termWriteSRC(uint16_t i_source,
+ uint16_t i_reasoncode,
+ uint64_t i_failAddr = 0);
+
#endif
diff --git a/src/include/sys/misc.h b/src/include/sys/misc.h
index 02338d1f8..c8d3ba510 100644
--- a/src/include/sys/misc.h
+++ b/src/include/sys/misc.h
@@ -142,6 +142,15 @@ uint64_t cpu_spr_value(CpuSprNames spr);
*/
int cpu_master_winkle();
+/** @fn cpu_crit_assert
+ * @brief Forces a Terminate Immediate after a crit-assert is issued
+ * @param[in] i_failAddr - value in the linkRegister of the address
+ * of where the fail ocured.
+ *
+ * @return none
+ */
+void cpu_crit_assert(uint64_t i_failAddr);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H
index e5a8d36b9..5b6125185 100644
--- a/src/include/usr/hbotcompid.H
+++ b/src/include/usr/hbotcompid.H
@@ -257,6 +257,14 @@ const compId_t RUNTIME_COMP_ID = 0x1A00;
const char RUNTIME_COMP_NAME[] = "runtime";
//@}
+/** @name KERNEL
+ * KERNEL component
+ */
+//@{
+const compId_t KERNEL_COMP_ID = 0x1B00;
+const char KERNEL_COMP_NAME[] = "kernel";
+//@}
+
/** @name HSVC
* Host Services component
* For the code running under PHYP
@@ -264,7 +272,7 @@ const char RUNTIME_COMP_NAME[] = "runtime";
//@{
const compId_t HSVC_COMP_ID = 0x2000;
const char HSVC_COMP_NAME[] = "hsvc";
-//@}
+
/** @name RESERVED
* Reserved component ID. x3100 is the component ID
OpenPOWER on IntegriCloud