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)
Mar 7 2024, 6:20 PM
Unknown Object (File)
Jan 23 2024, 4:46 PM
Unknown Object (File)
Dec 20 2023, 3:44 AM
Unknown Object (File)
Nov 27 2023, 3:49 AM
Unknown Object (File)
Nov 9 2023, 5:30 PM
Unknown Object (File)
Nov 4 2023, 4:04 AM
Unknown Object (File)
Oct 8 2023, 4:26 PM
Unknown Object (File)
Oct 3 2023, 3:54 AM
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.