include/linux/sed-opal.h
Source file repositories/reference/linux-study-clean/include/linux/sed-opal.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/sed-opal.h- Extension
.h- Size
- 2154 bytes
- Lines
- 87
- 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
uapi/linux/sed-opal.hlinux/compiler_types.hlinux/types.h
Detected Declarations
struct opal_devfunction is_sed_ioctlfunction free_opal_devfunction sed_ioctlfunction opal_unlock_from_suspend
Annotated Snippet
#ifndef LINUX_OPAL_H
#define LINUX_OPAL_H
#include <uapi/linux/sed-opal.h>
#include <linux/compiler_types.h>
#include <linux/types.h>
struct opal_dev;
typedef int (sec_send_recv)(void *data, u16 spsp, u8 secp, void *buffer,
size_t len, bool send);
#ifdef CONFIG_BLK_SED_OPAL
void free_opal_dev(struct opal_dev *dev);
bool opal_unlock_from_suspend(struct opal_dev *dev);
struct opal_dev *init_opal_dev(void *data, sec_send_recv *send_recv);
int sed_ioctl(struct opal_dev *dev, unsigned int cmd, void __user *ioctl_ptr);
#define OPAL_AUTH_KEY "opal-boot-pin"
#define OPAL_AUTH_KEY_PREV "opal-boot-pin-prev"
static inline bool is_sed_ioctl(unsigned int cmd)
{
switch (cmd) {
case IOC_OPAL_SAVE:
case IOC_OPAL_LOCK_UNLOCK:
case IOC_OPAL_TAKE_OWNERSHIP:
case IOC_OPAL_ACTIVATE_LSP:
case IOC_OPAL_SET_PW:
case IOC_OPAL_ACTIVATE_USR:
case IOC_OPAL_REVERT_TPR:
case IOC_OPAL_LR_SETUP:
case IOC_OPAL_ADD_USR_TO_LR:
case IOC_OPAL_ENABLE_DISABLE_MBR:
case IOC_OPAL_ERASE_LR:
case IOC_OPAL_SECURE_ERASE_LR:
case IOC_OPAL_PSID_REVERT_TPR:
case IOC_OPAL_MBR_DONE:
case IOC_OPAL_WRITE_SHADOW_MBR:
case IOC_OPAL_GENERIC_TABLE_RW:
case IOC_OPAL_GET_STATUS:
case IOC_OPAL_GET_LR_STATUS:
case IOC_OPAL_GET_GEOMETRY:
case IOC_OPAL_DISCOVERY:
case IOC_OPAL_REVERT_LSP:
case IOC_OPAL_SET_SID_PW:
case IOC_OPAL_REACTIVATE_LSP:
case IOC_OPAL_LR_SET_START_LEN:
case IOC_OPAL_ENABLE_DISABLE_LR:
case IOC_OPAL_GET_SUM_STATUS:
case IOC_OPAL_STACK_RESET:
return true;
}
return false;
}
#else
static inline void free_opal_dev(struct opal_dev *dev)
{
}
static inline bool is_sed_ioctl(unsigned int cmd)
{
return false;
}
static inline int sed_ioctl(struct opal_dev *dev, unsigned int cmd,
void __user *ioctl_ptr)
{
return 0;
}
static inline bool opal_unlock_from_suspend(struct opal_dev *dev)
{
return false;
}
#define init_opal_dev(data, send_recv) NULL
#endif /* CONFIG_BLK_SED_OPAL */
#endif /* LINUX_OPAL_H */
Annotation
- Immediate include surface: `uapi/linux/sed-opal.h`, `linux/compiler_types.h`, `linux/types.h`.
- Detected declarations: `struct opal_dev`, `function is_sed_ioctl`, `function free_opal_dev`, `function sed_ioctl`, `function opal_unlock_from_suspend`.
- 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.