Skip to content

Commit

Permalink
firmware/snp: Update 0x3 platform initialization data
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
  • Loading branch information
tylerfanelli committed Dec 18, 2024
1 parent 18ed5c5 commit f9175ec
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/firmware/host/types/snp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,21 @@ 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.
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 +253,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

0 comments on commit f9175ec

Please sign in to comment.