aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge/chip.c
diff options
context:
space:
mode:
authorMarshall Dawson <marshalldawson3rd@gmail.com>2017-10-12 16:10:14 -0600
committerMartin Roth <martinroth@google.com>2017-11-14 17:27:23 +0000
commitf5e057c885bf28d12b70625880632f5382c5bb97 (patch)
tree36dfd4933c9829098a3cb8de676b3280288465c5 /src/soc/amd/stoneyridge/chip.c
parent6350b8789f86c1781e2953633d6191b37fb96ac3 (diff)
soc/amd/stoneyridge: Load SMU fimware using PSP
Add the ability to locate the SMRAM-based SMU firmware early and call the PSP library to load it prior to DRAM initialization. This is currently placed in bootblock to ensure the blob is loaded before any reset occurs. Add similar functionality in ramstage for SMU FW2 to the hook already in place for running AmdInitEnv. Rename the hook to make more sense. This patch was tested using a pre-released PSP bootloader on a google/kahlee system. Leave the option unused until the bootloader is ready. BUG=b:66339938 Change-Id: Iedf768e54a7c3b3e7cf07e266a6906923c0fad42 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/22058 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/amd/stoneyridge/chip.c')
-rw-r--r--src/soc/amd/stoneyridge/chip.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/soc/amd/stoneyridge/chip.c b/src/soc/amd/stoneyridge/chip.c
index 622e72c274..8e4ab2ee88 100644
--- a/src/soc/amd/stoneyridge/chip.c
+++ b/src/soc/amd/stoneyridge/chip.c
@@ -23,6 +23,7 @@
#include <soc/cpu.h>
#include <soc/northbridge.h>
#include <soc/southbridge.h>
+#include <amdblocks/psp.h>
#include <agesawrapper.h>
#include <agesawrapper_call.h>
@@ -78,10 +79,14 @@ struct chip_operations soc_amd_stoneyridge_ops = {
.final = &soc_final
};
-static void do_initenv(void *unused)
+static void earliest_ramstage(void *unused)
{
post_code(0x46);
+ if (IS_ENABLED(CONFIG_SOC_AMD_PSP_SELECTABLE_SMU_FW))
+ psp_load_named_blob(MBOX_BIOS_CMD_SMU_FW2, "smu_fw2");
+
+ post_code(0x47);
AGESAWRAPPER(amdinitenv);
}
-BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, do_initenv, NULL);
+BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, earliest_ramstage, NULL);