From e029467dac9a09bc07babe9b3f1330e32b91f1d0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 18 Feb 1999 15:16:37 +0000 Subject: Patch from Emmanuel Raguet : 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. --- c/src/exec/score/cpu/i386/cpu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'c/src/exec/score') 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 #include #include +#include /* _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 -- cgit v1.2.3