Struct smbioslib::SMBiosEntryPoint64
source · 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
impl<'a> SMBiosEntryPoint64
sourcepub const MINIMUM_SIZE: usize = 24usize
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.
sourcepub const SM3_ANCHOR: [u8; 5] = _
pub const SM3_ANCHOR: [u8; 5] = _
Anchor String “SM3” (offset 0)
sourcepub const ENTRY_POINT_STRUCTURE_CHECKSUM_OFFSET: usize = 5usize
pub const ENTRY_POINT_STRUCTURE_CHECKSUM_OFFSET: usize = 5usize
Entry Point Structure Checksum Offset
sourcepub const ENTRY_POINT_LENGTH_OFFSET: usize = 6usize
pub const ENTRY_POINT_LENGTH_OFFSET: usize = 6usize
Entry Point Length Offset
sourcepub const MAJOR_VERSION_OFFSET: usize = 7usize
pub const MAJOR_VERSION_OFFSET: usize = 7usize
SMBIOS Major Version Offset
sourcepub const MINOR_VERSION_OFFSET: usize = 8usize
pub const MINOR_VERSION_OFFSET: usize = 8usize
SMBIOS Minor Version Offset
sourcepub const DOCREV_OFFSET: usize = 9usize
pub const DOCREV_OFFSET: usize = 9usize
SMBIOS Docrev
sourcepub const ENTRY_POINT_REVISION_OFFSET: usize = 10usize
pub const ENTRY_POINT_REVISION_OFFSET: usize = 10usize
Entry Point Revision Offset
sourcepub const STRUCTURE_TABLE_MAXIMUM_SIZE_OFFSET: usize = 12usize
pub const STRUCTURE_TABLE_MAXIMUM_SIZE_OFFSET: usize = 12usize
Structure Table Maximum Size Offset
sourcepub const STRUCTURE_TABLE_ADDRESS_OFFSET: usize = 16usize
pub const STRUCTURE_TABLE_ADDRESS_OFFSET: usize = 16usize
Structure Table Address Offset
sourcepub fn entry_point_structure_checksum(&self) -> u8
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.
sourcepub fn entry_point_length(&self) -> u8
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
sourcepub fn major_version(&self) -> u8
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)
sourcepub fn minor_version(&self) -> u8
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)
sourcepub fn docrev(&self) -> u8
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).
sourcepub fn entry_point_revision(&self) -> u8
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
sourcepub fn structure_table_maximum_size(&self) -> u32
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.
sourcepub fn structure_table_address(&self) -> u64
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
sourcepub fn try_load_from_file(filename: &Path) -> Result<Self, Error>
pub fn try_load_from_file(filename: &Path) -> Result<Self, Error>
Load this structure from a file
sourcepub fn try_scan_from_file<T>(file: &mut File, range: T) -> Result<Self, Error>where
T: RangeBounds<u64> + Iterator<Item = u64>,
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.