Skip to main content

Module firmware_dll

Module firmware_dll 

Source
Expand description

Read an IGVM image from either a raw IGVM file or a vmfirmwareigvm resource DLL.

Production OpenHCL IGVM files are shipped encapsulated in a Windows resource-only DLL (vmfirmwareigvm.dll / vmfirmwarecvm.dll), where the IGVM payload is stored as a custom VMFW resource with id 1 โ€“ see the 1 VMFW <igvm> entry in openhcl/vmfirmwareigvm_dll/resources.rc. To let dump / dump-corim operate directly on those shipped DLLs (e.g. to confirm a CoRIM is present in the packaged firmware), this module detects a PE input and extracts the embedded IGVM from it.

Constantsยง

VMFW_RESOURCE_TYPE ๐Ÿ”’
Custom PE resource type name under which the IGVM payload is stored in a vmfirmwareigvm resource DLL (the 1 VMFW <igvm> entry in resources.rc).

Functionsยง

extract_vmfw_resource ๐Ÿ”’
Extract the embedded IGVM payload (the VMFW resource) from a PE/DLL image.
read_igvm_image
Read an IGVM image from path, transparently extracting it from a vmfirmwareigvm resource DLL when path points at a PE/DLL rather than a raw IGVM file.
utf16le_eq ๐Ÿ”’
Compare a little-endian UTF-16 PE resource name to an ASCII string.