diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2013-12-02 15:42:00 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-12-09 13:35:42 -0600 |
| commit | 1249f09a980679936b5f67b6f90baec50a3b1e19 (patch) | |
| tree | 0c058618e04d6277f1ce43e6702b35529462e2a2 /src/kernel/exception.C | |
| parent | 10d410189691f5d4107d5c7d2a0af9332204e634 (diff) | |
| download | talos-hostboot-1249f09a980679936b5f67b6f90baec50a3b1e19.tar.gz talos-hostboot-1249f09a980679936b5f67b6f90baec50a3b1e19.zip | |
Force TIs for unhandled exceptions
Change-Id: I743687d7072af303e62d638a7ee5ad6f89afbccb
RTC: 89403
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7484
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/exception.C')
| -rw-r--r-- | src/kernel/exception.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/kernel/exception.C b/src/kernel/exception.C index 77499f03a..0ed0c4efd 100644 --- a/src/kernel/exception.C +++ b/src/kernel/exception.C @@ -32,6 +32,10 @@ #include <errno.h> #include <kernel/vmmmgr.H> #include <kernel/machchk.H> +#include <kernel/terminate.H> +#include <kernel/hbterminatetypes.H> +#include <kernel/kernel_reasoncodes.H> + namespace ExceptionHandles { @@ -370,3 +374,16 @@ void kernel_execute_external() // all others copied from MSR InterruptMsgHdlr::handleInterrupt(); } + +extern "C" +void kernel_execute_unhandled_exception() +{ + task_t* t = TaskManager::getCurrentTask(); + uint64_t exception = getSPRG2(); + + printk("Unhandled exception %lx by task %d @ %p\n", + exception, t->tid, t->context.nip); + + termWriteSRC(TI_UNHANDLED_EX, RC_UNHANDLED_EX, exception); + terminateExecuteTI(); +} |

