summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-26 02:38:59 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-26 02:46:59 +0200
commit9a8e6290eb6db52b3aa19cad522880d22807ed65 (patch)
tree5b29b214b633f1e33a5d0ee12500e06919337f53
parentf7e039d23dd7ed50a4af53fa63ee322e7e4b386c (diff)
Xen 64bit: Also put kernel at end of addressing spacev1.8+git20230526
-rw-r--r--i386/i386/vm_param.h3
-rw-r--r--x86_64/Makefrag.am5
-rw-r--r--x86_64/spl.S6
3 files changed, 8 insertions, 6 deletions
diff --git a/i386/i386/vm_param.h b/i386/i386/vm_param.h
index 8264ea11..05aeab33 100644
--- a/i386/i386/vm_param.h
+++ b/i386/i386/vm_param.h
@@ -60,10 +60,11 @@
#else /* PAE */
#define HYP_VIRT_START HYPERVISOR_VIRT_START_NONPAE
#endif /* PAE */
+#define VM_MAX_KERNEL_ADDRESS (HYP_VIRT_START - LINEAR_MIN_KERNEL_ADDRESS + VM_MIN_KERNEL_ADDRESS)
#else
#define HYP_VIRT_START HYPERVISOR_VIRT_START
+#define VM_MAX_KERNEL_ADDRESS (LINEAR_MAX_KERNEL_ADDRESS - LINEAR_MIN_KERNEL_ADDRESS + VM_MIN_KERNEL_ADDRESS)
#endif
-#define VM_MAX_KERNEL_ADDRESS (HYP_VIRT_START - LINEAR_MIN_KERNEL_ADDRESS + VM_MIN_KERNEL_ADDRESS)
#else /* MACH_PV_PAGETABLES */
#define VM_MAX_KERNEL_ADDRESS (LINEAR_MAX_KERNEL_ADDRESS - LINEAR_MIN_KERNEL_ADDRESS + VM_MIN_KERNEL_ADDRESS)
#endif /* MACH_PV_PAGETABLES */
diff --git a/x86_64/Makefrag.am b/x86_64/Makefrag.am
index 7e0ef25b..008ac58f 100644
--- a/x86_64/Makefrag.am
+++ b/x86_64/Makefrag.am
@@ -202,13 +202,14 @@ endif
# Platform specific parts.
#
+KERNEL_MAP_BASE=0xffffffff80000000
+
if PLATFORM_at
# For now simply keep all the kernel virtual space in the last 2G.
# We could use a more elaborate schema if needed (e.g. reserving a
# larger area for directmap or the kernel heap)), I think only the
# test/bss/data sections need to be placed here kere because of
# -mcmodel=kernel
-KERNEL_MAP_BASE=0xffffffff80000000
gnumach_LINKFLAGS += \
--defsym _START_MAP=$(_START_MAP) \
--defsym _START=$(_START_MAP) \
@@ -221,8 +222,6 @@ AM_CCASFLAGS += \
endif
if PLATFORM_xen
-KERNEL_MAP_BASE=0x40000000
-
libkernel_a_SOURCES += \
x86_64/xen_locore.S \
x86_64/xen_boothdr.S \
diff --git a/x86_64/spl.S b/x86_64/spl.S
index 27bc39ea..e4f87d85 100644
--- a/x86_64/spl.S
+++ b/x86_64/spl.S
@@ -198,7 +198,8 @@ splx_cli:
je 1f /* yes, all done */
movl %edx,CX(EXT(curr_ipl),%eax) /* set ipl */
#ifdef MACH_XEN
- movl EXT(int_mask)(,%edx,4),%eax
+ movl EXT(int_mask),%eax
+ movl (%eax,%edx,4),%eax
/* get int mask */
XEN_SETMASK() /* program xen evts with new mask */
#endif
@@ -228,7 +229,8 @@ spl:
cmpl $SPL7,%edx /* spl7? */
je EXT(spl7) /* yes, handle specially */
#ifdef MACH_XEN
- movl EXT(int_mask)(,%edx,4),%eax
+ movl EXT(int_mask),%eax
+ movl (%eax,%edx,4),%eax
/* get int mask */
#endif
cli /* disable interrupts */