1/* SPDX-License-Identifier: GPL-2.0-only */
2
3#ifndef __PSP_H
4#define __PSP_H
5
6#ifdef CONFIG_X86
7#include <linux/mem_encrypt.h>
8
9#define __psp_pa(x)	__sme_pa(x)
10#else
11#define __psp_pa(x)	__pa(x)
12#endif
13
14/*
15 * Fields and bits used by most PSP mailboxes
16 *
17 * Note: Some mailboxes (such as SEV) have extra bits or different meanings
18 * and should include an appropriate local definition in their source file.
19 */
20#define PSP_CMDRESP_STS		GENMASK(15, 0)
21#define PSP_CMDRESP_CMD		GENMASK(23, 16)
22#define PSP_CMDRESP_RESERVED	GENMASK(29, 24)
23#define PSP_CMDRESP_RECOVERY	BIT(30)
24#define PSP_CMDRESP_RESP	BIT(31)
25
26#define PSP_DRBL_MSG		PSP_CMDRESP_CMD
27#define PSP_DRBL_RING		BIT(0)
28
29#endif /* __PSP_H */
30