summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/amd/common/psp_verstage/Makefile.inc1
-rw-r--r--src/soc/amd/common/psp_verstage/include/psp_verstage.h (renamed from src/soc/amd/common/psp_verstage/psp_verstage.h)3
-rw-r--r--src/soc/amd/common/psp_verstage/psp_verstage.c6
-rw-r--r--src/soc/amd/picasso/psp_verstage/Makefile.inc2
-rw-r--r--src/soc/amd/picasso/psp_verstage/svc.c (renamed from src/soc/amd/common/psp_verstage/svc.c)12
-rw-r--r--src/soc/amd/picasso/psp_verstage/svc.h (renamed from src/soc/amd/common/psp_verstage/svc.h)0
6 files changed, 19 insertions, 5 deletions
diff --git a/src/soc/amd/common/psp_verstage/Makefile.inc b/src/soc/amd/common/psp_verstage/Makefile.inc
index 40d9c45763..406d28bcc0 100644
--- a/src/soc/amd/common/psp_verstage/Makefile.inc
+++ b/src/soc/amd/common/psp_verstage/Makefile.inc
@@ -16,7 +16,6 @@ verstage-y += printk.c
verstage-y += psp_verstage.c
verstage-y += psp.c
verstage-y += reset.c
-verstage-y += svc.c
verstage-y += timer.c
verstage-y += vboot_crypto.c
diff --git a/src/soc/amd/common/psp_verstage/psp_verstage.h b/src/soc/amd/common/psp_verstage/include/psp_verstage.h
index 4f85d7caa1..f7cb1c94b0 100644
--- a/src/soc/amd/common/psp_verstage/psp_verstage.h
+++ b/src/soc/amd/common/psp_verstage/include/psp_verstage.h
@@ -56,4 +56,7 @@ uint32_t verstage_soc_early_init(void);
void verstage_soc_init(void);
uintptr_t *map_spi_rom(void);
+uint32_t update_psp_bios_dir(uint32_t *psp_dir_offset, uint32_t *bios_dir_offset);
+uint32_t save_uapp_data(void *address, uint32_t size);
+
#endif /* PSP_VERSTAGE_H */
diff --git a/src/soc/amd/common/psp_verstage/psp_verstage.c b/src/soc/amd/common/psp_verstage/psp_verstage.c
index d4c5d155af..58f17e14f1 100644
--- a/src/soc/amd/common/psp_verstage/psp_verstage.c
+++ b/src/soc/amd/common/psp_verstage/psp_verstage.c
@@ -113,8 +113,7 @@ static uint32_t update_boot_region(struct vb2_context *ctx)
return POSTCODE_BDT1_COOKIE_MISMATCH_ERROR;
}
- if (svc_update_psp_bios_dir((void *)&psp_dir_addr,
- (void *)&bios_dir_addr, DIR_OFFSET_SET)) {
+ if (update_psp_bios_dir((void *)&psp_dir_addr, (void *)&bios_dir_addr)) {
printk(BIOS_ERR, "Error: Updated BIOS Directory could not be set.\n");
return POSTCODE_UPDATE_PSP_BIOS_DIR_ERROR;
}
@@ -179,8 +178,7 @@ static uint32_t save_buffers(struct vb2_context **ctx)
memcpy(_transfer_buffer, &buffer_info, sizeof(buffer_info));
- retval = svc_save_uapp_data(UAPP_COPYBUF_CHROME_WORKBUF, (void *)_transfer_buffer,
- buffer_size);
+ retval = save_uapp_data((void *)_transfer_buffer, buffer_size);
if (retval) {
printk(BIOS_ERR, "Error: Could not save workbuf. Error code 0x%08x\n", retval);
return POSTCODE_WORKBUF_SAVE_ERROR;
diff --git a/src/soc/amd/picasso/psp_verstage/Makefile.inc b/src/soc/amd/picasso/psp_verstage/Makefile.inc
index e70360fa51..32b594d2cb 100644
--- a/src/soc/amd/picasso/psp_verstage/Makefile.inc
+++ b/src/soc/amd/picasso/psp_verstage/Makefile.inc
@@ -3,5 +3,7 @@
verstage-generic-ccopts += -I$(src)/soc/amd/picasso/psp_verstage/include
verstage-generic-ccopts += -I$(src)/vendorcode/amd/fsp/picasso/include
+verstage-y += svc.c
+
verstage-y += $(top)/src/vendorcode/amd/fsp/picasso/bl_uapp/bl_uapp_startup.S
verstage-y += $(top)/src/vendorcode/amd/fsp/picasso/bl_uapp/bl_uapp_end.S
diff --git a/src/soc/amd/common/psp_verstage/svc.c b/src/soc/amd/picasso/psp_verstage/svc.c
index acc9c70318..a20c2a618f 100644
--- a/src/soc/amd/common/psp_verstage/svc.c
+++ b/src/soc/amd/picasso/psp_verstage/svc.c
@@ -4,6 +4,7 @@
#include <assert.h>
#include <bl_uapp/bl_syscall_public.h>
+#include <psp_verstage.h>
#include <stddef.h>
void svc_exit(uint32_t status)
@@ -95,6 +96,12 @@ uint32_t svc_unmap_spi_rom(void *spi_rom_addr)
return retval;
}
+uint32_t update_psp_bios_dir(uint32_t *psp_dir_offset, uint32_t *bios_dir_offset)
+{
+ return svc_update_psp_bios_dir(psp_dir_offset, bios_dir_offset,
+ DIR_OFFSET_SET);
+}
+
uint32_t svc_update_psp_bios_dir(uint32_t *psp_dir_offset,
uint32_t *bios_dir_offset, enum dir_offset_operation operation)
{
@@ -105,6 +112,11 @@ uint32_t svc_update_psp_bios_dir(uint32_t *psp_dir_offset,
return retval;
}
+uint32_t save_uapp_data(void *address, uint32_t size)
+{
+ return svc_save_uapp_data(UAPP_COPYBUF_CHROME_WORKBUF, address, size);
+}
+
uint32_t svc_save_uapp_data(enum uapp_copybuf type, void *address,
uint32_t size)
{
diff --git a/src/soc/amd/common/psp_verstage/svc.h b/src/soc/amd/picasso/psp_verstage/svc.h
index 03bae066e0..03bae066e0 100644
--- a/src/soc/amd/common/psp_verstage/svc.h
+++ b/src/soc/amd/picasso/psp_verstage/svc.h