|
SimpleKernel 1.17.0
|
单个设备的硬件资源描述。 More...
#include <device_node.hpp>

Public Attributes | |
| char | name [32] {} |
| 可读的设备名称(来自 FDT 节点名) | |
| BusType | bus_type {BusType::kPlatform} |
| DeviceType | type {DeviceType::kPlatform} |
| uint64_t | mmio_base {0} |
| 第一个 MMIO 区域(需要多 BAR 支持时扩展为数组) | |
| size_t | mmio_size {0} |
| uint32_t | irq {0} |
| 第一条中断线(需要多 IRQ 支持时扩展) | |
| char | compatible [128] {} |
| FDT compatible 字符串列表(以 '\0' 分隔,如 "ns16550a\0ns16550\0") | |
| size_t | compatible_len {0} |
| uint32_t | dev_id {0} |
| 由 DeviceManager 分配的全局设备 ID | |
| bool | bound {false} |
| 由 ProbeAll() 在 DeviceManager::lock_ 保护下设置 — 无需每节点锁。 | |
| vfs::BlockDevice * | block_device {nullptr} |
单个设备的硬件资源描述。
纯数据结构 — 无生命周期管理、无 DMA 缓冲区、 无并发原语。bound 受 DeviceManager::lock_ 保护 (在整个 ProbeAll() 循环期间持有)。
Definition at line 39 of file device_node.hpp.
| vfs::BlockDevice* DeviceNode::block_device {nullptr} |
由驱动 Probe() 设置 — 指向内核生命周期的适配器。 若不是块设备或尚未探测则为 nullptr。
Definition at line 65 of file device_node.hpp.
| bool DeviceNode::bound {false} |
由 ProbeAll() 在 DeviceManager::lock_ 保护下设置 — 无需每节点锁。
Definition at line 61 of file device_node.hpp.
| BusType DeviceNode::bus_type {BusType::kPlatform} |
Definition at line 43 of file device_node.hpp.
| char DeviceNode::compatible[128] {} |
FDT compatible 字符串列表(以 '\0' 分隔,如 "ns16550a\0ns16550\0")
Definition at line 54 of file device_node.hpp.
| size_t DeviceNode::compatible_len {0} |
Definition at line 55 of file device_node.hpp.
| uint32_t DeviceNode::dev_id {0} |
| uint32_t DeviceNode::irq {0} |
| uint64_t DeviceNode::mmio_base {0} |
| size_t DeviceNode::mmio_size {0} |
Definition at line 48 of file device_node.hpp.
| char DeviceNode::name[32] {} |
| DeviceType DeviceNode::type {DeviceType::kPlatform} |
Definition at line 44 of file device_node.hpp.