Get ME version from SMBIOS type 0xDD (FVI) tables
(smbios: &SmbiosStore)
| 514 | |
| 515 | /// Get ME version from SMBIOS type 0xDD (FVI) tables |
| 516 | pub 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 |
no test coverage detected