From 853730f7faa8f59795e8e0e811864deae279314f Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 18 Mar 2012 17:07:37 +0100 Subject: Set Xen kernel virtual address to 0xC0000000 That makes the virtual addressing equal to linear addressing, thus optimizing some computations away. * i386/i386/vm_param.h (VM_MIN_KERNEL_ADDRESS) [MACH_XEN]: Set to 0xC0000000UL. * i386/xen/Makefrag.am (gnumach_LINKFLAGS): Set _START to 0xC0000000. * i386/xen/xen_boothdr.S (VIRT_BASE, ELF_PADDR_OFFSET): Set to 0xC0000000. --- i386/i386/vm_param.h | 2 +- i386/xen/Makefrag.am | 2 +- i386/xen/xen_boothdr.S | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/i386/i386/vm_param.h b/i386/i386/vm_param.h index 41cdbc3b..6abbf8ff 100644 --- a/i386/i386/vm_param.h +++ b/i386/i386/vm_param.h @@ -29,7 +29,7 @@ /* The kernel address space is usually 1GB, usually starting at virtual address 0. */ #ifdef MACH_XEN -#define VM_MIN_KERNEL_ADDRESS 0x20000000UL +#define VM_MIN_KERNEL_ADDRESS 0xC0000000UL #else /* MACH_XEN */ #define VM_MIN_KERNEL_ADDRESS 0x00000000UL #endif /* MACH_XEN */ diff --git a/i386/xen/Makefrag.am b/i386/xen/Makefrag.am index b15b7db1..02e3e120 100644 --- a/i386/xen/Makefrag.am +++ b/i386/xen/Makefrag.am @@ -28,6 +28,6 @@ libkernel_a_SOURCES += \ if PLATFORM_xen gnumach_LINKFLAGS += \ - --defsym _START=0x20000000 \ + --defsym _START=0xC0000000 \ -T '$(srcdir)'/i386/ldscript endif diff --git a/i386/xen/xen_boothdr.S b/i386/xen/xen_boothdr.S index 152924dd..eacf0d81 100644 --- a/i386/xen/xen_boothdr.S +++ b/i386/xen/xen_boothdr.S @@ -22,8 +22,8 @@ .ascii "GUEST_OS=GNU Mach" .ascii ",GUEST_VERSION=1.3" .ascii ",XEN_VER=xen-3.0" - .ascii ",VIRT_BASE=0x20000000" - .ascii ",ELF_PADDR_OFFSET=0x20000000" + .ascii ",VIRT_BASE=0xC0000000" + .ascii ",ELF_PADDR_OFFSET=0xC0000000" .ascii ",HYPERCALL_PAGE=0x2" #if PAE .ascii ",PAE=yes[extended-cr3]" -- cgit v1.2.3