[coreboot-gerrit] Change in coreboot[master]: amd/stoneyridge: Move AmdInitEnv to ramstage

Marshall Dawson (Code Review) gerrit at coreboot.org
Wed Sep 20 22:14:36 CEST 2017


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


Change subject: amd/stoneyridge: Move AmdInitEnv to ramstage
......................................................................

amd/stoneyridge: Move AmdInitEnv to ramstage

Relocate the call to AGESA in preparation for implementing postcar.
This change should have no net effect as long as the ordering is
maintained and AmdInitEnv stays later than CAR teardown.

BUG=b:66196801

Change-Id: I0e4a5fd979b06cf50907c62d51e55db63c5e00c5
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
---
M src/soc/amd/stoneyridge/chip.c
M src/soc/amd/stoneyridge/romstage.c
2 files changed, 12 insertions(+), 3 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/21613/1

diff --git a/src/soc/amd/stoneyridge/chip.c b/src/soc/amd/stoneyridge/chip.c
index 325d2ea..c230fe7 100644
--- a/src/soc/amd/stoneyridge/chip.c
+++ b/src/soc/amd/stoneyridge/chip.c
@@ -14,6 +14,8 @@
  */
 
 #include <chip.h>
+#include <bootstate.h>
+#include <console/console.h>
 #include <cpu/amd/mtrr.h>
 #include <cpu/cpu.h>
 #include <device/device.h>
@@ -21,6 +23,8 @@
 #include <soc/cpu.h>
 #include <soc/northbridge.h>
 #include <soc/southbridge.h>
+#include <agesawrapper.h>
+#include <agesawrapper_call.h>
 
 struct device_operations cpu_bus_ops = {
 	.read_resources	  = DEVICE_NOOP,
@@ -75,3 +79,11 @@
 	.init = &soc_init,
 	.final = &soc_final
 };
+
+static void do_initenv(void *unused)
+{
+	post_code(0x46);
+	AGESAWRAPPER(amdinitenv);
+}
+
+BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, do_initenv, NULL);
diff --git a/src/soc/amd/stoneyridge/romstage.c b/src/soc/amd/stoneyridge/romstage.c
index 4104f53..00e4b2d 100644
--- a/src/soc/amd/stoneyridge/romstage.c
+++ b/src/soc/amd/stoneyridge/romstage.c
@@ -77,9 +77,6 @@
 	 */
 	chipset_teardown_car();
 
-	post_code(0x44);
-	AGESAWRAPPER(amdinitenv);
-
 	post_code(0x50);
 	run_ramstage();
 

-- 
To view, visit https://review.coreboot.org/21613
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e4a5fd979b06cf50907c62d51e55db63c5e00c5
Gerrit-Change-Number: 21613
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/20170920/5c7e5cd5/attachment.html>


More information about the coreboot-gerrit mailing list