drivers/crypto/ccp/psp-dev.h
Source file repositories/reference/linux-study-clean/drivers/crypto/ccp/psp-dev.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/ccp/psp-dev.h- Extension
.h- Size
- 3573 bytes
- Lines
- 138
- Domain
- Driver Families
- Bucket
- drivers/crypto
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/list.hlinux/bits.hlinux/interrupt.hlinux/mutex.hlinux/psp.hlinux/psp-platform-access.hsp-dev.h
Detected Declarations
struct psp_devicestruct psp_ext_req_buffer_hdrstruct psp_ext_requestenum psp_cmdenum psp_sub_cmd
Annotated Snippet
struct psp_device {
struct list_head entry;
struct psp_vdata *vdata;
char name[MAX_PSP_NAME_LEN];
struct device *dev;
struct sp_device *sp;
void __iomem *io_regs;
struct mutex mailbox_mutex;
psp_irq_handler_t sev_irq_handler;
void *sev_irq_data;
void *sev_data;
void *tee_data;
void *platform_access_data;
void *dbc_data;
void *sfs_data;
union psp_cap_register capability;
};
void psp_set_sev_irq_handler(struct psp_device *psp, psp_irq_handler_t handler,
void *data);
void psp_clear_sev_irq_handler(struct psp_device *psp);
struct psp_device *psp_get_master_device(void);
/**
* enum psp_cmd - PSP mailbox commands
* @PSP_CMD_TEE_RING_INIT: Initialize TEE ring buffer
* @PSP_CMD_TEE_RING_DESTROY: Destroy TEE ring buffer
* @PSP_CMD_TEE_EXTENDED_CMD: Extended command
* @PSP_CMD_MAX: Maximum command id
*/
enum psp_cmd {
PSP_CMD_TEE_RING_INIT = 1,
PSP_CMD_TEE_RING_DESTROY = 2,
PSP_CMD_TEE_EXTENDED_CMD = 14,
PSP_CMD_MAX = 15,
};
int psp_mailbox_command(struct psp_device *psp, enum psp_cmd cmd, void *cmdbuff,
unsigned int timeout_msecs, unsigned int *cmdresp);
/**
* struct psp_ext_req_buffer_hdr - Structure of the extended command header
* @payload_size: total payload size
* @sub_cmd_id: extended command ID
* @status: status of command execution (out)
*/
struct psp_ext_req_buffer_hdr {
u32 payload_size;
u32 sub_cmd_id;
u32 status;
} __packed;
struct psp_ext_request {
struct psp_ext_req_buffer_hdr header;
void *buf;
} __packed;
/**
* enum psp_sub_cmd - PSP mailbox sub commands
* @PSP_SUB_CMD_DBC_GET_NONCE: Get nonce from DBC
* @PSP_SUB_CMD_DBC_SET_UID: Set UID for DBC
* @PSP_SUB_CMD_DBC_GET_PARAMETER: Get parameter from DBC
* @PSP_SUB_CMD_DBC_SET_PARAMETER: Set parameter for DBC
* @PSP_SUB_CMD_SFS_GET_FW_VERS: Get firmware versions for ASP and other MP
* @PSP_SUB_CMD_SFS_UPDATE: Command to load, verify and execute SFS package
*/
enum psp_sub_cmd {
PSP_SUB_CMD_DBC_GET_NONCE = PSP_DYNAMIC_BOOST_GET_NONCE,
PSP_SUB_CMD_DBC_SET_UID = PSP_DYNAMIC_BOOST_SET_UID,
PSP_SUB_CMD_DBC_GET_PARAMETER = PSP_DYNAMIC_BOOST_GET_PARAMETER,
PSP_SUB_CMD_DBC_SET_PARAMETER = PSP_DYNAMIC_BOOST_SET_PARAMETER,
PSP_SUB_CMD_SFS_GET_FW_VERS = PSP_SFS_GET_FW_VERSIONS,
PSP_SUB_CMD_SFS_UPDATE = PSP_SFS_UPDATE,
};
int psp_extended_mailbox_cmd(struct psp_device *psp, unsigned int timeout_msecs,
struct psp_ext_request *req);
#endif /* __PSP_DEV_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/list.h`, `linux/bits.h`, `linux/interrupt.h`, `linux/mutex.h`, `linux/psp.h`, `linux/psp-platform-access.h`, `sp-dev.h`.
- Detected declarations: `struct psp_device`, `struct psp_ext_req_buffer_hdr`, `struct psp_ext_request`, `enum psp_cmd`, `enum psp_sub_cmd`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.