Documentation ¶
Index ¶
- type ErrAmiTcgPlatformPeiAfterMemPEFileNotFound
- type ErrAmiTcgPlatformPeiAfterMemUnableToFindPcdFirmwareVendorStart
- type ErrDoesNotMatch
- type ErrDummyFirmwareVersionFileWrongType
- type ErrHPPcdFirmwareVendorEndNotFound
- type ErrInvalidAmiTcgPlatformPeiAfterMem
- type ErrInvalidTCGPEIModule
- type ErrTcgPiePEFileNotFound
- type ErrTcgPieUnableToFindPcdFirmwareVendorStart
- type ErrTooDummyFirmwareVersionFiles
- type ErrTooManyAmiTcgPlatformPeiAfterMems
- type ErrTooManyTCGPEIModules
- type ErrUnknownVendorType
- type FirmwareImage
- type Interface
- type ParsedFirmware
- type ParsedFirmwareGeneric
- func (pcd *ParsedFirmwareGeneric) GetFirmwareVendorVersion() []byte
- func (pcd *ParsedFirmwareGeneric) GetFirmwareVendorVersionCodeRanges() pkgbytes.Ranges
- func (pcd *ParsedFirmwareGeneric) GetFirmwareVendorVersionFFSGUID() guid.GUID
- func (pcd *ParsedFirmwareGeneric) GetFirmwareVendorVersionRanges() pkgbytes.Ranges
- type ParsedFirmwareOCPGeneric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrAmiTcgPlatformPeiAfterMemPEFileNotFound ¶
type ErrAmiTcgPlatformPeiAfterMemPEFileNotFound struct{}
ErrAmiTcgPlatformPeiAfterMemPEFileNotFound means it was unable to find the beginning of the PE file (which contains the PCD firmware vendor value).
func (*ErrAmiTcgPlatformPeiAfterMemPEFileNotFound) Error ¶
func (err *ErrAmiTcgPlatformPeiAfterMemPEFileNotFound) Error() string
type ErrAmiTcgPlatformPeiAfterMemUnableToFindPcdFirmwareVendorStart ¶
type ErrAmiTcgPlatformPeiAfterMemUnableToFindPcdFirmwareVendorStart struct{}
ErrAmiTcgPlatformPeiAfterMemUnableToFindPcdFirmwareVendorStart means it was unable to find the beginning of the PCD firmware vendor value.
func (*ErrAmiTcgPlatformPeiAfterMemUnableToFindPcdFirmwareVendorStart) Error ¶
func (err *ErrAmiTcgPlatformPeiAfterMemUnableToFindPcdFirmwareVendorStart) Error() string
type ErrDoesNotMatch ¶
ErrDoesNotMatch means a value was received with multiple ways, but the value does not match (while it should've).
func (*ErrDoesNotMatch) Error ¶
func (err *ErrDoesNotMatch) Error() string
type ErrDummyFirmwareVersionFileWrongType ¶
type ErrDummyFirmwareVersionFileWrongType struct{}
ErrDummyFirmwareVersionFileWrongType means the version file of a dummy firmware is not a file.
func (*ErrDummyFirmwareVersionFileWrongType) Error ¶
func (err *ErrDummyFirmwareVersionFileWrongType) Error() string
type ErrHPPcdFirmwareVendorEndNotFound ¶
type ErrHPPcdFirmwareVendorEndNotFound struct{}
ErrHPPcdFirmwareVendorEndNotFound means it was unable to find the end of the PCD firmware vendor value.
func (*ErrHPPcdFirmwareVendorEndNotFound) Error ¶
func (err *ErrHPPcdFirmwareVendorEndNotFound) Error() string
type ErrInvalidAmiTcgPlatformPeiAfterMem ¶
type ErrInvalidAmiTcgPlatformPeiAfterMem struct{}
ErrInvalidAmiTcgPlatformPeiAfterMem means it was unable to parse the AmiTcgPlatformPeiAfterMem volume (it appears to be of unexpected/unknown type).
func (*ErrInvalidAmiTcgPlatformPeiAfterMem) Error ¶
func (err *ErrInvalidAmiTcgPlatformPeiAfterMem) Error() string
type ErrInvalidTCGPEIModule ¶
type ErrInvalidTCGPEIModule struct{}
ErrInvalidTCGPEIModule means it was unable to parse the TCG PEI module volume (it appears to be of unexpected/unknown type).
func (*ErrInvalidTCGPEIModule) Error ¶
func (err *ErrInvalidTCGPEIModule) Error() string
type ErrTcgPiePEFileNotFound ¶
type ErrTcgPiePEFileNotFound struct{}
ErrTcgPiePEFileNotFound means it was unable to find the beginning of the PE file (which contains the PCD firmware vendor value).
func (*ErrTcgPiePEFileNotFound) Error ¶
func (err *ErrTcgPiePEFileNotFound) Error() string
type ErrTcgPieUnableToFindPcdFirmwareVendorStart ¶
type ErrTcgPieUnableToFindPcdFirmwareVendorStart struct{}
ErrTcgPieUnableToFindPcdFirmwareVendorStart means it was unable to find the beginning of the PCD firmware vendor value within the TCG PIE module.
func (*ErrTcgPieUnableToFindPcdFirmwareVendorStart) Error ¶
func (err *ErrTcgPieUnableToFindPcdFirmwareVendorStart) Error() string
type ErrTooDummyFirmwareVersionFiles ¶
type ErrTooDummyFirmwareVersionFiles struct{}
ErrTooDummyFirmwareVersionFiles means there were found too many files with the GUID used exclusively in dummy firmwares we invented. There should be only one such file in a dummy firmware.
func (*ErrTooDummyFirmwareVersionFiles) Error ¶
func (err *ErrTooDummyFirmwareVersionFiles) Error() string
type ErrTooManyAmiTcgPlatformPeiAfterMems ¶
type ErrTooManyAmiTcgPlatformPeiAfterMems struct{}
ErrTooManyAmiTcgPlatformPeiAfterMems means multiple AmiTcgPlatformPeiAfterMem volume, which is not supported (an unknown case)
func (*ErrTooManyAmiTcgPlatformPeiAfterMems) Error ¶
func (err *ErrTooManyAmiTcgPlatformPeiAfterMems) Error() string
type ErrTooManyTCGPEIModules ¶
type ErrTooManyTCGPEIModules struct{}
ErrTooManyTCGPEIModules means there's more than one TCG PEI module, which is not supported (an unknown case).
func (*ErrTooManyTCGPEIModules) Error ¶
func (err *ErrTooManyTCGPEIModules) Error() string
type ErrUnknownVendorType ¶
type ErrUnknownVendorType struct{}
ErrUnknownVendorType means the vendor type is not supported
func (*ErrUnknownVendorType) Error ¶
func (err *ErrUnknownVendorType) Error() string
type Interface ¶
type Interface interface { // GetFirmwareVendorVersion returns the firmware vendor version value. GetFirmwareVendorVersion() []byte }
Interface is the abstraction over any PCD-values source
type ParsedFirmware ¶
type ParsedFirmware interface { Interface // GetFirmwareVendorVersionRanges returns ranges which contains the // firmware vendor version value. GetFirmwareVendorVersionRanges() pkgbytes.Ranges // GetFirmwareVendorVersionCodeRanges returns ranges which defines // the code which is responsible for the firmware vendor version value. GetFirmwareVendorVersionCodeRanges() pkgbytes.Ranges // GetFirmwareVendorVersionFFSGUID returns the GUID of the FFS node which // was used as the source of the firmware vendor version value. GetFirmwareVendorVersionFFSGUID() guid.GUID }
ParsedFirmware is abstraction over PCD-values extracted from a firmware image.
func ParseFirmware ¶
func ParseFirmware(firmwareImage FirmwareImage) (pcd ParsedFirmware, err error)
ParseFirmware extracts PCD values from an UEFI firmware.
If "pcd" is not nil and "err" is not nil, then the value was successfully parsed, but there was detected a problem (warning). If "pcd" is nil, but "err" is not nil, then there occurred an error while parsing the value.
func ParseFirmwareDummy ¶
func ParseFirmwareDummy( firmwareImage FirmwareImage, ) (ParsedFirmware, error)
ParseFirmwareDummy is a variant of ParseFirmware for dummy firmware, generated by ../../testdata/firmware/scripts/generate_fake_intel_firmware.sh
func ParseFirmwareOCP ¶
func ParseFirmwareOCP( firmwareImage FirmwareImage, ) (ParsedFirmware, error)
ParseFirmwareOCP is a variant of ParseFirmware for OCP firmwares
type ParsedFirmwareGeneric ¶
type ParsedFirmwareGeneric struct { FirmwareImage FirmwareImage FirmwareVendorVersionRanges pkgbytes.Ranges FirmwareVendorVersionCodeRanges pkgbytes.Ranges FirmwareVendorVersionFFSGUID guid.GUID }
ParsedFirmwareGeneric is a generic parsed PCD
func (*ParsedFirmwareGeneric) GetFirmwareVendorVersion ¶
func (pcd *ParsedFirmwareGeneric) GetFirmwareVendorVersion() []byte
GetFirmwareVendorVersion returns firmware vendor version
func (*ParsedFirmwareGeneric) GetFirmwareVendorVersionCodeRanges ¶
func (pcd *ParsedFirmwareGeneric) GetFirmwareVendorVersionCodeRanges() pkgbytes.Ranges
GetFirmwareVendorVersionCodeRanges return the address of the whole executable, containing the firmware vendor version (if it is stored in the executable file).
func (*ParsedFirmwareGeneric) GetFirmwareVendorVersionFFSGUID ¶
func (pcd *ParsedFirmwareGeneric) GetFirmwareVendorVersionFFSGUID() guid.GUID
GetFirmwareVendorVersionFFSGUID returns the GUID of the component which stores the firmware vendor version
func (*ParsedFirmwareGeneric) GetFirmwareVendorVersionRanges ¶
func (pcd *ParsedFirmwareGeneric) GetFirmwareVendorVersionRanges() pkgbytes.Ranges
GetFirmwareVendorVersionRanges returns where the firmware vendor version is stored.
type ParsedFirmwareOCPGeneric ¶
type ParsedFirmwareOCPGeneric struct {
ParsedFirmwareGeneric
}
ParsedFirmwareOCPGeneric is a fallback "parser", which is used if the image corresponds to OCP, but a specific parsed was not found.
func (*ParsedFirmwareOCPGeneric) GetFirmwareVendorVersion ¶
func (pcd *ParsedFirmwareOCPGeneric) GetFirmwareVendorVersion() []byte
GetFirmwareVendorVersion returns a hardcoded firmware vendor version if no vendor version was parsed by other parser.