Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176865517
D15675.1793529603.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D15675.1793529603.diff
View Options
Index: head/sys/amd64/amd64/machdep.c
===================================================================
--- head/sys/amd64/amd64/machdep.c
+++ head/sys/amd64/amd64/machdep.c
@@ -1248,15 +1248,6 @@
}
/*
- * Make hole for "AP -> long mode" bootstrap code. The
- * mp_bootaddress vector is only available when the kernel
- * is configured to support APs and APs for the system start
- * in real mode mode (e.g. SMP bare metal).
- */
- if (init_ops.mp_bootaddress)
- init_ops.mp_bootaddress(physmap, &physmap_idx);
-
- /*
* Maxmem isn't the "maximum memory", it's one larger than the
* highest page of the physical address space. It should be
* called something like "Maxphyspage". We may adjust this
@@ -1293,6 +1284,15 @@
if (atop(physmap[physmap_idx + 1]) != Maxmem &&
(boothowto & RB_VERBOSE))
printf("Physical memory use set to %ldK\n", Maxmem * 4);
+
+ /*
+ * Make hole for "AP -> long mode" bootstrap code. The
+ * mp_bootaddress vector is only available when the kernel
+ * is configured to support APs and APs for the system start
+ * in real mode mode (e.g. SMP bare metal).
+ */
+ if (init_ops.mp_bootaddress)
+ init_ops.mp_bootaddress(physmap, &physmap_idx);
/* call pmap initialization to make new kernel address space */
pmap_bootstrap(&first);
Index: head/sys/amd64/amd64/mp_machdep.c
===================================================================
--- head/sys/amd64/amd64/mp_machdep.c
+++ head/sys/amd64/amd64/mp_machdep.c
@@ -113,12 +113,16 @@
allocated = false;
for (i = *physmap_idx; i <= *physmap_idx; i -= 2) {
/*
- * Find a memory region big enough below the 4GB boundary to
- * store the initial page tables. Note that it needs to be
- * aligned to a page boundary.
+ * Find a memory region big enough below the 4GB
+ * boundary to store the initial page tables. Region
+ * must be mapped by the direct map.
+ *
+ * Note that it needs to be aligned to a page
+ * boundary.
*/
- if (physmap[i] >= GiB(4) ||
- (physmap[i + 1] - round_page(physmap[i])) < (PAGE_SIZE * 3))
+ if (physmap[i] >= GiB(4) || physmap[i + 1] -
+ round_page(physmap[i]) < PAGE_SIZE * 3 ||
+ physmap[i + 1] > Maxmem)
continue;
allocated = true;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 1, 10:40 AM (6 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41283104
Default Alt Text
D15675.1793529603.diff (2 KB)
Attached To
Mode
D15675: Account for dmap limit when selecting the pages for the bootstrap pagetables.
Attached
Detach File
Event Timeline