391664b110
PhysMask fields based on the number of physical address bits supported by the current CPU. The old code assumed 36 bits on i386 and 40 bits on amd64. In truth, all Intel CPUs up until recently used 36 bits (a newer Intel CPU uses 38 bits) and all the Opteron CPUs used 40 bits. In at least one case (the new Intel CPU) having the size of the mask field wrong resulted in writing questionable values into the MTRR registers on the application processors (BSP as well if you modify the MTRRs via memcontrol or running X, etc.). The result of the questionable physmask was that all of memory was apparently treated as uncached rather than write-back resulting in a very significant performance hit. Fix this by constructing a run-time mask for the PhysBase and PhysMask fields based on the number of physical address bits supported by the CPU. All 64-bit capable CPUs provide a count of PA bits supported via the 0x80000008 extended CPUID feature, so use that if it is available. If that feature is not available, then assume 36 PA bits. While I'm here, expand the (now-unused) macros for the PhysBase and PhysMask fields to the current largest possible value (52 PA bits). MFC after: 1 week PR: i386/120516 Reported by: Nokia |
||
---|---|---|
.. | ||
pc | ||
_bus.h | ||
_inttypes.h | ||
_limits.h | ||
_stdint.h | ||
_types.h | ||
acpica_machdep.h | ||
apicreg.h | ||
apicvar.h | ||
apm_bios.h | ||
apm_segments.h | ||
asm.h | ||
asmacros.h | ||
atomic.h | ||
bootinfo.h | ||
bus_dma.h | ||
bus.h | ||
clock.h | ||
cpu.h | ||
cpufunc.h | ||
cputypes.h | ||
cserial.h | ||
db_machdep.h | ||
elan_mmcr.h | ||
elf.h | ||
endian.h | ||
exec.h | ||
float.h | ||
floatingpoint.h | ||
frame.h | ||
gdb_machdep.h | ||
ieeefp.h | ||
if_wl_wavelan.h | ||
in_cksum.h | ||
intr_machdep.h | ||
ioctl_bt848.h | ||
ioctl_meteor.h | ||
iodev.h | ||
kdb.h | ||
legacyvar.h | ||
limits.h | ||
md_var.h | ||
memdev.h | ||
metadata.h | ||
minidump.h | ||
mp_watchdog.h | ||
mptable.h | ||
mutex.h | ||
npx.h | ||
param.h | ||
pcaudioio.h | ||
pcb_ext.h | ||
pcb.h | ||
pci_cfgreg.h | ||
pcpu.h | ||
pecoff_machdep.h | ||
perfmon.h | ||
pmap.h | ||
pmc_mdep.h | ||
ppireg.h | ||
privatespace.h | ||
proc.h | ||
profile.h | ||
psl.h | ||
ptrace.h | ||
reg.h | ||
reloc.h | ||
resource.h | ||
runq.h | ||
segments.h | ||
setjmp.h | ||
sf_buf.h | ||
sigframe.h | ||
signal.h | ||
smapi.h | ||
smp.h | ||
speaker.h | ||
specialreg.h | ||
stack.h | ||
stdarg.h | ||
sysarch.h | ||
timerreg.h | ||
trap.h | ||
tss.h | ||
ucontext.h | ||
varargs.h | ||
vm86.h | ||
vmparam.h | ||
xbox.h |