From 0db3db91302876adc4490b9c3c1ff10945b38044 Mon Sep 17 00:00:00 2001 From: Missy Connell Date: Mon, 29 Oct 2012 13:55:23 -0500 Subject: 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 --- src/lib/assert.C | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/lib/assert.C') 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 #include +#include +#include /** 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(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(linkRegister())); + + // Call to force TI + terminateExecuteTI(); break; } -- cgit v1.2.3