aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/amd64/machdep.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-07-10 19:38:42 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-07-27 17:11:15 +0000
commitd6717f877872e62d9df1e0ce2d8856620c993924 (patch)
treeafd7959f357a27420b7b0af2be53e2c3c2a630c9 /sys/amd64/amd64/machdep.c
parentd96f55bc7159e8d018847abe5b1782d74c8aa415 (diff)
downloadsrc-d6717f877872e62d9df1e0ce2d8856620c993924.tar.gz
src-d6717f877872e62d9df1e0ce2d8856620c993924.zip
amd64: rework AP startup
Stop using temporal page table with 1:1 mapping of low 1G populated over the whole VA. Use 1:1 mapping of low 4G temporarily installed in the normal kernel page table. The features are: - now there is one less step for startup asm to perform - the startup code still needs to be at lower 1G because CPU starts in real mode. But everything else can be located anywhere in low 4G because it is accessed by non-paged 32bit protected mode. Note that kernel page table root page is at low 4G, as well as the kernel itself. - the page table pages can be allocated by normal allocator, there is no need to carve them from the phys_avail segments at very early time. The allocation of the page for startup code still requires some magic. Pages are freed after APs are ignited. - la57 startup for APs is less tricky, we directly load the final page table and do not need to tweak the paging mode. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31121
Diffstat (limited to 'sys/amd64/amd64/machdep.c')
-rw-r--r--sys/amd64/amd64/machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 1bd2c8c0afe0..49e245e1fdfe 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1279,7 +1279,7 @@ getmemsize(caddr_t kmdp, u_int64_t first)
* in real mode mode (e.g. SMP bare metal).
*/
#ifdef SMP
- mp_bootaddress(physmap, &physmap_idx);
+ alloc_ap_trampoline(physmap, &physmap_idx);
#endif
/* call pmap initialization to make new kernel address space */