MCPcopy Index your code
hub / github.com/FrameworkComputer/framework-system / me_version_from_smbios

Function me_version_from_smbios

framework_lib/src/csme.rs:516–537  ·  view source on GitHub ↗

Get ME version from SMBIOS type 0xDD (FVI) tables

(smbios: &SmbiosStore)

Source from the content-addressed store, hash-verified

514
515/// Get ME version from SMBIOS type 0xDD (FVI) tables
516pub fn me_version_from_smbios(smbios: &SmbiosStore) -> Option<MeFviVersion> {
517 // First try to find handles from Type 14
518 let handles = find_me_handles_from_type14(smbios);
519
520 // Find versions from components 1, 2, or 3 in valid ME tables
521 // The component location varies between systems, so we find all candidates
522 // and return the one with the highest major version (most likely the actual ME version)
523 let mut best_version: Option<MeFviVersion> = None;
524
525 for result in smbios.structures() {
526 if let Ok(Structure::Other(ref raw)) = result {
527 if let Some(version) = parse_me_fvi_version(raw, &handles) {
528 // Keep the version with the highest major number
529 if best_version.is_none() || version.major > best_version.as_ref().unwrap().major {
530 best_version = Some(version);
531 }
532 }
533 }
534 }
535
536 best_version
537}
538
539/// Parse ME version from FVI table
540/// Returns the highest major version found from components 1, 2, or 3

Callers 2

probably_has_nvidiaFunction · 0.85
me_infoFunction · 0.85

Calls 3

parse_me_fvi_versionFunction · 0.85
structuresMethod · 0.80

Tested by

no test coverage detected