]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: stop doing special allocation for the AP startup trampoline
authorKonstantin Belousov <kib@FreeBSD.org>
Thu, 29 Jul 2021 00:22:35 +0000 (03:22 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Thu, 29 Jul 2021 22:20:45 +0000 (01:20 +0300)
commitb27fe1c3ba2a1302c2866751e0c618b5a697bf30
tree93eb44842e5f23adce58cb1b6ddbd3efc242f7b5
parent59b83c47e21520954178204d15ea3ba5df28a894
amd64: stop doing special allocation for the AP startup trampoline

There is no reason now why do we need to allocate trampoline page very
early in the boot process.  The only requirement for the page is that
it is below 1M to be usable by the real mode during init.  This can be
handled by vm_alloc_contig() when we do the startup.

Also assert that startup trampoline fits into single page.  In principle
we can do multi-page allocation if needed, but it is not.

Move the alloc_ap_trampoline() function and the boot_address variable to
i386/mp_machdep.c.  Keep existing mechanism of early alloc on i386.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D31343
sys/amd64/amd64/machdep.c
sys/amd64/amd64/mp_machdep.c
sys/i386/i386/mp_machdep.c
sys/x86/include/x86_smp.h
sys/x86/x86/mp_x86.c