Skip to content

Commit

Permalink
Merge pull request #225 from 00xc/fw_meta/cpuid-page
Browse files Browse the repository at this point in the history
fw_meta: do not panic on CPUID page absence
  • Loading branch information
joergroedel authored Jan 26, 2024
2 parents 0328675 + b5ce98a commit 71bcc1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/fw_meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ pub fn parse_fw_meta_data(mem: &[u8]) -> Result<SevFWMetaData, SvsmError> {

// Verify that the required elements are present.
if meta_data.cpuid_page.is_none() {
panic!("FW does not specify CPUID_PAGE location");
log::error!("FW does not specify CPUID_PAGE location");
return Err(SvsmError::Firmware);
}

Ok(meta_data)
Expand Down

0 comments on commit 71bcc1d

Please sign in to comment.