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)
Sun, Nov 10, 1:09 AM
Unknown Object (File)
Oct 6 2024, 9:27 PM
Unknown Object (File)
Sep 28 2024, 9:27 AM
Unknown Object (File)
Sep 28 2024, 7:22 AM
Unknown Object (File)
Sep 21 2024, 5:54 AM
Unknown Object (File)
Sep 14 2024, 9:47 AM
Unknown Object (File)
Sep 4 2024, 5:55 PM
Unknown Object (File)
Sep 3 2024, 5:54 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