arch/powerpc/include/asm/opal-api.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/opal-api.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/opal-api.h- Extension
.h- Size
- 31720 bytes
- Lines
- 1189
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct opal_msgstruct opal_ipmi_msgstruct OpalMemoryErrorDatastruct OpalHMIEventstruct OpalIoP7IOCErrorDatastruct OpalIoP7IOCRgcErrorDatastruct OpalIoP7IOCBiErrorDatastruct OpalIoP7IOCCiErrorDatastruct OpalIoPhbErrorCommonstruct OpalIoP7IOCPhbErrorDatastruct OpalIoPhb3ErrorDatastruct OpalIoPhb4ErrorDatastruct opal_prd_msg_headerstruct opal_prd_msgstruct opal_occ_msgstruct opal_sg_entrystruct opal_sg_liststruct opal_i2c_requeststruct opal_mpipl_regionstruct opal_mpipl_fadumpenum OpalFreezeStateenum OpalEehFreezeActionTokenenum OpalPciStatusTokenenum OpalPciErrorSeverityenum OpalErrinjectTypeenum OpalErrinjectFuncenum OpalMmioWindowTypeenum OpalExceptionHandlerenum OpalPendingStateenum OpalThreadStatusenum OpalPciBusCompareenum OpalDeviceCompareenum OpalFuncCompareenum OpalPeActionenum OpalPeltvActionenum OpalMveEnableActionenum OpalM64Actionenum OpalPciResetScopeenum OpalPciReinitScopeenum OpalPciResetStateenum OpalPciSlotPresenceenum OpalPciSlotPowerenum OpalSlotLedTypeenum OpalSlotLedStateenum OpalLPCAddressTypeenum opal_msg_typeenum OpalSysparamPermenum OpalMemErr_Version
Annotated Snippet
struct opal_msg {
__be32 msg_type;
__be32 reserved;
__be64 params[8];
};
/* System parameter permission */
enum OpalSysparamPerm {
OPAL_SYSPARAM_READ = 0x1,
OPAL_SYSPARAM_WRITE = 0x2,
OPAL_SYSPARAM_RW = (OPAL_SYSPARAM_READ | OPAL_SYSPARAM_WRITE),
};
enum {
OPAL_IPMI_MSG_FORMAT_VERSION_1 = 1,
};
struct opal_ipmi_msg {
uint8_t version;
uint8_t netfn;
uint8_t cmd;
uint8_t data[];
};
/* FSP memory errors handling */
enum OpalMemErr_Version {
OpalMemErr_V1 = 1,
};
enum OpalMemErrType {
OPAL_MEM_ERR_TYPE_RESILIENCE = 0,
OPAL_MEM_ERR_TYPE_DYN_DALLOC,
};
/* Memory Reilience error type */
enum OpalMemErr_ResilErrType {
OPAL_MEM_RESILIENCE_CE = 0,
OPAL_MEM_RESILIENCE_UE,
OPAL_MEM_RESILIENCE_UE_SCRUB,
};
/* Dynamic Memory Deallocation type */
enum OpalMemErr_DynErrType {
OPAL_MEM_DYNAMIC_DEALLOC = 0,
};
struct OpalMemoryErrorData {
enum OpalMemErr_Version version:8; /* 0x00 */
enum OpalMemErrType type:8; /* 0x01 */
__be16 flags; /* 0x02 */
uint8_t reserved_1[4]; /* 0x04 */
union {
/* Memory Resilience corrected/uncorrected error info */
struct {
enum OpalMemErr_ResilErrType resil_err_type:8;
uint8_t reserved_1[7];
__be64 physical_address_start;
__be64 physical_address_end;
} resilience;
/* Dynamic memory deallocation error info */
struct {
enum OpalMemErr_DynErrType dyn_err_type:8;
uint8_t reserved_1[7];
__be64 physical_address_start;
__be64 physical_address_end;
} dyn_dealloc;
} u;
};
/* HMI interrupt event */
enum OpalHMI_Version {
OpalHMIEvt_V1 = 1,
OpalHMIEvt_V2 = 2,
};
enum OpalHMI_Severity {
OpalHMI_SEV_NO_ERROR = 0,
OpalHMI_SEV_WARNING = 1,
OpalHMI_SEV_ERROR_SYNC = 2,
OpalHMI_SEV_FATAL = 3,
};
enum OpalHMI_Disposition {
OpalHMI_DISPOSITION_RECOVERED = 0,
OpalHMI_DISPOSITION_NOT_RECOVERED = 1,
};
enum OpalHMI_ErrType {
OpalHMI_ERROR_MALFUNC_ALERT = 0,
Annotation
- Detected declarations: `struct opal_msg`, `struct opal_ipmi_msg`, `struct OpalMemoryErrorData`, `struct OpalHMIEvent`, `struct OpalIoP7IOCErrorData`, `struct OpalIoP7IOCRgcErrorData`, `struct OpalIoP7IOCBiErrorData`, `struct OpalIoP7IOCCiErrorData`, `struct OpalIoPhbErrorCommon`, `struct OpalIoP7IOCPhbErrorData`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.