summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block/psp/psb.c
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-07-12 17:07:28 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-07-25 22:55:50 +0000
commit645203a28052b78c524bf101df960ae59f5828b0 (patch)
treefa8f29e95dbe2249c7b88cbf13ac0a7ba3d92dd1 /src/soc/amd/common/block/psp/psb.c
parentc7f022ae9567aece54bb2d5a206c0ee27ec34f39 (diff)
soc/amd/common/psp_gen2: return status from soc_read_c2p38
This sort-of reverts commit 00ec1b9fc7ba ("soc/amd/common/block/psp/ psp_gen2: simplify soc_read_c2p38") and is done as a preparation to switch back to using the MMIO access to the PSP mailbox registers. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Icca3c7832295ae9932778f6a64c493e474dad507 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83447 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/common/block/psp/psb.c')
-rw-r--r--src/soc/amd/common/block/psp/psb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/psp/psb.c b/src/soc/amd/common/block/psp/psb.c
index be20fc88c5..a537bff37b 100644
--- a/src/soc/amd/common/block/psp/psb.c
+++ b/src/soc/amd/common/block/psp/psb.c
@@ -110,7 +110,11 @@ static enum cb_err psb_enable(void)
return CB_SUCCESS;
}
- status = soc_read_c2p38();
+ if (soc_read_c2p38(&status) != CB_SUCCESS) {
+ printk(BIOS_ERR, "PSP: Failed to get base address.\n");
+ return CB_ERR;
+ }
+
printk(BIOS_INFO, "PSB: HSTI = %x\n", status);
const u32 psb_test_status = status & PSB_TEST_STATUS_MASK;