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
Unknown Object (File)
Mar 8 2024, 2:59 AM
Unknown Object (File)
Feb 28 2024, 10:48 AM
Unknown Object (File)
Feb 3 2024, 4:34 AM
Unknown Object (File)
Jan 17 2024, 12:38 PM
Unknown Object (File)
Jan 15 2024, 1:04 AM
Unknown Object (File)
Jan 14 2024, 4:47 AM
Unknown Object (File)
Dec 20 2023, 5:47 AM
Unknown Object (File)
Dec 9 2023, 6:34 PM
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 Skipped
Unit
Tests Skipped

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
343

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