Skip to contentSkip to conversation

Fault handlers fix for Mini-OS

PATCH New Grzegorz Milos 1 participant 1 message May 3, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fault handlers fix for Mini-OS

Fix fault handler for both 32 and 64 bit architecture. Clean up unused code.

Keir could you apply please?

Cheers
Gregor

.hgignore +1 -1
diff -r 4726d12cd915 -r 1fceaa507305 .hgignore
@@ -14,6 +14,7 @@
 .*\.orig$
 .*\.rej$
 .*/a\.out$
+.*cscope.*$
 ^[^/]*\.bz2$
 ^TAGS$
 ^dist/.*$
@@ -184,7 +185,6 @@
 ^tools/xm-test/ramdisk/buildroot
 ^xen/BLOG$
 ^xen/TAGS$
-^xen/cscope\.*$
 ^xen/arch/x86/asm-offsets\.s$
 ^xen/arch/x86/boot/mkelf32$
 ^xen/arch/x86/xen\.lds$
extras/mini-os/Makefile +8 -0
diff -r 4726d12cd915 -r 1fceaa507305 extras/mini-os/Makefile
@@ -60,4 +60,12 @@
 %.o: %.S $(HDRS) Makefile
 	$(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
 
+define all_sources
+     ( find . -follow -name SCCS -prune -o -name '*.[chS]' -print )
+endef
 
+.PHONY: cscope
+cscope:
+	$(all_sources) > cscope.files
+	cscope -k -b -q
+
extras/mini-os/sched.c +1 -1
diff -r 4726d12cd915 -r 1fceaa507305 extras/mini-os/sched.c
@@ -324,7 +324,7 @@
 
 void init_sched(void)
 {
-    printk("Initialising scheduler, idle_thread %p\n", idle_thread);
+    printk("Initialising scheduler\n");
 
     idle_thread = create_thread("Idle", idle_thread_fn, NULL);
     INIT_LIST_HEAD(&idle_thread->thread_list);
extras/mini-os/traps.c +8 -2
diff -r 4726d12cd915 -r 1fceaa507305 extras/mini-os/traps.c
@@ -134,8 +134,15 @@
         do_exit();
     }
     handling_pg_fault = 1;
-    printk("Page fault at linear address %p, regs %p, code %lx\n", addr, regs,
+
+#if defined(__x86_64__)
+    printk("Page fault at linear address %p, rip %p, code %lx\n", addr, regs->rip,
 	   error_code);
+#else
+    printk("Page fault at linear address %p, eip %p, code %lx\n", addr, regs->eip,
+	   error_code);
+#endif
+
     dump_regs(regs);
     page_walk(addr);
     do_exit();
@@ -208,7 +215,6 @@
     { 15, 0, __KERNEL_CS, (unsigned long)spurious_interrupt_bug      },
     { 16, 0, __KERNEL_CS, (unsigned long)coprocessor_error           },
     { 17, 0, __KERNEL_CS, (unsigned long)alignment_check             },
-    { 18, 0, __KERNEL_CS, (unsigned long)machine_check               },
     { 19, 0, __KERNEL_CS, (unsigned long)simd_coprocessor_error      },
     {  0, 0,           0, 0                           }
 };
extras/mini-os/x86_32.S +19 -34

112 lines not on this page · raw message

extras/mini-os/x86_64.S +87 -186

293 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel