include/linux/ipmi_smi.h
Source file repositories/reference/linux-study-clean/include/linux/ipmi_smi.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ipmi_smi.h- Extension
.h- Size
- 10214 bytes
- Lines
- 329
- 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/ipmi_msgdefs.hlinux/proc_fs.hlinux/platform_device.hlinux/ipmi.h
Detected Declarations
struct devicestruct ipmi_smistruct ipmi_smi_msgstruct ipmi_smi_handlersstruct ipmi_device_idenum ipmi_smi_msg_typefunction ipmi_demangle_device_idfunction ipmi_free_smi_msg
Annotated Snippet
struct ipmi_smi_msg {
struct list_head link;
enum ipmi_smi_msg_type type;
long msgid;
/* Response to this message, will be NULL if not from a user request. */
struct ipmi_recv_msg *recv_msg;
int data_size;
unsigned char data[IPMI_MAX_MSG_LENGTH];
int rsp_size;
unsigned char rsp[IPMI_MAX_MSG_LENGTH];
/*
* Will be called when the system is done with the message
* (presumably to free it).
*/
void (*done)(struct ipmi_smi_msg *msg);
};
#define INIT_IPMI_SMI_MSG(done_handler) \
{ \
.done = done_handler, \
.type = IPMI_SMI_MSG_TYPE_NORMAL \
}
struct ipmi_smi_handlers {
struct module *owner;
/* Capabilities of the SMI. */
#define IPMI_SMI_CAN_HANDLE_IPMB_DIRECT (1 << 0)
unsigned int flags;
/*
* The low-level interface cannot start sending messages to
* the upper layer until this function is called. This may
* not be NULL, the lower layer must take the interface from
* this call.
*/
int (*start_processing)(void *send_info,
struct ipmi_smi *new_intf);
/*
* When called, the low-level interface should disable all
* processing, it should be complete shut down when it returns.
*/
void (*shutdown)(void *send_info);
/*
* Get the detailed private info of the low level interface and store
* it into the structure of ipmi_smi_data. For example: the
* ACPI device handle will be returned for the pnp_acpi IPMI device.
*/
int (*get_smi_info)(void *send_info, struct ipmi_smi_info *data);
/*
* Called to enqueue an SMI message to be sent. This
* operation is not allowed to fail. If an error occurs, it
* should report back the error in a received message. It may
* do this in the current call context, since no write locks
* are held when this is run. Message are delivered one at
* a time by the message handler, a new message will not be
* delivered until the previous message is returned.
*
* This can return an error if the SMI is not in a state where it
* can send a message.
*/
int (*sender)(void *send_info, struct ipmi_smi_msg *msg);
/*
* Called by the upper layer to request that we try to get
* events from the BMC we are attached to.
*/
void (*request_events)(void *send_info);
/*
* Called by the upper layer when some user requires that the
* interface watch for received messages and watchdog
* pretimeouts (basically do a "Get Flags", or not. Used by
* the SMI to know if it should watch for these. This may be
* NULL if the SMI does not implement it. watch_mask is from
* IPMI_WATCH_MASK_xxx above. The interface should run slower
* timeouts for just watchdog checking or faster timeouts when
* waiting for the message queue.
*/
void (*set_need_watch)(void *send_info, unsigned int watch_mask);
/*
Annotation
- Immediate include surface: `linux/ipmi_msgdefs.h`, `linux/proc_fs.h`, `linux/platform_device.h`, `linux/ipmi.h`.
- Detected declarations: `struct device`, `struct ipmi_smi`, `struct ipmi_smi_msg`, `struct ipmi_smi_handlers`, `struct ipmi_device_id`, `enum ipmi_smi_msg_type`, `function ipmi_demangle_device_id`, `function ipmi_free_smi_msg`.
- 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.