Skip to content

Commit

Permalink
igvm_defs: add support for specific purpose memory in MemoryMapEntryT…
Browse files Browse the repository at this point in the history
…ype. (#64)

This PR adds a MemoryMapEntryType for specific purpose memory. This
corresponds with the UEFI memory map attribute EFI_MEMORY_SP, added in
UEFI 2.8. EFI_MEMORY_SP is used to indicate that the memory has special
properties and is to be reserved for application use, and shouldn't be
used by the firmware or OS.

---------

Co-authored-by: Patrick Payne <[email protected]>
  • Loading branch information
Patrick-Payne and Patrick Payne authored Jun 21, 2024
1 parent fb9eb98 commit 553a654
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions igvm_defs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,14 @@ pub enum MemoryMapEntryType {
/// applied. Some isolation architectures only allow VTL2 protections on
/// certain memory ranges.
VTL2_PROTECTABLE = 0x3,
/// Specific Purpose memory (SPM). This is memory with special properties
/// reserved for specific purposes and shouldn't be used by the firmware
/// or operating system. This corresponds with the UEFI memory map entry
/// flag EFI_MEMORY_SP, introduced in UEFI 2.8.
/// See https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html
#[cfg(feature = "unstable")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
SPECIFIC_PURPOSE = 0x4,
}

impl Default for MemoryMapEntryType {
Expand Down

0 comments on commit 553a654

Please sign in to comment.