summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/cezanne/include/soc/iomap.h4
-rw-r--r--src/soc/amd/common/block/include/amdblocks/psp_efs.h2
-rw-r--r--src/soc/amd/common/psp_verstage/psp_verstage.c7
-rw-r--r--src/soc/amd/picasso/include/soc/iomap.h4
4 files changed, 13 insertions, 4 deletions
diff --git a/src/soc/amd/cezanne/include/soc/iomap.h b/src/soc/amd/cezanne/include/soc/iomap.h
index a4f0f30d80..f83f13aa2d 100644
--- a/src/soc/amd/cezanne/include/soc/iomap.h
+++ b/src/soc/amd/cezanne/include/soc/iomap.h
@@ -36,10 +36,10 @@
#define APU_EMMC_BASE 0xfedd5000
#define APU_EMMC_CONFIG_BASE 0xfedd5800
-#define FLASH_BASE_ADDR ((0xffffffff - CONFIG_ROM_SIZE) + 1)
-
#endif /* ENV_X86 */
+#define FLASH_BASE_ADDR ((0xffffffff - CONFIG_ROM_SIZE) + 1)
+
/* I/O Ranges */
#define ACPI_IO_BASE 0x0400
#define ACPI_PM_EVT_BLK (ACPI_IO_BASE + 0x00)
diff --git a/src/soc/amd/common/block/include/amdblocks/psp_efs.h b/src/soc/amd/common/block/include/amdblocks/psp_efs.h
index 1a6059a1be..a3996cbf3b 100644
--- a/src/soc/amd/common/block/include/amdblocks/psp_efs.h
+++ b/src/soc/amd/common/block/include/amdblocks/psp_efs.h
@@ -29,6 +29,8 @@ struct second_gen_efs { /* todo: expand for Server products */
uint32_t reserved:31;
} __attribute__((packed));
+#define EFS_SECOND_GEN 0
+
/* Copied from coreboot/util/amdfwtool.h */
struct embedded_firmware {
uint32_t signature; /* 0x55aa55aa */
diff --git a/src/soc/amd/common/psp_verstage/psp_verstage.c b/src/soc/amd/common/psp_verstage/psp_verstage.c
index c03cf9b22e..9f27159d69 100644
--- a/src/soc/amd/common/psp_verstage/psp_verstage.c
+++ b/src/soc/amd/common/psp_verstage/psp_verstage.c
@@ -10,6 +10,7 @@
#include <console/console.h>
#include <fmap.h>
#include <pc80/mc146818rtc.h>
+#include <soc/iomap.h>
#include <soc/psp_transfer.h>
#include <security/vboot/vbnv.h>
#include <security/vboot/misc.h>
@@ -121,6 +122,12 @@ static uint32_t update_boot_region(struct vb2_context *ctx)
return POSTCODE_BDT1_COOKIE_MISMATCH_ERROR;
}
+ /* EFS2 uses relative address and PSP isn't happy with that */
+ if (ef_table->efs_gen.gen == EFS_SECOND_GEN) {
+ psp_dir_addr = FLASH_BASE_ADDR + (psp_dir_addr & SPI_ADDR_MASK);
+ bios_dir_addr = FLASH_BASE_ADDR + (bios_dir_addr & SPI_ADDR_MASK);
+ }
+
if (update_psp_bios_dir(&psp_dir_addr, &bios_dir_addr)) {
printk(BIOS_ERR, "Error: Updated BIOS Directory could not be set.\n");
return POSTCODE_UPDATE_PSP_BIOS_DIR_ERROR;
diff --git a/src/soc/amd/picasso/include/soc/iomap.h b/src/soc/amd/picasso/include/soc/iomap.h
index 1577568c90..93f2874fe0 100644
--- a/src/soc/amd/picasso/include/soc/iomap.h
+++ b/src/soc/amd/picasso/include/soc/iomap.h
@@ -61,10 +61,10 @@
#define APU_EMMC_BASE 0xfedd5000
#define APU_EMMC_CONFIG_BASE 0xfedd5800
-#define FLASH_BASE_ADDR ((0xffffffff - CONFIG_ROM_SIZE) + 1)
-
#endif /* ENV_X86 */
+#define FLASH_BASE_ADDR ((0xffffffff - CONFIG_ROM_SIZE) + 1)
+
/* I/O Ranges */
#define ACPI_IO_BASE 0x400
#define ACPI_PM_EVT_BLK (ACPI_IO_BASE + 0x00) /* 4 bytes */