File Index
Files and directories
Sign in
FILE

sfs.h

File preview with syntax highlighting.

linux-6.19.14/drivers/crypto/ccp/sfs.h C
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * AMD Platform Security Processor (PSP) Seamless Firmware (SFS) Support.
 4 *
 5 * Copyright (C) 2025 Advanced Micro Devices, Inc.
 6 *
 7 * Author: Ashish Kalra <ashish.kalra@amd.com>
 8 */
 9
10#ifndef __SFS_H__
11#define __SFS_H__
12
13#include <uapi/linux/psp-sfs.h>
14
15#include <linux/device.h>
16#include <linux/miscdevice.h>
17#include <linux/psp-sev.h>
18#include <linux/psp-platform-access.h>
19#include <linux/set_memory.h>
20
21#include "psp-dev.h"
22
23struct sfs_misc_dev {
24	struct kref refcount;
25	struct miscdevice misc;
26};
27
28struct sfs_command {
29	struct psp_ext_req_buffer_hdr hdr;
30	u8 buf[PAGE_SIZE - sizeof(struct psp_ext_req_buffer_hdr)];
31	u8 sfs_buffer[];
32} __packed;
33
34struct sfs_device {
35	struct device *dev;
36	struct psp_device *psp;
37
38	struct page *page;
39	struct sfs_command *command_buf;
40
41	struct sfs_misc_dev *misc;
42};
43
44void sfs_dev_destroy(struct psp_device *psp);
45int sfs_dev_init(struct psp_device *psp);
46
47#endif /* __SFS_H__ */
~/ Read-only file preview.