coreboot/src/cpu
Marshall Dawson c0dbedac43 x86/mtrr: Enable Rd/WrDram mod in AMD fixed MTRRs
AMD's fixed MTRRs have RdDram and WrDram bits that route memory
accesses to DRAM vs. MMIO.  These are typically hidden for normal
operation by clearing SYS_CFG[19] (MtrrFixDramModEn).  According to
BKDGs and AMD64 Programmer's Manual vol 2, this bit is clear at
reset, should be set for configuration during POST, then cleared for
normal operation.

Attempting to modify the RdDram and WrDram settings without unhiding
them causes a General Protection Fault.  Add functions to enable and
disable MtrrFixDramModEn.  Unhide/hide as necessary when copying or
writing the fixed MTRRs.

Finally, modify sipi_vector.S to enable the bits prior to writing
the fixed MTRRs and disable when complete.

This functionality is compiled out on non-AMD platforms.

BUG=b:68019051
TEST=Boot Kahlee, check steps with HDT

Change-Id: Ie195131ff752400eb886dfccc39b314b4fa6b3f3
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/23722
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-02-16 22:38:50 +00:00
..
allwinner mb/*/*: Remove rtc nvram configurable baud rate 2017-09-23 11:06:25 +00:00
amd AGESA f15 cimx/sb700: Remove unused chips code 2018-01-24 02:09:18 +00:00
armltd vboot2: add verstage 2015-01-27 01:41:40 +01:00
intel cpu/intel/haswell: Don't select PARALLEL_CPU_INIT 2018-02-06 15:30:06 +00:00
qemu-power8 Constify struct cpu_device_id instances 2017-11-23 05:00:17 +00:00
qemu-x86 Constify struct cpu_device_id instances 2017-11-23 05:00:17 +00:00
ti mb/*/*: Remove rtc nvram configurable baud rate 2017-09-23 11:06:25 +00:00
via Constify struct cpu_device_id instances 2017-11-23 05:00:17 +00:00
x86 x86/mtrr: Enable Rd/WrDram mod in AMD fixed MTRRs 2018-02-16 22:38:50 +00:00
Kconfig cpu: assume SSE if SSE2 is selected 2017-11-04 00:34:20 +00:00
Makefile.inc DMP Vortex86ex board & chip: Remove - using LATE_CBMEM_INIT 2018-01-15 23:23:17 +00:00