Page MenuHomeFreeBSD

x86: improve reservation of AP trampoline memory
ClosedPublic

Authored by royger on Mar 28 2018, 11:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 28, 12:56 PM
Unknown Object (File)
Wed, Jul 9, 11:04 AM
Unknown Object (File)
Jun 19 2025, 8:18 AM
Unknown Object (File)
Jun 3 2025, 10:11 AM
Unknown Object (File)
Jun 1 2025, 12:36 PM
Unknown Object (File)
May 31 2025, 10:31 AM
Unknown Object (File)
May 30 2025, 11:57 AM
Unknown Object (File)
May 29 2025, 2:00 PM
Subscribers

Details

Summary

So that it doesn't rely on physmap[1] containing an address below
1MiB. Instead scan the full physmap and search for a suitable address
to place the trampoline code (below 1MiB) and the initial memory pages
(below 4GiB).

Sponsored by: Citrix Systems R&D

Test Plan

Tested on amd64, only build-tested on i386.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/i386/i386/mp_machdep.c
148 ↗(On Diff #40834)

Can you share this function between 386 and amd64 ?

sys/sys/param.h
367 ↗(On Diff #40834)

This should be committed separately.

Thanks, new version coming up.

sys/i386/i386/mp_machdep.c
148 ↗(On Diff #40834)

Yes, I've placed it in mp_x86.c

sys/sys/param.h
367 ↗(On Diff #40834)

OK, I can do this. IMO I don't like to introduce functions/macros/whatever without a caller on the same patch.

royger marked 2 inline comments as done.
  • share the trampoline allocation logic between i386 and amd64.
  • Define bootMP_size in assembly for amd64 also (so it can be set at link time).
  • Define GiB/MiB in a pre-patch.
This revision is now accepted and ready to land.Apr 4 2018, 2:01 PM
This revision was automatically updated to reflect the committed changes.