From 9db8a44081543088caa3f396b570c538064f2fe6 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Wed, 20 Sep 2017 10:24:28 -0600 Subject: amd/stoneyridge: Move AmdInitEnv to ramstage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/21613 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Kyösti Mälkki --- src/soc/amd/stoneyridge/chip.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/soc/amd/stoneyridge/chip.c') diff --git a/src/soc/amd/stoneyridge/chip.c b/src/soc/amd/stoneyridge/chip.c index 325d2ea82e..c230fe7017 100644 --- a/src/soc/amd/stoneyridge/chip.c +++ b/src/soc/amd/stoneyridge/chip.c @@ -14,6 +14,8 @@ */ #include +#include +#include #include #include #include @@ -21,6 +23,8 @@ #include #include #include +#include +#include struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, @@ -75,3 +79,11 @@ struct chip_operations soc_amd_stoneyridge_ops = { .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); -- cgit v1.2.3