diff options
author | Mario Limonciello <mario.limonciello@amd.com> | 2023-03-10 15:19:46 -0600 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-03-17 11:16:43 +0800 |
commit | 1c5c1daf04d13916867ef68c6ba7ae4f5e73801f (patch) | |
tree | 99cce21061abb369302f6f397adfc590e6cb87c7 /include/linux/psp.h | |
parent | ae7d45fb7ca75e94b478e2404709ba3024774334 (diff) |
crypto: ccp - Move some PSP mailbox bit definitions into common header
Some of the bits and fields used for mailboxes communicating with the
PSP are common across all mailbox implementations (SEV, TEE, etc).
Move these bits into the common `linux/psp.h` so they don't need to
be re-defined for each implementation.
Acked-by: Rijo Thomas <Rijo-john.Thomas@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/psp.h')
-rw-r--r-- | include/linux/psp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/psp.h b/include/linux/psp.h index 202162487ec3..d3424790a70e 100644 --- a/include/linux/psp.h +++ b/include/linux/psp.h @@ -11,4 +11,16 @@ #define __psp_pa(x) __pa(x) #endif +/* + * Fields and bits used by most PSP mailboxes + * + * Note: Some mailboxes (such as SEV) have extra bits or different meanings + * and should include an appropriate local definition in their source file. + */ +#define PSP_CMDRESP_STS GENMASK(15, 0) +#define PSP_CMDRESP_CMD GENMASK(23, 16) +#define PSP_CMDRESP_RESERVED GENMASK(29, 24) +#define PSP_CMDRESP_RECOVERY BIT(30) +#define PSP_CMDRESP_RESP BIT(31) + #endif /* __PSP_H */ |