File: sfs.h

package info (click to toggle)
linux 6.18.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,742,348 kB
  • sloc: ansic: 26,784,619; asm: 272,099; sh: 148,799; python: 79,242; makefile: 57,743; perl: 36,527; xml: 19,542; cpp: 5,911; yacc: 4,939; lex: 2,950; awk: 1,607; sed: 30; ruby: 25
file content (47 lines) | stat: -rw-r--r-- 963 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * AMD Platform Security Processor (PSP) Seamless Firmware (SFS) Support.
 *
 * Copyright (C) 2025 Advanced Micro Devices, Inc.
 *
 * Author: Ashish Kalra <ashish.kalra@amd.com>
 */

#ifndef __SFS_H__
#define __SFS_H__

#include <uapi/linux/psp-sfs.h>

#include <linux/device.h>
#include <linux/miscdevice.h>
#include <linux/psp-sev.h>
#include <linux/psp-platform-access.h>
#include <linux/set_memory.h>

#include "psp-dev.h"

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

struct sfs_command {
	struct psp_ext_req_buffer_hdr hdr;
	u8 buf[PAGE_SIZE - sizeof(struct psp_ext_req_buffer_hdr)];
	u8 sfs_buffer[];
} __packed;

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

	struct page *page;
	struct sfs_command *command_buf;

	struct sfs_misc_dev *misc;
};

void sfs_dev_destroy(struct psp_device *psp);
int sfs_dev_init(struct psp_device *psp);

#endif /* __SFS_H__ */