include/linux/intel_vsec.h

Source file repositories/reference/linux-study-clean/include/linux/intel_vsec.h

File Facts

System
Linux kernel
Corpus path
include/linux/intel_vsec.h
Extension
.h
Size
7644 bytes
Lines
260
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct intel_vsec_header {
	u8	rev;
	u16	length;
	u16	id;
	u8	num_entries;
	u8	entry_size;
	u8	tbir;
	u32	offset;
};

enum intel_vsec_quirks {
	/* Watcher feature not supported */
	VSEC_QUIRK_NO_WATCHER	= BIT(0),

	/* Crashlog feature not supported */
	VSEC_QUIRK_NO_CRASHLOG	= BIT(1),

	/* Use shift instead of mask to read discovery table offset */
	VSEC_QUIRK_TABLE_SHIFT	= BIT(2),

	/* DVSEC not present (provided in driver data) */
	VSEC_QUIRK_NO_DVSEC	= BIT(3),

	/* Platforms requiring quirk in the auxiliary driver */
	VSEC_QUIRK_EARLY_HW     = BIT(4),
};

/**
 * struct pmt_callbacks - Callback infrastructure for PMT devices
 * @read_telem: when specified, called by client driver to access PMT
 * data (instead of direct copy).
 * * dev:   device reference for the callback's use
 * * guid:  ID of data to acccss
 * * data:  buffer for the data to be copied
 * * off:   offset into the requested buffer
 * * count: size of buffer
 */
struct pmt_callbacks {
	int (*read_telem)(struct device *dev, u32 guid, u64 *data, loff_t off, u32 count);
};

struct vsec_feature_dependency {
	unsigned long feature;
	unsigned long supplier_bitmap;
};

/**
 * struct intel_vsec_platform_info - Platform specific data
 * @parent:    parent device in the auxbus chain
 * @headers:   list of headers to define the PMT client devices to create
 * @deps:      array of feature dependencies
 * @acpi_disc: ACPI discovery tables, each entry is two QWORDs
 *             in little-endian format as defined by the PMT ACPI spec.
 *             Valid only when @provider == INTEL_VSEC_DISC_ACPI.
 * @src:       source of discovery table data
 * @priv_data: private data, usable by parent devices, currently a callback
 * @caps:      bitmask of PMT capabilities for the given headers
 * @quirks:    bitmask of VSEC device quirks
 * @base_addr: allow a base address to be specified (rather than derived)
 * @num_deps:  Count feature dependencies
 */
struct intel_vsec_platform_info {
	struct device *parent;
	struct intel_vsec_header **headers;
	const struct vsec_feature_dependency *deps;
	u32 (*acpi_disc)[4];
	enum intel_vsec_disc_source src;
	void *priv_data;
	unsigned long caps;
	unsigned long quirks;
	u64 base_addr;
	int num_deps;
};

/**
 * struct intel_vsec_device - Auxbus specific device information
 * @auxdev:        auxbus device struct for auxbus access
 * @dev:           struct device associated with the device
 * @resource:      PCI discovery resources (BAR windows), one per discovery
 *                 instance. Valid only when @src == INTEL_VSEC_DISC_PCI
 * @acpi_disc:     ACPI discovery tables, each entry is two QWORDs
 *                 in little-endian format as defined by the PMT ACPI spec.
 *                 Valid only when @src == INTEL_VSEC_DISC_ACPI.
 * @src:           source of discovery table data
 * @ida:           id reference
 * @num_resources: number of resources
 * @id:            xarray id
 * @priv_data:     any private data needed
 * @priv_data_size: size of private data area
 * @quirks:        specified quirks

Annotation

Implementation Notes