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); diff --git a/src/soc/amd/stoneyridge/romstage.c b/src/soc/amd/stoneyridge/romstage.c index b062c6c4a9..6769a262f0 100644 --- a/src/soc/amd/stoneyridge/romstage.c +++ b/src/soc/amd/stoneyridge/romstage.c @@ -72,14 +72,10 @@ asmlinkage void car_stage_entry(void) /* * This writes contents to DRAM backing before teardown. - * todo: move CAR teardown to postcar implementation and - * relocate amdinitenv to ramstage. + * todo: move CAR teardown to postcar implementation. */ chipset_teardown_car(); - post_code(0x44); - AGESAWRAPPER(amdinitenv); - post_code(0x50); run_ramstage();