# Functions
AllDirectoryTypes returns all directory types.
DirectoryTypeFromString converts a string into DirectoryType.
DumpBIOSEntry dumps an entry from BIOS directory.
DumpPSPEntry dumps an entry from PSP Directory.
ExtractBIOSEntry extracts a single generic raw entry from BIOS Directory.
ExtractPSPEntry extracts a single generic raw entry from PSP Directory.
GetBIOSDirectoryOfLevel returns the BIOS directory of a certain level.
GetBIOSEntries returns all entries of a certain type from BIOS directory sorted by instance.
GetBIOSEntry returns a singe entry of a certain type from BIOS directory, returns error if multiple entries are found.
GetEntries returns a list of specific type PSP entries.
GetKeys returns all the keys known to the system in the form of a KeySet.
GetPlatformBindingInfo for PSBSignBIOS key returns BIOS Signing Key to Platform Binding information.
GetPSBSignBIOSKey returns and OEM Key that is used to sign BIOS during PSB enabled.
GetPSPDirectoryOfLevel returns the PSP directory of a certain level.
GetPSPEntries returns all entries of a certain type from PSP directory.
GetPSPEntry returns a singe entry of a certain type from PSP directory, returns error if multiple entries are found.
GetRangeBytes converts firmware range to continues bytes sequence TODO: should be moved to fiano's bytes2.
GetSecurityFeatureVector for PSBSignBIOS key returns a security feature selection vector.
IsPSBEnabled checks if firmware has PSB enabled.
NewKeyFromDatabase creates a new key object from key database entry.
NewKeySet builds an empty key set object.
NewMultiKeySignedBlob validates the signature of a blob against multiple possible keys stored in a KeySet, returning the key which validates the signature of the blob.
NewRootKey creates a new root key object which is considered trusted without any need for signature check.
NewSignature creates a new signature object.
NewSignedBlob creates a new signed blob object and validates its signature.
NewTokenKey create a new key object from a signed token.
OutputBIOSEntries outputs the BIOS entries in an ASCII table format.
OutputPSPEntries outputs the PSP entries in an ASCII table format.
ParseAMDFirmware parses AMD firmware from the image bytes.
PatchBIOSEntry takes an AmdFirmware object and modifies one entry in BIOS directory.
PatchPSPEntry takes an AmdFirmware object and modifies one entry in PSP directory.
ValidatePSPEntries validates signature of PSP entries given their entry values in PSP/BIOS Table.
ValidatePSPEntry validates signature of a PSP entry.
ValidateRTM validates signature of RTM volume and BIOS directory table concatenated.
# Constants
ABLKey represents the ABL signing key.
ABLPublicKey represents the key used to sign ABL firmware.
AGESABinary0Entry points to a region of firmware containing PSP AGESA Binary 0.
AMDPublicKeyEntry denotes AMD public key entry in PSP Directory table.
AMDRootKey represents the AMD signing key.
BIOSDirectoryLevel1 represents BIOS directory table level 1.
BIOSDirectoryLevel2 represents BIOS directory table level 2.
BIOSRTMSignatureEntry represents the entry holding the RTM volume signature.
BIOSRTMVolumeEntry represents the RTM volume.
DRTMTAEntry points to a region of firmware containing DRTM TA.
DXIOPHYSRAMFirmwareEntry points to a region of firmware containing DXIO PHY SRAM firmware.
KeyDatabaseEntry points to region of firmware containing key database.
KeyDatabaseKey represents a key extracted from KeyDatabase.
MP5FirmwareEntry points to a region of firmware containing MP5 Firmware.
OEMKey represents the OEM signing key.
OEMSigningKeyEntry represents the OEM signing key.
PSBSignBIOS tells that a key is authorized to sign BIOS for platform secure boot.
PSPDirectoryLevel1 represents PSP directory table level 1.
PSPDirectoryLevel2 represents PSP directory table level 2.
PSPRecoveryBootloader is a recovery instance of PSP bootloader.
SecurityPolicyBinaryEntry points to a region of firmware containing Security Policy Binary.
SEVCodeEntry points to a region of firmware containing SEV Code.
SignAMDBootloaderPSPSMU tells that the corresponding key is authorized to sign AMD developed PSP Boot Loader and AMD developed PSP FW components and SMU FW.
SignAMDOEMPSP tells that the corresponding key is authorized to sign PSP FW (both AMD developed and OEM developed).
SignBIOS tells that the corresponding key is authorized to sign BIOS.
SMUOffChipFirmware2Entry points to a region of firmware containing SMU offchip firmware.
SMUOffChipFirmwareEntry points to a region of firmware containing SMU offchip firmware.
UnlockDebugImageEntry points to a region of firmware containing PSP early secure unlock debug image.
# Structs
BIOSDirectoryEntryItem determines a BIOS directory entry.
ErrInvalidFormat describes a situation when parsing of firmware failed because of invalid format.
ErrNotFound describes a situation when firmware item is not found.
Key structure extracted from the firmware.
KeyData represents the binary format (as it is stored in an image) of the information associated with a key.
KeySet is a container for all keys known to the system.
PlatformBindingInfo describes information of BIOS Signing Key to Platform Binding information.
PSPBinary represents a generic PSPBinary with pre-pended header structure.
PSPDirectoryEntryItem determines a PSP directory entry.
PspHeader models the header pre-pended to PSP binaries.
PSPHeaderData embeds the data of PspHeader.
SecurityFeatureVector represents a security feature selection vector of BIOS OEM key.
Signature represents the raw signature bytes of a blob.
SignatureCheckError is an error type which indicates that signature of an element cannot be validated against its signing key.
SignatureValidationResult represents the result of a signature validate.
SignedBlob represents an object whose signature is guaranteed to be validated.
UnknownSigningKeyError is an error type which indicates that the signing key is unknown.
# Interfaces
FirmwareItem is a special item that references a PSP firmware item and could be one of the following types: DirectoryType or BIOSDirectoryEntryItem or PSPDirectoryEntryItem.
# Type aliases
BIOSEntryType defines the type to hold BIOS Entry Type fields.
Buf16B is a binary buffer 16 bytes long.
Buf32B is a binary buffer 32 bytes long.
Buf36B is a binary buffer 36 bytes long.
Buf3B is a binary buffer 3 bytes long.
Buf44B is a binary buffer 44 bytes long.
Buf4B is a binary buffer 4 bytes long.
Buf8B is a binary buffer 8 bytes long.
DirectoryType denotes specific firmware table in PSP firmware.
KeyID is the primary identifier of a key.
KeyIDs represents a list of KeyID.
KeyType represents the type of the key stored in KeySet.
KeyUsageFlag describes a known values for KeyUsageFlag field of AMD PSP Key structure.
PSPEntryType defines the type to hold PSP Entry Type fields.