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>
This commit is contained in:
Mario Limonciello
2023-03-10 15:19:46 -06:00
committed by Herbert Xu
parent ae7d45fb7c
commit 1c5c1daf04
6 changed files with 33 additions and 30 deletions

View File

@@ -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 */