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)
Oct 21 2024, 7:22 PM
Unknown Object (File)
Oct 18 2024, 10:04 AM
Unknown Object (File)
Oct 8 2024, 2:05 PM
Unknown Object (File)
Oct 2 2024, 4:24 AM
Unknown Object (File)
Sep 30 2024, 5:48 AM
Unknown Object (File)
Sep 25 2024, 10:57 PM
Unknown Object (File)
Sep 25 2024, 3:14 AM
Unknown Object (File)
Sep 24 2024, 11:40 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15971
Build 15960: arc lint + arc unit

Event Timeline

sys/i386/i386/mp_machdep.c
142

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
142

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.