bootloader_fdt_parser

Struct ParsedBootDtInfo

Source
pub struct ParsedBootDtInfo {
    pub cpus: Vec<Cpu>,
    pub vtl0_alias_map: Option<u64>,
    pub vtl2_memory: Vec<MemoryRangeWithNode>,
    pub partition_memory_map: Vec<AddressRange>,
    pub vtl0_mmio: Vec<MemoryRange>,
    pub config_ranges: Vec<MemoryRange>,
    pub vtl2_reserved_range: MemoryRange,
    pub accepted_ranges: Vec<MemoryRange>,
    pub gic: Option<GicInfo>,
    pub memory_allocation_mode: MemoryAllocationMode,
    pub isolation: IsolationType,
    pub private_pool_ranges: Vec<MemoryRangeWithNode>,
}
Expand description

Information parsed from the device tree provided by openhcl_boot. These values are trusted, as it’s expected that openhcl_boot has already validated the host provided device tree.

Fields§

§cpus: Vec<Cpu>

The cpus in the system. The index in the vector is also the mshv VP index.

§vtl0_alias_map: Option<u64>

The physical address of the VTL0 alias mapping, if one is configured.

§vtl2_memory: Vec<MemoryRangeWithNode>

The memory ranges for VTL2 that were reported to the kernel. This is sorted in ascending order.

§partition_memory_map: Vec<AddressRange>

The unified memory map for the partition, from the bootloader. Sorted in ascending order. Note that this includes mmio gaps as well.

§vtl0_mmio: Vec<MemoryRange>

The mmio to report to VTL0.

§config_ranges: Vec<MemoryRange>

The ranges config regions are stored at.

§vtl2_reserved_range: MemoryRange

The VTL2 reserved range.

§accepted_ranges: Vec<MemoryRange>

The ranges that were accepted at load time by the host on behalf of the guest.

§gic: Option<GicInfo>

GIC information

§memory_allocation_mode: MemoryAllocationMode

The memory allocation mode the bootloader decided to use.

§isolation: IsolationType

The isolation type of the partition.

§private_pool_ranges: Vec<MemoryRangeWithNode>

VTL2 range for private pool memory.

Implementations§

Source§

impl ParsedBootDtInfo

Source

pub fn new() -> Result<Self>

Read parameters passed via device tree by openhcl_boot, at /sys/firmware/fdt.

The device tree is expected to be well formed from the bootloader, so any errors here are not expected.

Trait Implementations§

Source§

impl Debug for ParsedBootDtInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Inspect for ParsedBootDtInfo

Source§

fn inspect(&self, req: Request<'_>)

Inspects the object.
Source§

impl PartialEq for ParsedBootDtInfo

Source§

fn eq(&self, other: &ParsedBootDtInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ParsedBootDtInfo

Source§

impl StructuralPartialEq for ParsedBootDtInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more