Skip to main content

Crate igvmfilegen

Crate igvmfilegen 

Source
Expand description

Implements a command line utility to generate IGVM files.

ModulesΒ§

corim_signature πŸ”’
Support for patching CoRIM (Concise Reference Integrity Manifest) headers into an existing IGVM file.
file_loader πŸ”’
Implements a loader that serializes the loaded state into the IGVM binary format.
firmware_dll πŸ”’
Read an IGVM image from either a raw IGVM file or a vmfirmwareigvm resource DLL.
identity_mapping πŸ”’
Implements creation of JSON formatted launch measurement identity documents. This comes from Intel’s TD Identity Mapping, and has been expanded for SNP and VBS. This format allows verifiers to validate a COSE Sign1 payload, and correlate that to a launch measurement and SVN.
measurement_diag πŸ”’
Per-platform launch measurement diagnostics.
platform_mask πŸ”’
Helpers for resolving IgvmPlatformType <-> compatibility-mask mappings declared in an IGVM file’s platform headers, and for deriving human-readable / file-name-safe short names for each supported platform.
snp_id_block πŸ”’
SEV-SNP ID block generation and signing.
snp_linux_direct πŸ”’
Generation strategy for a self-contained SNP Linux-direct IGVM.
vp_context_builder πŸ”’
Defines the common VP context builder traits and methods for different isolation architectures.

StructsΒ§

PlatformMeta πŸ”’
Per-config measurement metadata captured during the build loop and consumed after merging to emit JSON identity documents and CoRIM launch endorsements.

EnumsΒ§

CorimHeaderType πŸ”’
CoRIM header types for filtering
Options πŸ”’
Platform πŸ”’
IGVM platform types for CLI selection.

TraitsΒ§

IgvmfilegenRegister πŸ”’
A trait to specialize behavior of the file builder based on different register types for different architectures. Different methods may need to be called depending on the register type that represents the given architecture.

FunctionsΒ§

add_snp_id_block_command πŸ”’
Add a SEV-SNP ID block to an existing IGVM file, either from an out-of-band signature (production) or signed with an ephemeral key (development/test).
build_endorsement_corim πŸ”’
Build a LaunchMeasurement template for the given platform’s launch measurement at the configured guest SVN.
build_endorsement_json πŸ”’
Build a JSON identity document for a platform measurement.
create_igvm_file πŸ”’
Create an IGVM file from the specified config
debug_validate_igvm_file πŸ”’
Validate that the serialized IGVM file round-trips through the parser and re-serializer producing identical structural headers.
dump_corim_headers πŸ”’
Dump CoRIM headers from an IGVM file.
load_image πŸ”’
Load an image.
load_linux πŸ”’
load_uefi πŸ”’
main πŸ”’
patch_corim_signature πŸ”’
Patch a CoRIM signature into an existing IGVM file.
sibling_path πŸ”’
Build a sibling path of output named <base>-<isolation><ext>, where base is output’s stem, <isolation> is derived from meta.platform, and ext includes the leading dot (e.g. ".json" or ".cbor").
snp_temporary_signing_metadata_from_config πŸ”’
Extract temporary-signing metadata from the single SNP guest config.
write_igvm_file_atomic πŸ”’
Atomically write data to output: write to a sibling temp file, then rename it into place. This prevents a crash or interruption during the write from corrupting the output (which may be the same file as the input for in-place edits). Same-volume renames are atomic on both POSIX and Windows (std::fs::rename uses MoveFileExW with MOVEFILE_REPLACE_EXISTING). log_message is emitted before the write.
write_platform_sibling πŸ”’
Write a per-platform sibling file (a JSON identity document, an SNP ID block signing payload, or a CoRIM launch endorsement) next to output, named <base>-<isolation><ext>. ext must include the leading dot.