Struct ShimParams

Source
pub struct ShimParams {
Show 17 fields pub kernel_entry_address: u64, pub cmdline_base: u64, pub initrd_base: u64, pub initrd_size: u64, pub initrd_crc: u32, pub memory_start_address: u64, pub memory_size: u64, pub parameter_region_start: u64, pub parameter_region_size: u64, pub vtl2_reserved_region_start: u64, pub vtl2_reserved_region_size: u64, pub isolation_type: IsolationType, pub sidecar_entry_address: u64, pub sidecar_base: u64, pub sidecar_size: u64, pub used: MemoryRange, pub bounce_buffer: Option<MemoryRange>,
}
Expand description

Parameters fixed at IGVM file build time. These contain information about where certain sections are located, that are fixed up after figuring out where the boot loader was relocated to.

Fields§

§kernel_entry_address: u64

The kernel entry address.

§cmdline_base: u64

The address of the [ParavisorCommandLine] structure.

§initrd_base: u64

The initrd address.

§initrd_size: u64

The size of the inird, in bytes.

§initrd_crc: u32

The crc32 of the initrd at file build time.

§memory_start_address: u64

The base address of the VTL2 memory region encoded at build time.

§memory_size: u64

The size of the VTL2 memory region encoded at build time.

§parameter_region_start: u64

The base address of the parameter region.

§parameter_region_size: u64

The size of the parameter region.

§vtl2_reserved_region_start: u64

The base address of the VTL2 reserved region.

§vtl2_reserved_region_size: u64

The size of the VTL2 reserved region.

§isolation_type: IsolationType

Isolation type supported by the boot shim.

§sidecar_entry_address: u64§sidecar_base: u64§sidecar_size: u64§used: MemoryRange

Memory used by the shim.

§bounce_buffer: Option<MemoryRange>

Implementations§

Source§

impl ShimParams

Source

pub fn new(shim_base_address: u64, raw: &ShimParamsRaw) -> Self

Create a new instance of ShimParams from the raw offset based [ShimParamsRaw] and shim base address.

Source

pub fn secrets_start(&self) -> u64

Get the base address of the secrets page.

Source

pub fn cpuid_start(&self) -> u64

Get the size of the CPUID page.

Source

pub fn dt_start(&self) -> u64

Get the base address of the host provided device tree.

Source

pub fn dt_size(&self) -> u64

The size of the device tree region.

Source

pub fn initrd(&self) -> &'static [u8]

Get the initrd as a byte slice.

Source

pub fn command_line(&self) -> &'static ParavisorCommandLine

Get the [ParavisorCommandLine] structure that describes the command line information.

Source

pub fn device_tree(&self) -> &'static [u8]

Get the device tree parameter region as a byte slice. Note that the byte contents of this slice are written by the host which is untrusted and must be validated before usage.

Source

pub fn imported_regions(&self) -> ImportedRegionIter<'_>

Get the list of accepted regions from the parameter region as a ImportedRegionDescriptor slice. Note that this list is provided by the IGVM file and measured.

Source

pub fn imported_regions_hash(&self) -> &'static [u8]

Trait Implementations§

Source§

impl Debug for ShimParams

Source§

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

Formats the value using the given formatter. Read more

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> Same for T

Source§

type Output = T

Should always be Self
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