pub struct SMBiosEntryPoint64 { /* private fields */ }
Expand description

SMBIOS 3.0 (64 bit) Entry Point structure

On non-UEFI systems, the 64-bit SMBIOS Entry Point structure can be located by application software by searching for the anchor-string on paragraph (16-byte) boundaries within the physical memory address range 000F0000h to 000FFFFFh.

On UEFI-based systems, the SMBIOS Entry Point structure can be located by looking in the EFI Configuration Table for the SMBIOS 3.x GUID (SMBIOS3_TABLE_GUID, {F2FD1544-9794-4A2C-992E836 E5BBCF20E394}) and using the associated pointer. See section 4.6 of the UEFI Specification for details. See section 2.3 of the UEFI Specification for how to report the containing memory type.

Implementations§

source§

impl<'a> SMBiosEntryPoint64

source

pub const MINIMUM_SIZE: usize = 24usize

Minimum acceptable size of this structure

TODO: Review DMTF SMBIOS document history and see if structure sizes smaller than 0x18 existed. If so then change this structure design to return Option<> values and adjust this size accordingly.

source

pub const SM3_ANCHOR: [u8; 5] = _

Anchor String “SM3” (offset 0)

source

pub const ENTRY_POINT_STRUCTURE_CHECKSUM_OFFSET: usize = 5usize

Entry Point Structure Checksum Offset

source

pub const ENTRY_POINT_LENGTH_OFFSET: usize = 6usize

Entry Point Length Offset

source

pub const MAJOR_VERSION_OFFSET: usize = 7usize

SMBIOS Major Version Offset

source

pub const MINOR_VERSION_OFFSET: usize = 8usize

SMBIOS Minor Version Offset

source

pub const DOCREV_OFFSET: usize = 9usize

SMBIOS Docrev

source

pub const ENTRY_POINT_REVISION_OFFSET: usize = 10usize

Entry Point Revision Offset

source

pub const STRUCTURE_TABLE_MAXIMUM_SIZE_OFFSET: usize = 12usize

Structure Table Maximum Size Offset

source

pub const STRUCTURE_TABLE_ADDRESS_OFFSET: usize = 16usize

Structure Table Address Offset

source

pub fn entry_point_structure_checksum(&self) -> u8

Entry Point Structure Checksum

Checksum of the Entry Point Structure (EPS)

This value, when added to all other bytes in the EPS, results in the value 00h (using 8-bit addition calculations). Values in the EPS are summed starting at offset 00h, for entry_point_length bytes.

source

pub fn entry_point_length(&self) -> u8

Entry Point Length

Length of the Entry Point Structure, starting with the Anchor String field, in bytes, currently 18h

source

pub fn major_version(&self) -> u8

SMBIOS Major Version

Major version of this specification implemented in the table structures (for example, the value is 0Ah (10) for revision 10.22 and 02h for revision 2.1)

source

pub fn minor_version(&self) -> u8

SMBIOS Minor Version

Minor version of this specification implemented in the table structures (for example, the value is 16h (22) for revision 10.22 and 01h for revision 2.1)

source

pub fn docrev(&self) -> u8

SMBIOS Docrev

Identifies the docrev of this specification implemented in the table structures (for example, the value is 00h for revision 10.22.0 and 01h for revision 2.7.1).

source

pub fn entry_point_revision(&self) -> u8

Entry Point Revision

EPS revision implemented in this structure and identifies the formatting of offsets 0Bh and beyond as follows:

  • 00h Reserved for assignment by this specification
  • 01h Entry Point is based on SMBIOS 3.0 definition;
  • 02h-FFh Reserved for assignment by this specification; offsets 0Ch-17h are defined per revision 01h
source

pub fn structure_table_maximum_size(&self) -> u32

Structure Table Maximum Size

Maximum size of SMBIOS Structure Table, pointed to by the Structure Table Address, in bytes. The actual size is guaranteed to be less or equal to the maximum size.

source

pub fn structure_table_address(&self) -> u64

Structure Table Address

The 64-bit physical starting address of the read-only SMBIOS Structure Table, which can start at any 64-bit address. This area contains all of the SMBIOS structures fully packed together

source

pub fn try_load_from_file(filename: &Path) -> Result<Self, Error>

Load this structure from a file

source

pub fn try_scan_from_file<T>(file: &mut File, range: T) -> Result<Self, Error>where T: RangeBounds<u64> + Iterator<Item = u64>,

Load this structure by scanning a file within the given offsets, looking for the SMBiosEntryPoint64::SM3_ANCHOR string.

Trait Implementations§

source§

impl Debug for SMBiosEntryPoint64

source§

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

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

impl Serialize for SMBiosEntryPoint64

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'a> TryFrom<Vec<u8, Global>> for SMBiosEntryPoint64

§

type Error = Error

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

fn try_from(raw: Vec<u8>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

source§

impl<T, U> Into<U> for Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.