include/uapi/linux/virtio_rtc.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/virtio_rtc.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/virtio_rtc.h- Extension
.h- Size
- 5509 bytes
- Lines
- 238
- 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/types.h
Detected Declarations
struct virtio_rtc_req_headstruct virtio_rtc_resp_headstruct virtio_rtc_notif_headstruct virtio_rtc_req_readstruct virtio_rtc_resp_readstruct virtio_rtc_req_read_crossstruct virtio_rtc_resp_read_crossstruct virtio_rtc_req_cfgstruct virtio_rtc_resp_cfgstruct virtio_rtc_req_clock_capstruct virtio_rtc_resp_clock_capstruct virtio_rtc_req_cross_capstruct virtio_rtc_resp_cross_capstruct virtio_rtc_req_read_alarmstruct virtio_rtc_resp_read_alarmstruct virtio_rtc_req_set_alarmstruct virtio_rtc_resp_set_alarmstruct virtio_rtc_req_set_alarm_enabledstruct virtio_rtc_resp_set_alarm_enabledstruct virtio_rtc_notif_alarm
Annotated Snippet
struct virtio_rtc_req_head {
__le16 msg_type;
__u8 reserved[6];
};
/** common response header */
struct virtio_rtc_resp_head {
#define VIRTIO_RTC_S_OK 0
#define VIRTIO_RTC_S_EOPNOTSUPP 2
#define VIRTIO_RTC_S_ENODEV 3
#define VIRTIO_RTC_S_EINVAL 4
#define VIRTIO_RTC_S_EIO 5
__u8 status;
__u8 reserved[7];
};
/** common notification header */
struct virtio_rtc_notif_head {
__le16 msg_type;
__u8 reserved[6];
};
/* read requests */
/* VIRTIO_RTC_REQ_READ message */
struct virtio_rtc_req_read {
struct virtio_rtc_req_head head;
__le16 clock_id;
__u8 reserved[6];
};
struct virtio_rtc_resp_read {
struct virtio_rtc_resp_head head;
__le64 clock_reading;
};
/* VIRTIO_RTC_REQ_READ_CROSS message */
struct virtio_rtc_req_read_cross {
struct virtio_rtc_req_head head;
__le16 clock_id;
/* Arm Generic Timer Counter-timer Virtual Count Register (CNTVCT_EL0) */
#define VIRTIO_RTC_COUNTER_ARM_VCT 0
/* x86 Time-Stamp Counter */
#define VIRTIO_RTC_COUNTER_X86_TSC 1
/* Invalid */
#define VIRTIO_RTC_COUNTER_INVALID 0xFF
__u8 hw_counter;
__u8 reserved[5];
};
struct virtio_rtc_resp_read_cross {
struct virtio_rtc_resp_head head;
__le64 clock_reading;
__le64 counter_cycles;
};
/* control requests */
/* VIRTIO_RTC_REQ_CFG message */
struct virtio_rtc_req_cfg {
struct virtio_rtc_req_head head;
/* no request params */
};
struct virtio_rtc_resp_cfg {
struct virtio_rtc_resp_head head;
/** # of clocks -> clock ids < num_clocks are valid */
__le16 num_clocks;
__u8 reserved[6];
};
/* VIRTIO_RTC_REQ_CLOCK_CAP message */
struct virtio_rtc_req_clock_cap {
struct virtio_rtc_req_head head;
__le16 clock_id;
__u8 reserved[6];
};
struct virtio_rtc_resp_clock_cap {
struct virtio_rtc_resp_head head;
#define VIRTIO_RTC_CLOCK_UTC 0
#define VIRTIO_RTC_CLOCK_TAI 1
#define VIRTIO_RTC_CLOCK_MONOTONIC 2
#define VIRTIO_RTC_CLOCK_UTC_SMEARED 3
#define VIRTIO_RTC_CLOCK_UTC_MAYBE_SMEARED 4
__u8 type;
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct virtio_rtc_req_head`, `struct virtio_rtc_resp_head`, `struct virtio_rtc_notif_head`, `struct virtio_rtc_req_read`, `struct virtio_rtc_resp_read`, `struct virtio_rtc_req_read_cross`, `struct virtio_rtc_resp_read_cross`, `struct virtio_rtc_req_cfg`, `struct virtio_rtc_resp_cfg`, `struct virtio_rtc_req_clock_cap`.
- 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.