diff options
-rw-r--r-- | src/soc/amd/cezanne/Kconfig | 8 | ||||
-rw-r--r-- | src/soc/amd/common/psp_verstage/psp_verstage.c | 11 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/soc/amd/cezanne/Kconfig b/src/soc/amd/cezanne/Kconfig index 81cf9748c6..48944c858f 100644 --- a/src/soc/amd/cezanne/Kconfig +++ b/src/soc/amd/cezanne/Kconfig @@ -345,6 +345,14 @@ config PSP_DISABLE_POSTCODES help Disables the output of port80 post codes from PSP. +config PSP_POSTCODES_ON_ESPI + bool "Use eSPI bus for PSP post codes" + depends on !PSP_DISABLE_POSTCODES + default y + help + Select to send PSP port80 post codes on eSPI bus. + If not selected, PSP port80 codes will be sent on LPC bus. + config PSP_INIT_ESPI bool "Initialize eSPI in PSP Stage 2 Boot Loader" help diff --git a/src/soc/amd/common/psp_verstage/psp_verstage.c b/src/soc/amd/common/psp_verstage/psp_verstage.c index 9d0fb2259a..d64c257edf 100644 --- a/src/soc/amd/common/psp_verstage/psp_verstage.c +++ b/src/soc/amd/common/psp_verstage/psp_verstage.c @@ -206,16 +206,21 @@ void Main(void) /* * Do not use printk() before console_init() * Do not use post_code() before verstage_mainboard_init() + * Do not use svc_write_postcode before verstage_soc_espi_init() if PSP uses ESPI + * to write postcodes. */ timestamp_init(timestamp_get()); - svc_write_postcode(POSTCODE_ENTERED_PSP_VERSTAGE); + if (!CONFIG(PSP_POSTCODES_ON_ESPI)) + svc_write_postcode(POSTCODE_ENTERED_PSP_VERSTAGE); svc_debug_print("Entering verstage on PSP\n"); memset(&_bss_start, '\0', &_bss_end - &_bss_start); - svc_write_postcode(POSTCODE_CONSOLE_INIT); + if (!CONFIG(PSP_POSTCODES_ON_ESPI)) + svc_write_postcode(POSTCODE_CONSOLE_INIT); console_init(); - svc_write_postcode(POSTCODE_EARLY_INIT); + if (!CONFIG(PSP_POSTCODES_ON_ESPI)) + svc_write_postcode(POSTCODE_EARLY_INIT); retval = verstage_soc_early_init(); if (retval) { /* |