summaryrefslogtreecommitdiffstats
path: root/src/lib
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/lib
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/lib')
-rw-r--r--src/lib/assert.C19
-rw-r--r--src/lib/syscall_misc.C5
2 files changed, 18 insertions, 6 deletions
diff --git a/src/lib/assert.C b/src/lib/assert.C
index dbfd8ed6a..ebf59fb3f 100644
--- a/src/lib/assert.C
+++ b/src/lib/assert.C
@@ -32,6 +32,8 @@
#include <kernel/hbterminatetypes.H>
#include <kernel/terminate.H>
+#include <sys/misc.h>
+#include <kernel/kernel_reasoncodes.H>
/** Hook location for trace module to set up when loaded. */
namespace TRACE { void (*traceCallback)(void*, size_t) = NULL; };
@@ -58,18 +60,23 @@ extern "C" void __assert(AssertBehavior i_assertb, int i_line)
break;
case ASSERT_CRITICAL: // Critical task, trace not available.
- printk("Assertion failed @%p on line %d.\n",
+ printk("Assertion failed @%p on line %d.(Crit_Assert)\n",
linkRegister(), i_line);
- task_crash();
+
+ // Need to call the external CritAssert system call
+ cpu_crit_assert(reinterpret_cast<uint64_t>(linkRegister()));
break;
case ASSERT_KERNEL: // Kernel assert called.
- printk("Assertion failed @%p on line %d.\n",
+ printk("Assertion failed @%p on line %d. (kassert)\n",
linkRegister(), i_line);
- // Create and src
- // Call function to save SRC and perform a TI
- //terminateAndUpdateSaveArea(TI_WITH_SRC, TI_KERNAL_ASSERT, NULL);
+ // Call function to create SRC and update TI Data area
+ termWriteSRC(TI_KERNEL_ASSERT, RC_ASSERT,
+ reinterpret_cast<uint64_t>(linkRegister()));
+
+ // Call to force TI
+ terminateExecuteTI();
break;
}
diff --git a/src/lib/syscall_misc.C b/src/lib/syscall_misc.C
index 6d6755a5c..b62a10662 100644
--- a/src/lib/syscall_misc.C
+++ b/src/lib/syscall_misc.C
@@ -90,3 +90,8 @@ int cpu_master_winkle()
return rc;
}
+
+void cpu_crit_assert(uint64_t i_failAddr)
+{
+ _syscall1(MISC_CRITASSERT, reinterpret_cast<void*>(i_failAddr));
+}
OpenPOWER on IntegriCloud