summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
authorMartin Roth <martinroth@chromium.org>2020-10-01 16:05:47 -0600
committerEdward O'Callaghan <quasisec@chromium.org>2020-10-07 04:23:04 +0000
commit9cf3298360097250a1f4fa8ce7f9ada4ed3239d1 (patch)
tree2f2ad79873076b56fdd9280db05cafee7446eb23 /src/vendorcode
parent58d39d07a14f4f1e253fc43c36d66c216ce682d1 (diff)
vc/amd/fsp: Update the svc call header for the Mod Exp SVC
The PSP bootloader version 0.08.0B.7B added support for the Mod Exp svc call. BUG=b:169157796 TEST=Build BRANCH=Zork Signed-off-by: Martin Roth <martinroth@chromium.org> Change-Id: I1ce69c80cec77e1692cf9713a739cc4da4677da6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45942 Reviewed-by: Eric Peers <epeers@google.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Kangheui Won <khwon@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h21
1 files changed, 21 insertions, 0 deletions
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 7cc9fd4396..93f987bfaa 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
@@ -35,6 +35,7 @@
#define SVC_EXIT 0x00
#define SVC_MAP_USER_STACK 0x01
#define SVC_DEBUG_PRINT 0x06
+#define SVC_MODEXP 0x0C
#define SVC_RSAPSS_VERIFY 0x0D
#define SVC_DEBUG_PRINT_EX 0x1A
#define SVC_WAIT_10NS_MULTIPLE 0x1B
@@ -59,6 +60,17 @@
#define PSP_INFO_PRODUCTION_SILICON 0x00000002UL
#define PSP_INFO_VALID 0x80000000UL
+typedef struct MOD_EXP_PARAMS_T
+{
+ char *pExponent; // Exponent address
+ unsigned int ExpSize; // Exponent size in bytes
+ char *pModulus; // Modulus address
+ unsigned int ModulusSize; // Modulus size in bytes
+ char *pMessage; // Message address, same size as ModulusSize
+ char *pOutput; // Output address; Must be big enough to hold the
+ // data of ModulusSize
+} MOD_EXP_PARAMS;
+
typedef struct _RSAPSS_VERIFY_PARAMS_T
{
char *pHash; // Message digest to verify the RSA signature
@@ -384,6 +396,15 @@ uint32_t svc_rsa_pss_verify(const RSAPSS_VERIFY_PARAMS *params);
*/
uint32_t svc_rsa_pkcs_verify(const RSAPKCS_VERIFY_PARAMS *params);
+/* Calculate ModEx
+ *
+ * Parameters:
+ * mod_exp_param - ModExp parameters
+ *
+ * Return value: BL_OK or error code
+ */
+uint32_t svc_modexp(MOD_EXP_PARAMS *mod_exp_param);
+
/* C entry point for the Bootloader Userspace Application */
void Main(void);