aboutsummaryrefslogtreecommitdiff
path: root/i386/i386at/biosmem.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-02-09 00:43:11 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-02-09 00:43:41 +0100
commite37594f2bf23d2c02e201452fc2911453e5f21b7 (patch)
treeb92be98f39f6716958b166ee5ec2a542b1f090a6 /i386/i386at/biosmem.c
parent274626ed5398db8e44dc995078dbd00e2aa0c1b0 (diff)
downloadgnumach-e37594f2bf23d2c02e201452fc2911453e5f21b7.tar.gz
gnumach-e37594f2bf23d2c02e201452fc2911453e5f21b7.tar.bz2
gnumach-e37594f2bf23d2c02e201452fc2911453e5f21b7.zip
SMP: Fix allocating the apboot page
vm_page_grab_contig does not necessarily allocate at the beginning of the DMA segment, so rather allocate by hand very early.
Diffstat (limited to 'i386/i386at/biosmem.c')
-rw-r--r--i386/i386at/biosmem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/i386/i386at/biosmem.c b/i386/i386at/biosmem.c
index 03736af3..937c0e3d 100644
--- a/i386/i386at/biosmem.c
+++ b/i386/i386at/biosmem.c
@@ -689,6 +689,15 @@ biosmem_bootstrap_common(void)
if (error)
boot_panic(biosmem_panic_noseg_msg);
+#if !defined(MACH_HYP) && NCPUS > 1
+ /*
+ * Grab an early page for AP boot code which needs to be below 1MB.
+ */
+ assert (phys_start < 0x100000);
+ apboot_addr = phys_start;
+ phys_start += PAGE_SIZE;
+#endif
+
biosmem_set_segment(VM_PAGE_SEG_DMA, phys_start, phys_end);
phys_start = VM_PAGE_DMA_LIMIT;