summaryrefslogtreecommitdiffstats
path: root/src/include/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/kernel')
-rw-r--r--src/include/kernel/machchk.H32
-rw-r--r--src/include/kernel/syscalls.H5
2 files changed, 35 insertions, 2 deletions
diff --git a/src/include/kernel/machchk.H b/src/include/kernel/machchk.H
index af4243807..aebef6235 100644
--- a/src/include/kernel/machchk.H
+++ b/src/include/kernel/machchk.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
+/* [+] 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. */
@@ -43,6 +45,34 @@ namespace Kernel
* @return bool - True if MC successfully handled, false otherwise.
*/
bool handleSLB(task_t* t);
+
+ /**
+ * Constants to define the FIR bit to use to force a checkstop
+ * for an unhandled machine check.
+ */
+#ifdef CONFIG_P9_SYSTEM
+ constexpr uint64_t MCHK_XSTOP_FIR_SCOM_ADDR = 0x05012000;
+ constexpr uint64_t MCHK_XSTOP_FIR_VALUE = 0x0000000100000000ull;//31
+#endif
+
+ /** @fn setCheckstopData
+ * @brief Tells the kernel how to force a checkstop for unrecoverable
+ * machine checks
+ * @param[in] i_xstopAddr - XSCOM MMIO address of FIR to write
+ * @param[in] i_xstopData - Data to write into FIR to trigger xstop
+ *
+ * @return none
+ */
+ void setCheckstopData(uint64_t i_xstopAddr,
+ uint64_t i_xstopData);
+
+ /** @fn forceCheckstop
+ * @brief Force a checkstop if we know how in order to get better
+ * error isolation for cache/memory UEs
+ *
+ * @return none
+ */
+ void forceCheckstop();
}
}
diff --git a/src/include/kernel/syscalls.H b/src/include/kernel/syscalls.H
index 35c6a5fe8..c7a03d6b6 100644
--- a/src/include/kernel/syscalls.H
+++ b/src/include/kernel/syscalls.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2010,2017 */
+/* Contributors Listed Below - COPYRIGHT 2010,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -123,6 +123,9 @@ namespace Systemcalls
/** critassert() */
MISC_CRITASSERT,
+ /** set_mchk_data() */
+ MISC_SETMCHKDATA,
+
SYSCALL_MAX
};
OpenPOWER on IntegriCloud