pub struct ParsedDeviceTree<const MAX_MEMORY_ENTRIES: usize, const MAX_CPU_ENTRIES: usize, const MAX_COMMAND_LINE_SIZE: usize, const MAX_ENTROPY_SIZE: usize> {Show 14 fields
pub device_tree_size: usize,
pub memory: ArrayVec<MemoryEntry, MAX_MEMORY_ENTRIES>,
pub boot_cpuid_phys: u32,
pub cpus: ArrayVec<CpuEntry, MAX_CPU_ENTRIES>,
pub vmbus_vtl0: Option<VmbusInfo>,
pub vmbus_vtl2: Option<VmbusInfo>,
pub command_line: ArrayString<MAX_COMMAND_LINE_SIZE>,
pub com3_serial: bool,
pub gic: Option<GicInfo>,
pub memory_allocation_mode: MemoryAllocationMode,
pub entropy: Option<ArrayVec<u8, MAX_ENTROPY_SIZE>>,
pub device_dma_page_count: Option<u64>,
pub nvme_keepalive: bool,
pub vtl0_alias_map: Option<u64>,
}
Expand description
Struct containing parsed device tree information.
Fields§
§device_tree_size: usize
Total size of the parsed device tree, in bytes.
memory: ArrayVec<MemoryEntry, MAX_MEMORY_ENTRIES>
Parsed sorted memory ranges from the device tree.
boot_cpuid_phys: u32
Boot cpu physical id. On X64, this is the APIC id of the BSP.
cpus: ArrayVec<CpuEntry, MAX_CPU_ENTRIES>
Information for enabled cpus.
vmbus_vtl0: Option<VmbusInfo>
VMBUS info for VTL0.
vmbus_vtl2: Option<VmbusInfo>
VMBUS info for VTL2.
command_line: ArrayString<MAX_COMMAND_LINE_SIZE>
Command line contained in the /chosen
node.
FUTURE: return more information from the chosen node.
com3_serial: bool
Is a com3 device present
gic: Option<GicInfo>
GIC information
memory_allocation_mode: MemoryAllocationMode
The vtl2 memory allocation mode OpenHCL should use for memory.
entropy: Option<ArrayVec<u8, MAX_ENTROPY_SIZE>>
Entropy from the host to be used by the OpenHCL kernel
device_dma_page_count: Option<u64>
The number of pages the host has provided as a hint for device dma.
This is used to allocate a persistent VTL2 pool on non-isolated guests, to allow devices to stay alive during a servicing operation.
nvme_keepalive: bool
Indicates that Host does support NVMe keep-alive.
vtl0_alias_map: Option<u64>
The physical address of the VTL0 alias mapping, if one is configured.
Implementations§
Source§impl<'a, 'b, const MAX_MEMORY_ENTRIES: usize, const MAX_CPU_ENTRIES: usize, const MAX_COMMAND_LINE_SIZE: usize, const MAX_ENTROPY_SIZE: usize> ParsedDeviceTree<MAX_MEMORY_ENTRIES, MAX_CPU_ENTRIES, MAX_COMMAND_LINE_SIZE, MAX_ENTROPY_SIZE>
impl<'a, 'b, const MAX_MEMORY_ENTRIES: usize, const MAX_CPU_ENTRIES: usize, const MAX_COMMAND_LINE_SIZE: usize, const MAX_ENTROPY_SIZE: usize> ParsedDeviceTree<MAX_MEMORY_ENTRIES, MAX_CPU_ENTRIES, MAX_COMMAND_LINE_SIZE, MAX_ENTROPY_SIZE>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create an empty parsed device tree structure. This is used to construct
a valid instance to pass into Self::parse
.
Trait Implementations§
Source§impl<const MAX_MEMORY_ENTRIES: usize, const MAX_CPU_ENTRIES: usize, const MAX_COMMAND_LINE_SIZE: usize, const MAX_ENTROPY_SIZE: usize> Debug for ParsedDeviceTree<MAX_MEMORY_ENTRIES, MAX_CPU_ENTRIES, MAX_COMMAND_LINE_SIZE, MAX_ENTROPY_SIZE>
impl<const MAX_MEMORY_ENTRIES: usize, const MAX_CPU_ENTRIES: usize, const MAX_COMMAND_LINE_SIZE: usize, const MAX_ENTROPY_SIZE: usize> Debug for ParsedDeviceTree<MAX_MEMORY_ENTRIES, MAX_CPU_ENTRIES, MAX_COMMAND_LINE_SIZE, MAX_ENTROPY_SIZE>
Source§impl<const MAX_MEMORY_ENTRIES: usize, const MAX_CPU_ENTRIES: usize, const MAX_COMMAND_LINE_SIZE: usize, const MAX_ENTROPY_SIZE: usize> PartialEq for ParsedDeviceTree<MAX_MEMORY_ENTRIES, MAX_CPU_ENTRIES, MAX_COMMAND_LINE_SIZE, MAX_ENTROPY_SIZE>
impl<const MAX_MEMORY_ENTRIES: usize, const MAX_CPU_ENTRIES: usize, const MAX_COMMAND_LINE_SIZE: usize, const MAX_ENTROPY_SIZE: usize> PartialEq for ParsedDeviceTree<MAX_MEMORY_ENTRIES, MAX_CPU_ENTRIES, MAX_COMMAND_LINE_SIZE, MAX_ENTROPY_SIZE>
Source§fn eq(
&self,
other: &ParsedDeviceTree<MAX_MEMORY_ENTRIES, MAX_CPU_ENTRIES, MAX_COMMAND_LINE_SIZE, MAX_ENTROPY_SIZE>,
) -> bool
fn eq( &self, other: &ParsedDeviceTree<MAX_MEMORY_ENTRIES, MAX_CPU_ENTRIES, MAX_COMMAND_LINE_SIZE, MAX_ENTROPY_SIZE>, ) -> bool
self
and other
values to be equal, and is used by ==
.