diff options
3 files changed, 36 insertions, 0 deletions
diff --git a/src/soc/amd/cezanne/psp_verstage/svc.c b/src/soc/amd/cezanne/psp_verstage/svc.c index e0f1b52d60..e04c702518 100644 --- a/src/soc/amd/cezanne/psp_verstage/svc.c +++ b/src/soc/amd/cezanne/psp_verstage/svc.c @@ -126,3 +126,10 @@ uint32_t svc_modexp(struct mod_exp_params *mod_exp_param) SVC_CALL1(SVC_MODEXP, mod_exp_param, retval); return retval; } + +uint32_t svc_ccp_dma(uint32_t spi_rom_offset, void *dest, uint32_t size) +{ + uint32_t retval = 0; + SVC_CALL3(SVC_CCP_DMA, spi_rom_offset, dest, size, retval); + return retval; +} diff --git a/src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h b/src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h index 61c9e5f0a8..06e9defea7 100644 --- a/src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h +++ b/src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h @@ -49,6 +49,7 @@ #define SVC_RESET_SYSTEM 0x67 #define SVC_READ_TIMER_VAL 0x68 #define SVC_SHA 0x69 +#define SVC_CCP_DMA 0x6A struct mod_exp_params { char *pExponent; // Exponent address @@ -300,6 +301,18 @@ uint32_t svc_crypto_sha(struct sha_generic_data *sha_op, enum sha_operation_mode */ uint32_t svc_modexp(struct mod_exp_params *mod_exp_param); +/* + * Copies the data from source to destination using ccp + * + * Parameters: + * Source Address - SPI ROM offset + * Destination Address - Address in Verstage memory + * Size - Total size to copy + * + * Return value: BL_OK or error code + */ +uint32_t svc_ccp_dma(uint32_t spi_rom_offset, void *dest, uint32_t size); + /* C entry point for the Bootloader Userspace Application */ void Main(void); diff --git a/src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h b/src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h index c057295185..0c168a93b2 100644 --- a/src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h +++ b/src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h @@ -30,6 +30,7 @@ #ifndef _BL_SYSCALL_PUBLIC_H_ #define _BL_SYSCALL_PUBLIC_H_ +#include <bl_uapp/bl_errorcodes_public.h> #include <stdint.h> #define SVC_EXIT 0x00 @@ -394,6 +395,21 @@ uint32_t svc_rsa_pkcs_verify(const struct rsapkcs_verify_params *params); */ uint32_t svc_modexp(struct mod_exp_params *mod_exp_param); +/* + * Copies the data from source to destination using ccp + * + * Parameters: + * Source Address - SPI ROM offset + * Destination Address - Address in Verstage memory + * Size - Total size to copy + * + * Return value: BL_OK or error code + */ +static inline uint32_t svc_ccp_dma(uint32_t spi_rom_offset, void *dest, uint32_t size) +{ + return BL_ERR_UNSUPPORTED_PLATFORM; +} + /* C entry point for the Bootloader Userspace Application */ void Main(void); |