Hello,

At last I got it working: in the latest git master, the bootstrap code
can cope with VM_MIN_KERNEL_ADDRESS != 0 by using segmentation before
switching to C code. This means we can make the kernel live at high
virtual addresses, which means that the debugger trace & such can
properly know how to separate user and kernel addresses.

It works for me on kvm, but I'd prefer to see more tests before enbling
it by default. The attached patch is all that is needed to enable it.

Samuel
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index ea5149f..62ac61e 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -199,7 +199,7 @@ EXTRA_DIST += \
        i386/ldscript
 if PLATFORM_at
 gnumach_LINKFLAGS += \
-       --defsym _START=0x100000 \
+       --defsym _START=0xC0100000 \
        --defsym _START_MAP=0x100000 \
        -T '$(srcdir)'/i386/ldscript
 endif
diff --git a/i386/i386/vm_param.h b/i386/i386/vm_param.h
index 4974c33..6abe412 100644
--- a/i386/i386/vm_param.h
+++ b/i386/i386/vm_param.h
@@ -34,7 +34,7 @@
 #define VM_MIN_KERNEL_ADDRESS  0xC0000000UL
 #define INIT_VM_MIN_KERNEL_ADDRESS     VM_MIN_KERNEL_ADDRESS
 #else  /* MACH_XEN */
-#define VM_MIN_KERNEL_ADDRESS  0x00000000UL
+#define VM_MIN_KERNEL_ADDRESS  0xC0000000UL
 #define INIT_VM_MIN_KERNEL_ADDRESS     0x00000000UL
 #endif /* MACH_XEN */
 

Reply via email to