Struct MetadataLen120

Source
#[repr(packed(1))]
pub struct MetadataLen120 { pub major_version: u32, pub minor_version: u32, pub software_id: u32, pub hardware_id: u32, pub oem_id: u32, pub model_id: u32, pub app_id: u32, pub flags: QtiFlagsV6, pub soc_version: [u32; 12], pub multi_serial_numbers: [u32; 8], pub root_cert_index: u32, pub anti_rollback_version: u32, }
Expand description

The 120 bytes QTI metadata and OEM metadata representation.

Only HashTableSegment containing MbnHeaderV6 has 120 bytes metadata.

Fields§

§major_version: u32

Metadata major version.

§minor_version: u32

Metadata minor version.

§software_id: u32

A 32-bit software type value of the image which specifies the signed image.

§hardware_id: u32

The hardware ID is composed of JTAG ID.

§oem_id: u32

A 32-bit value served as CASS account ID for the OEM.

§model_id: u32

Model ID prevents misuse of images across various models.

§app_id: u32

Required for a TZ application.

§flags: QtiFlagsV6§soc_version: [u32; 12]

Contains up to 12 unique SoC hardware version values.

§multi_serial_numbers: [u32; 8]

Contains up to 8 serial numbers.

§root_cert_index: u32

The active root certificate index in MRC (Multiple Root Certificate).

§anti_rollback_version: u32

Anti-rollback version specifies the minimum supported version.

Implementations§

Source§

impl MetadataLen120

Source

pub fn as_bytes(&self) -> &[u8; 120]

Convert itself to a 120 bytes slice without copy.

Trait Implementations§

Source§

impl Clone for MetadataLen120

Source§

fn clone(&self) -> MetadataLen120

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MetadataLen120

Source§

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

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

impl Default for MetadataLen120

Source§

fn default() -> MetadataLen120

Returns the “default value” for a type. Read more
Source§

impl Display for MetadataLen120

Source§

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

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

impl From<[u8; 120]> for MetadataLen120

Source§

fn from(value: [u8; 120]) -> Self

Converts to this type from the input type.
Source§

impl From<MetadataLen120> for [u8; 120]

Source§

fn from(value: MetadataLen120) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for MetadataLen120

Source§

fn eq(&self, other: &MetadataLen120) -> 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 Copy for MetadataLen120

Source§

impl Eq for MetadataLen120

Source§

impl StructuralPartialEq for MetadataLen120

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.