soc/amd/picasso: Add common PSP support
Add a new psp.c file so the base address can be determined, and select the common/block/psp feature. BUG=b:153677737 Change-Id: I322fd11a867a817375ff38a008219f9236c4f2ea Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://chromium-review.googlesource.com/2020368 Tested-by: Eric Peers <epeers@google.com> Reviewed-by: Eric Peers <epeers@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40296 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Felix Held
parent
0c70b4ac11
commit
5a73fc35e2
22
src/soc/amd/picasso/psp.c
Normal file
22
src/soc/amd/picasso/psp.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* This file is part of the coreboot project. */
|
||||
|
||||
#include <console/console.h>
|
||||
#include <cpu/x86/msr.h>
|
||||
#include <amdblocks/psp.h>
|
||||
|
||||
#define PSP_MAILBOX_OFFSET 0x10570
|
||||
#define MSR_CU_CBBCFG 0xc00110a2
|
||||
|
||||
void *soc_get_mbox_address(void)
|
||||
{
|
||||
uintptr_t psp_mmio;
|
||||
|
||||
psp_mmio = rdmsr(MSR_CU_CBBCFG).lo;
|
||||
if (psp_mmio == 0xffffffff) {
|
||||
printk(BIOS_WARNING, "PSP: MSR_CU_CBBCFG uninitialized\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (void *)(psp_mmio + PSP_MAILBOX_OFFSET);
|
||||
}
|
Reference in New Issue
Block a user