summaryrefslogtreecommitdiffstats
path: root/c/src/exec
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-18 15:16:37 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-18 15:16:37 +0000
commite029467dac9a09bc07babe9b3f1330e32b91f1d0 (patch)
tree897f13fd06dd29b2454a76ba03c7a1d308cba27e /c/src/exec
parentGLobal reentrancy structure is now dynamically initialized. (diff)
downloadrtems-e029467dac9a09bc07babe9b3f1330e32b91f1d0.tar.bz2
Patch from Emmanuel Raguet <raguet@crf.canon.fr>:
You will find enclosed a patch which contains, for Intel PC386 target : - an Ethernet driver for DEC21140 device based boards. - a simple cache management with paging mechanism.
Diffstat (limited to 'c/src/exec')
-rw-r--r--c/src/exec/score/cpu/i386/cpu.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/c/src/exec/score/cpu/i386/cpu.c b/c/src/exec/score/cpu/i386/cpu.c
index 90473bdb14..9c702ce382 100644
--- a/c/src/exec/score/cpu/i386/cpu.c
+++ b/c/src/exec/score/cpu/i386/cpu.c
@@ -17,6 +17,7 @@
#include <rtems/score/isr.h>
#include <bspIo.h>
#include <rtems/score/thread.h>
+#include <libcpu/cpuModel.h>
/* _CPU_Initialize
@@ -88,6 +89,7 @@ void _CPU_Thread_Idle_body ()
void _defaultExcHandler (CPU_Exception_frame *ctx)
{
+ unsigned int faultAddr;
printk("----------------------------------------------------------\n");
printk("Exception %d caught at PC %x by thread %d\n",
ctx->idtIndex,
@@ -103,8 +105,14 @@ void _defaultExcHandler (CPU_Exception_frame *ctx)
printk("----------------------------------------------------------\n");
printk("Error code pushed by processor itself (if not 0) = %x\n",
ctx->faultCode);
+ printk("----------------------------------------------------------\n");
+ if (ctx->idtIndex == PAGE_FAULT){
+ faultAddr = i386_get_cr2();
+ printk("Page fault linear address (CR2) = %x\n",
+ faultAddr);
printk("----------------------------------------------------------\n\n");
- if (_ISR_Nest_level > 0) {
+ }
+ if (_ISR_Nest_level > 0) {
/*
* In this case we shall not delete the task interrupted as
* it has nothing to do with the fault. We cannot return either