diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-27 23:40:14 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-27 23:40:54 +0200 |
commit | 7d642c99641ffc6960c8dd9ea88634bdaae80213 (patch) | |
tree | b4c8e3085b1ef3800c33006c7c6c50464a27dd83 /x86_64/Makefrag.am | |
parent | 9acc5293e0386bfc0c505ac2efd287e610e7b662 (diff) | |
download | gnumach-7d642c99641ffc6960c8dd9ea88634bdaae80213.tar.gz gnumach-7d642c99641ffc6960c8dd9ea88634bdaae80213.tar.bz2 gnumach-7d642c99641ffc6960c8dd9ea88634bdaae80213.zip |
Fix building x86_64 xen platform
On Xen we do not have a separate boot section, we directly start at the
kernel map address. We thus do not have a map shift.
Diffstat (limited to 'x86_64/Makefrag.am')
-rw-r--r-- | x86_64/Makefrag.am | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/x86_64/Makefrag.am b/x86_64/Makefrag.am index 0139940a..edf533fd 100644 --- a/x86_64/Makefrag.am +++ b/x86_64/Makefrag.am @@ -211,28 +211,6 @@ nodist_libkernel_a_SOURCES += \ # Architecture specialities. # -if PLATFORM_at -# This should probably be 0xffffffff80000000 for mcmodel=kernel, but let's try -# to stay in the first 8G first, otherwise we have to fix the pmap module to -# actually use the l4 page level -#KERNEL_MAP_BASE=0x100000000 -# but for nor try with < 4G, otherwise we have linker errors -KERNEL_MAP_BASE=0x40000000 -gnumach_LINKFLAGS += \ - --defsym _START_MAP=$(_START_MAP) \ - --defsym _START=_START_MAP \ - --defsym KERNEL_MAP_BASE=$(KERNEL_MAP_BASE) \ - -T '$(srcdir)'/x86_64/ldscript - -AM_CFLAGS += -D_START_MAP=$(_START_MAP) \ - -DKERNEL_MAP_BASE=$(KERNEL_MAP_BASE) -AM_CCASFLAGS += -D_START_MAP=$(_START_MAP) \ - -DKERNEL_MAP_BASE=$(KERNEL_MAP_BASE) - -AM_CCASFLAGS += \ - -Ii386 -endif - AM_CPPFLAGS += \ -I$(top_srcdir)/i386 \ -I$(top_srcdir)/i386/i386 \ @@ -273,7 +251,26 @@ include_mach_x86_64_HEADERS = \ # Platform specific parts. # +if PLATFORM_at +# This should probably be 0xffffffff80000000 for mcmodel=kernel, but let's try +# to stay in the first 8G first, otherwise we have to fix the pmap module to +# actually use the l4 page level +#KERNEL_MAP_BASE=0x100000000 +# but for nor try with < 4G, otherwise we have linker errors +KERNEL_MAP_BASE=0x40000000 +gnumach_LINKFLAGS += \ + --defsym _START_MAP=$(_START_MAP) \ + --defsym _START=$(_START_MAP) \ + --defsym KERNEL_MAP_SHIFT=$(KERNEL_MAP_BASE) \ + -T '$(srcdir)'/x86_64/ldscript + +AM_CCASFLAGS += \ + -Ii386 +endif + if PLATFORM_xen +KERNEL_MAP_BASE=0x40000000 + libkernel_a_SOURCES += \ x86_64/xen_locore.S \ x86_64/xen_boothdr.S \ @@ -281,9 +278,15 @@ libkernel_a_SOURCES += \ i386/i386/xen.h gnumach_LINKFLAGS += \ - --defsym _START=0x40000000 \ - --defsym _START_MAP=0x40000000 \ + --defsym _START_MAP=$(KERNEL_MAP_BASE) \ + --defsym _START=$(KERNEL_MAP_BASE) \ + --defsym KERNEL_MAP_SHIFT=0 \ -T '$(srcdir)'/x86_64/ldscript endif + +AM_CFLAGS += -D_START_MAP=$(_START_MAP) \ + -DKERNEL_MAP_BASE=$(KERNEL_MAP_BASE) +AM_CCASFLAGS += -D_START_MAP=$(_START_MAP) \ + -DKERNEL_MAP_BASE=$(KERNEL_MAP_BASE) endif # HOST_x86_64 |