Page MenuHomeFreeBSD

amd64: stop doing special allocation for the AP startup trampoline
ClosedPublic

Authored by kib on Jul 29 2021, 12:27 AM.
Tags
None
Referenced Files
F105968946: D31343.id92941.diff
Mon, Dec 23, 6:25 AM
F105954040: D31343.diff
Mon, Dec 23, 1:40 AM
Unknown Object (File)
Thu, Dec 5, 9:26 AM
Unknown Object (File)
Thu, Nov 28, 6:16 PM
Unknown Object (File)
Nov 20 2024, 3:18 AM
Unknown Object (File)
Nov 16 2024, 9:47 AM
Unknown Object (File)
Nov 16 2024, 8:32 AM
Unknown Object (File)
Nov 10 2024, 1:09 AM
Subscribers
None

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Jul 29 2021, 12:27 AM
kib created this revision.

The only requirement for the page is that it is below 1G to be usable by the real mode during init.

Should be 1M.

x86_smp.h still declares alloc_ap_trampoline() on amd64. Perhaps just wrap the declaration with an ifdef i386?

sys/amd64/amd64/mp_machdep.c
342

I think boot_address can become a local variable which gets passed to start_ap().

kib edited the summary of this revision. (Show Details)

Make boot_address local for amd64/mp_machdep.c.
Brace i386 specific definitions in x86/include
Fix typo in summary
Fix several more cases where lower memory touched by EFI booted kernel (will be a separate commit)

This revision is now accepted and ready to land.Jul 29 2021, 1:27 PM