Page MenuHomeFreeBSD

x86: fix MTRR initialization if EARLY_AP_STARTUP is used
ClosedPublic

Authored by royger on Feb 16 2017, 12:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 30, 5:58 AM
Unknown Object (File)
Nov 23 2024, 3:40 AM
Unknown Object (File)
Nov 22 2024, 5:19 AM
Unknown Object (File)
Oct 3 2024, 10:39 PM
Unknown Object (File)
Oct 3 2024, 8:12 AM
Unknown Object (File)
Oct 1 2024, 8:38 AM
Unknown Object (File)
Sep 26 2024, 8:41 PM
Unknown Object (File)
Sep 25 2024, 4:33 PM
Subscribers

Details

Summary

MTRR handlers are set in {amd64/i686}_mem_drvinit, which is called at
SI_SUB_DRIVERS, and that's too late when EARLY_AP_STARTUP is set because APs
have already started at this point. {amd64/i686}_mrinit is also called too late
for the BSP, since that happens when the memory device is attached, also after
APs have already started.

Move the position to SI_SUB_CPU, and also initialize the state for the BSP, so
that the APs can correctly get to the same state as the BSP.

Sponsored by: Citrix Systems R&D

Test Plan

Not tested on i386, only amd64.

Diff Detail

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

Event Timeline

royger retitled this revision from to x86: fix MTRR initialization if EARLY_AP_STARTUP is used.
royger updated this object.
royger edited the test plan for this revision. (Show Details)
royger added reviewers: jhb, kib.
royger set the repository for this revision to rS FreeBSD src repository - subversion.
jhb edited edge metadata.

This seems sensible. I suspect it was at SI_SUB_DRIVERS due to being tied to the cdev.

It might be slightly cleaner to turn the init method stored in the 'ops' into a stub instead of adding the 'already initialized' check.

This revision is now accepted and ready to land.Feb 16 2017, 5:55 PM
kib edited edge metadata.

The code should be merged into x86/x86_mem.c

This revision was automatically updated to reflect the committed changes.