Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firmware/snp: Update 0x3 platform initialization data #265

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/firmware/host/types/snp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,24 @@ pub struct Build {
pub build: u32,
}

bitflags::bitflags! {
/// Various platform initialization configuration data. Byte 0x3 in SEV-SNP's
/// STRUCT_PLATFORM_STATUS.
#[derive(Default)]
pub struct PlatformInit: u8 {
/// Indicates if RMP is initialized.
const IS_RMP_INIT = 1 << 0;
/// Indicates that alias detection has completed since the last system reset
/// and there are no aliasing addresses. Resets to 0.
/// Added in firmware version:
/// Milan family: 1.55.22
/// Genoa family: 1.55.38
const ALIAS_CHECK_COMPLETE = 1 << 1;
/// Indicates TIO is enabled. Present if SevTio feature bit is set.
const IS_TIO_EN = 1 << 3;
}
}

/// Query the SEV-SNP platform status.
///
/// (Chapter 8.3; Table 38)
Expand All @@ -238,7 +256,7 @@ pub struct SnpPlatformStatus {
pub state: u8,

/// IsRmpInitiailzied
pub is_rmp_init: u8,
pub is_rmp_init: PlatformInit,

/// The platform build ID.
pub build_id: u32,
Expand Down
Loading