drivers/crypto/ccp/sev-dev.h

Source file repositories/reference/linux-study-clean/drivers/crypto/ccp/sev-dev.h

File Facts

System
Linux kernel
Corpus path
drivers/crypto/ccp/sev-dev.h
Extension
.h
Size
1920 bytes
Lines
87
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct sev_misc_dev {
	struct kref refcount;
	struct miscdevice misc;
};

struct sev_tio_status;

struct sev_device {
	struct device *dev;
	struct psp_device *psp;

	void __iomem *io_regs;

	struct sev_vdata *vdata;

	unsigned int int_rcvd;
	wait_queue_head_t int_queue;
	struct sev_misc_dev *misc;

	u8 api_major;
	u8 api_minor;
	u8 build;

	void *cmd_buf;
	void *cmd_buf_backup;
	bool cmd_buf_active;
	bool cmd_buf_backup_active;

	bool snp_initialized;

	struct sev_user_data_status sev_plat_status;

	struct sev_user_data_snp_status snp_plat_status;
	struct snp_feature_info snp_feat_info_0;

	struct tsm_dev *tsmdev;
	struct sev_tio_status *tio_status;
};

int sev_dev_init(struct psp_device *psp);
void sev_dev_destroy(struct psp_device *psp);

int __sev_do_cmd_locked(int cmd, void *data, int *psp_ret);

void sev_pci_init(void);
void sev_pci_exit(void);

struct page *snp_alloc_hv_fixed_pages(unsigned int num_2mb_pages);
void snp_free_hv_fixed_pages(struct page *page);

void sev_tsm_init_locked(struct sev_device *sev, void *tio_status_page);
void sev_tsm_uninit(struct sev_device *sev);
int sev_tio_cmd_buffer_len(int cmd);

#endif /* __SEV_DEV_H */

Annotation

Implementation Notes