pub struct SMBiosEntryPoint32 { /* private fields */ }
Expand description
§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§
Source§impl<'a> SMBiosEntryPoint32
impl<'a> SMBiosEntryPoint32
Sourcepub const MINIMUM_SIZE: usize = 31usize
pub const MINIMUM_SIZE: usize = 31usize
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.
Sourcepub const DMI_ANCHOR: [u8; 5]
pub const DMI_ANCHOR: [u8; 5]
Anchor String “DMI” (offset 0x10)
Sourcepub const ENTRY_POINT_STRUCTURE_CHECKSUM_OFFSET: usize = 4usize
pub const ENTRY_POINT_STRUCTURE_CHECKSUM_OFFSET: usize = 4usize
Entry Point Structure Checksum Offset
Sourcepub const ENTRY_POINT_LENGTH_OFFSET: usize = 5usize
pub const ENTRY_POINT_LENGTH_OFFSET: usize = 5usize
Entry Point Length Offset
Sourcepub const MAJOR_VERSION_OFFSET: usize = 6usize
pub const MAJOR_VERSION_OFFSET: usize = 6usize
SMBIOS Major Version Offset
Sourcepub const MINOR_VERSION_OFFSET: usize = 7usize
pub const MINOR_VERSION_OFFSET: usize = 7usize
SMBIOS Minor Version Offset
Sourcepub const MAXIMUM_STRUCTURE_SIZE_OFFSET: usize = 8usize
pub const MAXIMUM_STRUCTURE_SIZE_OFFSET: usize = 8usize
Maximum Structure Size Offset
Sourcepub const ENTRY_POINT_REVISION_OFFSET: usize = 10usize
pub const ENTRY_POINT_REVISION_OFFSET: usize = 10usize
Entry Point Revision Offset
Sourcepub const FORMATTED_AREA_OFFSET: usize = 11usize
pub const FORMATTED_AREA_OFFSET: usize = 11usize
Formatted Area Offset
Sourcepub const INTERMEDIATE_ANCHOR_OFFSET: usize = 16usize
pub const INTERMEDIATE_ANCHOR_OFFSET: usize = 16usize
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.
Sourcepub const INTERMEDIATE_CHECKSUM_OFFSET: usize = 21usize
pub const INTERMEDIATE_CHECKSUM_OFFSET: usize = 21usize
Intermediate Checksum Offset
Sourcepub const STRUCTURE_TABLE_LENGTH_OFFSET: usize = 22usize
pub const STRUCTURE_TABLE_LENGTH_OFFSET: usize = 22usize
Structure Table Length Offset
Sourcepub const STRUCTURE_TABLE_ADDRESS_OFFSET: usize = 24usize
pub const STRUCTURE_TABLE_ADDRESS_OFFSET: usize = 24usize
Structure Table Address Offset
Sourcepub const NUMBER_OF_SMBIOS_STRUCTURES_OFFSET: usize = 28usize
pub const NUMBER_OF_SMBIOS_STRUCTURES_OFFSET: usize = 28usize
Number of SMBIOS Structures Offset
Sourcepub const BCD_REVISION_OFFSET: usize = 30usize
pub const BCD_REVISION_OFFSET: usize = 30usize
SMBIOS BCD Revision 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 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.
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 maximum_structure_size(&self) -> u16
pub fn maximum_structure_size(&self) -> u16
Maximum Structure Size
Size of the largest SMBIOS structure, in bytes, and encompasses the structure’s formatted area and text strings
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 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
Sourcepub fn formatted_area(&self) -> [u8; 5]
pub fn formatted_area(&self) -> [u8; 5]
Formatted Area
Value present in the entry_point_revision
field defines the
interpretation to be placed upon these 5 bytes
Sourcepub fn intermediate_anchor(&self) -> [u8; 5]
pub fn intermediate_anchor(&self) -> [u8; 5]
Intermediate Anchor String
DMI, specified as five ASCII characters (5F 44 4D 49 5F).
Sourcepub fn intermediate_checksum(&self) -> u8
pub fn intermediate_checksum(&self) -> u8
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.
Sourcepub fn structure_table_length(&self) -> u16
pub fn structure_table_length(&self) -> u16
Structure Table Length
Total length of SMBIOS Structure Table, pointed to by the
structure_table_address
, in bytes
Sourcepub fn structure_table_address(&self) -> u32
pub fn structure_table_address(&self) -> u32
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.
Sourcepub fn number_of_smbios_structures(&self) -> u16
pub fn number_of_smbios_structures(&self) -> u16
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.
Sourcepub fn bcd_revision(&self) -> u8
pub fn bcd_revision(&self) -> u8
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.
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>
pub fn try_scan_from_file<T>(file: &mut File, range: T) -> Result<Self, Error>
Load this structure by scanning a file within the given offsets, looking for the SMBiosEntryPoint32::SM_ANCHOR string.