include/linux/peci.h
Source file repositories/reference/linux-study-clean/include/linux/peci.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/peci.h- Extension
.h- Size
- 3152 bytes
- Lines
- 110
- 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.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/kernel.hlinux/mutex.hlinux/types.h
Detected Declarations
struct peci_controllerstruct peci_requeststruct peci_controller_opsstruct peci_controllerstruct peci_devicestruct peci_request
Annotated Snippet
struct peci_controller_ops {
int (*xfer)(struct peci_controller *controller, u8 addr, struct peci_request *req);
};
/**
* struct peci_controller - PECI controller
* @dev: device object to register PECI controller to the device model
* @ops: pointer to device specific controller operations
* @bus_lock: lock used to protect multiple callers
* @id: PECI controller ID
*
* PECI controllers usually connect to their drivers using non-PECI bus,
* such as the platform bus.
* Each PECI controller can communicate with one or more PECI devices.
*/
struct peci_controller {
struct device dev;
const struct peci_controller_ops *ops;
struct mutex bus_lock; /* held for the duration of xfer */
u8 id;
};
struct peci_controller *devm_peci_controller_add(struct device *parent,
const struct peci_controller_ops *ops);
static inline struct peci_controller *to_peci_controller(void *d)
{
return container_of(d, struct peci_controller, dev);
}
/**
* struct peci_device - PECI device
* @dev: device object to register PECI device to the device model
* @info: PECI device characteristics
* @info.x86_vfm: device vendor-family-model
* @info.peci_revision: PECI revision supported by the PECI device
* @info.socket_id: the socket ID represented by the PECI device
* @addr: address used on the PECI bus connected to the parent controller
* @deleted: indicates that PECI device was already deleted
*
* A peci_device identifies a single device (i.e. CPU) connected to a PECI bus.
* The behaviour exposed to the rest of the system is defined by the PECI driver
* managing the device.
*/
struct peci_device {
struct device dev;
struct {
u32 x86_vfm;
u8 peci_revision;
u8 socket_id;
} info;
u8 addr;
bool deleted;
};
static inline struct peci_device *to_peci_device(struct device *d)
{
return container_of(d, struct peci_device, dev);
}
/**
* struct peci_request - PECI request
* @device: PECI device to which the request is sent
* @tx: TX buffer specific data
* @tx.buf: TX buffer
* @tx.len: transfer data length in bytes
* @rx: RX buffer specific data
* @rx.buf: RX buffer
* @rx.len: received data length in bytes
*
* A peci_request represents a request issued by PECI originator (TX) and
* a response received from PECI responder (RX).
*/
struct peci_request {
struct peci_device *device;
struct {
u8 buf[PECI_REQUEST_MAX_BUF_SIZE];
u8 len;
} rx, tx;
};
#endif /* __LINUX_PECI_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/kernel.h`, `linux/mutex.h`, `linux/types.h`.
- Detected declarations: `struct peci_controller`, `struct peci_request`, `struct peci_controller_ops`, `struct peci_controller`, `struct peci_device`, `struct peci_request`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.