[coreboot-gerrit] Change in coreboot[master]: amd/stoneyridge: Reorder temp mtrr for flash

Marshall Dawson (Code Review) gerrit at coreboot.org
Tue Apr 10 06:25:34 CEST 2018


Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/25575


Change subject: amd/stoneyridge: Reorder temp mtrr for flash
......................................................................

amd/stoneyridge: Reorder temp mtrr for flash

Relocate setting the temp range MTRR, for the SPI flash device, to
after completion of mp_init.  The mp_init functionality mirrors the
BSP's exact MTRR settings into the AP cores.  The ranges need to be
the correct calculated values and not some temporary setting.

This solves an MTRR sync issue on APUs with more than two cores,
i.e. more than a single compute-unit.  MTRRs within a CU are shared
so the AP always stays in sync.

BUG=b:77457944
TEST=run on Kahlee

Change-Id: Idc4cccdf721e252bc87d6cba62a3406a9f19b940
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
---
M src/soc/amd/stoneyridge/cpu.c
1 file changed, 3 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/25575/1

diff --git a/src/soc/amd/stoneyridge/cpu.c b/src/soc/amd/stoneyridge/cpu.c
index 14b6881..15dd381 100644
--- a/src/soc/amd/stoneyridge/cpu.c
+++ b/src/soc/amd/stoneyridge/cpu.c
@@ -49,10 +49,6 @@
 static void pre_mp_init(void)
 {
 	x86_setup_mtrrs_with_detect();
-
-	/* The flash is now no longer cacheable. Reset to WP for performance. */
-	mtrr_use_temp_range(FLASH_BASE_ADDR, CONFIG_ROM_SIZE, MTRR_TYPE_WRPROT);
-
 	x86_mtrr_check();
 }
 
@@ -113,6 +109,9 @@
 	/* Clear for take-off */
 	if (mp_init_with_smm(dev->link_list, &mp_ops) < 0)
 		printk(BIOS_ERR, "MP initialization failure.\n");
+
+	/* The flash is now no longer cacheable. Reset to WP for performance. */
+	mtrr_use_temp_range(FLASH_BASE_ADDR, CONFIG_ROM_SIZE, MTRR_TYPE_WRPROT);
 }
 
 static void model_15_init(device_t dev)

-- 
To view, visit https://review.coreboot.org/25575
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc4cccdf721e252bc87d6cba62a3406a9f19b940
Gerrit-Change-Number: 25575
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180410/1a5dafce/attachment-0001.html>


More information about the coreboot-gerrit mailing list