include/uapi/misc/amd-apml.h
Source file repositories/reference/linux-study-clean/include/uapi/misc/amd-apml.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/misc/amd-apml.h- Extension
.h- Size
- 3608 bytes
- Lines
- 153
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct apml_mbox_msgstruct apml_cpuid_msgstruct apml_mcamsr_msgstruct apml_reg_xfer_msg
Annotated Snippet
struct apml_mbox_msg {
/*
* Mailbox Message ID
*/
__u32 cmd;
/*
* [0]...[3] mailbox 32bit input/output data
*/
__u32 mb_in_out;
/*
* Error code is returned in case of soft mailbox error
*/
__u32 fw_ret_code;
};
struct apml_cpuid_msg {
/*
* CPUID input
* [0]...[3] cpuid func,
* [4][5] cpuid: thread
* [6] cpuid: ext function & read eax/ebx or ecx/edx
* [7:0] -> bits [7:4] -> ext function &
* bit [0] read eax/ebx or ecx/edx
* CPUID output
*/
__u64 cpu_in_out;
/*
* Status code for CPUID read
*/
__u32 fw_ret_code;
__u32 pad;
};
struct apml_mcamsr_msg {
/*
* MCAMSR input
* [0]...[3] mca msr func,
* [4][5] thread
* MCAMSR output
*/
__u64 mcamsr_in_out;
/*
* Status code for MCA/MSR access
*/
__u32 fw_ret_code;
__u32 pad;
};
struct apml_reg_xfer_msg {
/*
* RMI register address offset
*/
__u16 reg_addr;
/*
* Register data for read/write
*/
__u8 data_in_out;
/*
* Register read or write
*/
__u8 rflag;
};
/*
* AMD sideband interface base IOCTL
*/
#define SB_BASE_IOCTL_NR 0xF9
/**
* DOC: SBRMI_IOCTL_MBOX_CMD
*
* @Parameters
*
* @struct apml_mbox_msg
* Pointer to the &struct apml_mbox_msg that will contain the protocol
* information
*
* @Description
* IOCTL command for APML messages using generic _IOWR
* The IOCTL provides userspace access to AMD sideband mailbox protocol
* - Mailbox message read/write(0x0~0xFF)
* - returning "-EFAULT" if none of the above
* "-EPROTOTYPE" error is returned to provide additional error details
*/
#define SBRMI_IOCTL_MBOX_CMD _IOWR(SB_BASE_IOCTL_NR, 0, struct apml_mbox_msg)
/**
* DOC: SBRMI_IOCTL_CPUID_CMD
*
* @Parameters
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct apml_mbox_msg`, `struct apml_cpuid_msg`, `struct apml_mcamsr_msg`, `struct apml_reg_xfer_msg`.
- Atlas domain: Repository Root And Misc / include.
- 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.