Naresh Solanki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85626?usp=email )
Change subject: soc/amd/common/psp_gen2: Add config for PSP MBOX offset ......................................................................
soc/amd/common/psp_gen2: Add config for PSP MBOX offset
Some SoC like Glinda use different PSP MBOX offset. Add config to allow SoC Kconfig to override PSP MBOX offset.
Change-Id: Iefcc7d3b75689b43399a7a7b612417c155619211 Signed-off-by: Naresh Solanki naresh.solanki@9elements.com --- M src/soc/amd/common/block/psp/Kconfig M src/soc/amd/common/block/psp/psp_gen2.c 2 files changed, 6 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/85626/1
diff --git a/src/soc/amd/common/block/psp/Kconfig b/src/soc/amd/common/block/psp/Kconfig index 07ee0fa..17853fa 100644 --- a/src/soc/amd/common/block/psp/Kconfig +++ b/src/soc/amd/common/block/psp/Kconfig @@ -202,3 +202,7 @@ default y if SOC_AMD_COMMON_BLOCK_PSP help Select this if AMDFWTOOL needs to be built + +config PSPV2_MBOX_CMD_OFFSET + hex + default 0x10570 diff --git a/src/soc/amd/common/block/psp/psp_gen2.c b/src/soc/amd/common/block/psp/psp_gen2.c index 21c1f2a..026d32f 100644 --- a/src/soc/amd/common/block/psp/psp_gen2.c +++ b/src/soc/amd/common/block/psp/psp_gen2.c @@ -8,8 +8,8 @@ #include <device/mmio.h> #include "psp_def.h"
-#define PSP_MAILBOX_COMMAND_OFFSET 0x10570 /* 4 bytes */ -#define PSP_MAILBOX_BUFFER_OFFSET 0x10574 /* 8 bytes */ +#define PSP_MAILBOX_COMMAND_OFFSET CONFIG_PSPV2_MBOX_CMD_OFFSET /* 4 bytes */ +#define PSP_MAILBOX_BUFFER_OFFSET (CONFIG_PSPV2_MBOX_CMD_OFFSET + 4) /* 8 bytes */
#define IOHC_MISC_PSP_MMIO_REG 0x2e0