[Kos-cvs] kos/modules/x86/mm _pgflt.c,1.10,1.11

thomas at kos.enix.org thomas at kos.enix.org
Tue Jan 4 23:19:21 CET 2005


Update of /home/kos/cvs/kos/modules/x86/mm
In directory the-doors:/tmp/cvs-serv9995/modules/x86/mm

Modified Files:
	_pgflt.c 
Log Message:
2005-01-04  Thomas Petazzoni  <thomas at crazy.kos.nx>

	* modules/arch/mm/_pgflt.c (_page_fault): Display some
	informations even if pf_nested_level != 1.

	* modules/test/vmm_test.c (vmm_test): Allow the VMM stress test to
	be run multiple times.

	* modules/scheduler/_synchq.c (synchq_wait_unsafe): After the
	wakeup of the thread the synchq should still be locked. Check
	this.



Index: _pgflt.c
===================================================================
RCS file: /home/kos/cvs/kos/modules/x86/mm/_pgflt.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- _pgflt.c	27 Oct 2003 15:37:32 -0000	1.10
+++ _pgflt.c	4 Jan 2005 22:19:19 -0000	1.11
@@ -22,7 +22,24 @@
 
   if (pf_nested_level != 1)
     {
+      char buf[200];
+
       bochs_printk(">>> ###FATAL### Nested #PF <<<\n");
+
+      __dbg_backtrace(get_current_thread(), cpu_state);
+
+      addr2sym(cpu_state->eip, buf, sizeof(buf));
+      DEBUG_PRINT("# Uncaught page fault at ip 0x%x (%s)\n",
+		  cpu_state->eip, buf);
+      DEBUG_PRINT("#  on addr 0x%x, with error code 0x%x\n",
+		  cr2, cpu_state->error_code);
+      DEBUG_PRINT("#  => [%s] / [%s] access / [%s] mode\n",
+		  (pf_flags.page_present == PF_PRESENT)?"Present":"Not present",
+		  (pf_flags.access == VM_ACCESS_WRITE)?"Write":"Read",
+		  (pf_flags.who == PF_ACCESS_USER)?"User":"Supervisor");
+
+      FAILED_VERBOSE("*** TBI: Send SEGV to faulting thread ***\n");
+
       asm volatile("cli");
       for( ; ; ) asm volatile("hlt");
     }
@@ -34,7 +51,7 @@
   CONCEPTION_ASSERT(as);
 
   asm ("movl %%cr2, %0"
-       :"=r"(cr2) 
+       :"=r"(cr2)
        : );
 
   /*



More information about the Kos-cvs mailing list