Struct smbioslib::SMBiosEntryPoint32[][src]

pub struct SMBiosEntryPoint32 { /* fields omitted */ }

SMBIOS 2.1 (32 bit) Entry Point structure

On non-UEFI systems, the 32-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. This entry point encapsulates an intermediate anchor string that is used by some existing DMI browsers.

On UEFI-based systems, the SMBIOS Entry Point structure can be located by looking in the EFI Configuration Table for the SMBIOS GUID (SMBIOS_TABLE_GUID, {EB9D2D31-2D88-11D3-9A16- 0090273FC14D}) 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

impl<'a> SMBiosEntryPoint32[src]

pub const MINIMUM_SIZE: usize[src]

Minimum acceptable size of this structure

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

pub const SM_ANCHOR: [u8; 4][src]

Anchor String “SM” (offset 0)

pub const DMI_ANCHOR: [u8; 5][src]

Anchor String “DMI” (offset 0x10)

pub const ENTRY_POINT_STRUCTURE_CHECKSUM_OFFSET: usize[src]

Entry Point Structure Checksum Offset

pub const ENTRY_POINT_LENGTH_OFFSET: usize[src]

Entry Point Length Offset

pub const MAJOR_VERSION_OFFSET: usize[src]

SMBIOS Major Version Offset

pub const MINOR_VERSION_OFFSET: usize[src]

SMBIOS Minor Version Offset

pub const MAXIMUM_STRUCTURE_SIZE_OFFSET: usize[src]

Maximum Structure Size Offset

pub const ENTRY_POINT_REVISION_OFFSET: usize[src]

Entry Point Revision Offset

pub const FORMATTED_AREA_OFFSET: usize[src]

Formatted Area Offset

pub const INTERMEDIATE_ANCHOR_OFFSET: usize[src]

Intermediate Anchor String Offset

NOTE: This field is paragraph-aligned, to allow legacy DMI browsers to find this entry point within the SMBIOS Entry Point Structure.

pub const INTERMEDIATE_CHECKSUM_OFFSET: usize[src]

Intermediate Checksum Offset

pub const STRUCTURE_TABLE_LENGTH_OFFSET: usize[src]

Structure Table Length Offset

pub const STRUCTURE_TABLE_ADDRESS_OFFSET: usize[src]

Structure Table Address Offset

pub const NUMBER_OF_SMBIOS_STRUCTURES_OFFSET: usize[src]

Number of SMBIOS Structures Offset

pub const BCD_REVISION_OFFSET: usize[src]

SMBIOS BCD Revision Offset

pub fn entry_point_structure_checksum(&self) -> u8[src]

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.

pub fn entry_point_length(&self) -> u8[src]

Entry Point Length

Length of the Entry Point Structure, starting with the Anchor String field, in bytes, currently 1Fh

NOTE: This value was incorrectly stated in version 2.1 of this specification as 1Eh. Because of this, there might be version 2.1 implementations that use either the 1Eh or the 1Fh value, but version 2.2 or later implementations must use the 1Fh value.

pub fn major_version(&self) -> u8[src]

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)

pub fn minor_version(&self) -> u8[src]

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)

pub fn maximum_structure_size(&self) -> u16[src]

Maximum Structure Size

Size of the largest SMBIOS structure, in bytes, and encompasses the structure’s formatted area and text strings

pub fn entry_point_revision(&self) -> u8[src]

Entry Point Revision

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

  • 00h Entry Point is based on SMBIOS 2.1 definition; formatted area is reserved and set to all 00h.
  • 01h-FFh Reserved for assignment by this specification

pub fn formatted_area(&self) -> [u8; 5][src]

Formatted Area

Value present in the entry_point_revision field defines the interpretation to be placed upon these 5 bytes

pub fn intermediate_anchor(&self) -> [u8; 5][src]

Intermediate Anchor String

DMI, specified as five ASCII characters (5F 44 4D 49 5F).

pub fn intermediate_checksum(&self) -> u8[src]

Intermediate Checksum

Checksum of Intermediate Entry Point Structure (IEPS).

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

pub fn structure_table_length(&self) -> u16[src]

Structure Table Length

Total length of SMBIOS Structure Table, pointed to by the structure_table_address, in bytes

pub fn structure_table_address(&self) -> u32[src]

Structure Table Address

32-bit physical starting address of the read-only SMBIOS Structure Table, which can start at any 32-bit address This area contains all of the SMBIOS structures fully packed together. These structures can then be parsed to produce exactly the same format as that returned from a Get SMBIOS Structure function call.

pub fn number_of_smbios_structures(&self) -> u16[src]

Number of SMBIOS Structures

Total number of structures present in the SMBIOS Structure Table This is the value returned as NumStructures from the Get SMBIOS Information function.

pub fn bcd_revision(&self) -> u8[src]

SMBIOS BCD Revision

Indicates compliance with a revision of this specification It is a BCD value where the upper nibble indicates the major version and the lower nibble the minor version. For revision 2.1, the returned value is 21h. If the value is 00h, only the Major and Minor Versions in offsets 6 and 7 of the Entry Point Structure provide the version information.

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

Load this structure from a file

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

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

Trait Implementations

impl Debug for SMBiosEntryPoint32[src]

impl<'a> TryFrom<Vec<u8, Global>> for SMBiosEntryPoint32[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.