]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
x86: fix MTRR initialization if EARLY_AP_STARTUP is used
authorRoger Pau Monné <royger@FreeBSD.org>
Fri, 17 Feb 2017 12:47:51 +0000 (12:47 +0000)
committerRoger Pau Monné <royger@FreeBSD.org>
Fri, 17 Feb 2017 12:47:51 +0000 (12:47 +0000)
commit43b00aeb88c917bc28a1e2dc7bcc46bb47393797
tree5198fb838dbc6721d57a0d7b180a79255f22f6f5
parent02db5d1d664acf7fde0aece3b15e9fb04b72abbe
x86: fix MTRR initialization if EARLY_AP_STARTUP is used

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
MFC after: 1 week
Reviewed by: jhb, kib
Differential Revision: https://reviews.freebsd.org/D9630
sys/amd64/amd64/amd64_mem.c
sys/i386/i386/i686_mem.c