26. Protocols EFI Firmware Management Test Case#

26.1. EFI_FIRMWARE_MANAGEMENT_PROTOCOL#

Reference Document:

UEFI 2.3 Specification, Chapter 32.

26.1.1. GetImageInfo()#

Number GUID Assertion Test Description
32.1.1.1.1

0xd02b40ae, 0x62f, 0x4155,

0xbb, 0xdd, 0x4, 0x29, 0x18, 0x94, 0xea, 0x31

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo()returns

EFI_SUCCESS

Call function with all valid parameters. The function should return EFI_SUCCESS.

Check for expected return code.

Check *DescriptorVersion is equal to 1.

Check ImageIndex is between 1 and *DescriptorCount.

Check AttributesSupported has no bits set beyond bit 3.

Check AttributesSetting has no bits set beyond bit 3.

Check Compatibilities bits 1 thru 15 are 0s.

32.1.2.1.1 0x3789b80e, 0xab70, 0x4dc9, 0xbb, 0xbd, 0x70, 0x63, 0x76, 0x36, 0xab, 0x52

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo()returns

EFI_BUFFER_TOO_SMALL

Call function with valid parameters, except *ImageInfoSize = 1. The function should return EFI_BUFFER_TOO_SMALL and *ImageInfoSize > 1.
32.1.2.1.2 0xca1d7706, 0x256b, 0x464e, 0xb6, 0xee, 0x50, 0x34, 0x1e, 0xec, 0x3c, 0x83

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo()returns

EFI_INVALID_PARAMETER

Call function with valid parameters, except ImageInfoSize is NULL. The function should return EFI_INVALID_PARAMETER.

26.1.2. GetImage()#

Number GUID Assertion Test Description
32.2.1.1.1 0xff704c46, 0x3999, 0x4a28, 0xa3, 0x6e, 0x76, 0x8a, 0xb6, 0xad, 0x89, 0xd8

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage()returns

EFI_SUCCESS or EFI_UNSUPPORTED

Authentication not required.

Call function with all valid parameters. The function should return EFI_SUCCESS or EFI_UNSUPPORTED.

32.2.2.1.1

0x3c8d87b2, 0x6a89, 0x4a6c,

0xbc, 0x75, 0xe6, 0x86, 0xa1, 0x49, 0x13, 0xf0

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage()returns

EFI_BUFFER_TOO_SMALL

Function is supported.

Authentication not required.

Call function with valid parameters, except *ImageSize = 1. The function, if supported, should return EFI_BUFFER_TOO_SMALL and *ImageSize > 1.

32.2.2.1.2

0x88031c96, 0x99bf, 0x4d2c,

0x9f, 0x57, 0xa7, 0x2, 0x6a, 0xbc, 0xd3, 0x51

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage()returns

EFI_INVALID_PARAMETER

Function is supported.

Authentication not required.

Call function with valid parameters, except Image is NULL. The function should return EFI_INVALID_PARAMETER.

32.2.2.1.3 0x7a386361, 0x3a5d, 0x4e58, 0x8a, 0x51, 0x4d, 0x93, 0xb6, 0x55, 0x95, 0xf4

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage()returns

EFI_INVALID_PARAMETER or EFI_NOT_FOUND

Function is supported.

Authentication not required.

Call function with valid parameters, except ImageIndex = 0 or ImageIndex = *DescriptorCount + 1. The function should return EFI_INVALID_PARAMETER or EFI_NOT_FOUND.

32.2.2.1.4 0xd6a77629, 0x5afd, 0x4854, 0x87, 0xc8, 0xee, 0x9f, 0xc5, 0x3d, 0xbe, 0x3d

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage()returns

EFI_SECURITY_VIOLATION

Function is supported.

Authentication required.

Call function with valid parameters, except Image has a dummy authentication data. The function should return EFI_SECURITY_VIOLATION.

26.1.3. SetImage()#

Number GUID Assertion Test Description
32.3.2.1.1 0x4ea24764, 0xa6b1, 0x43b5, 0xb8, 0xa0, 0xd3, 0x3f, 0xdc, 0x8b, 0xc6, 0xe4

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetImage()returns

EFI_INVALID_PARAMETER

Function is supported.

Authentication not required.

Call function with valid parameters, except Image is NULL. The function should return EFI_INVALID_PARAMETER.

32.3.2.1.2

0xc82d1373,

0x1f87,

0x45f4,

0xaf, 0xfc,

0x10, 0xa7,

0xf7, 0xb0,

0x9c, 0xb0

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetImage()returns

EFI_INVALID_PARAMETER or EFI_ABORTED

Function is supported.

Authentication not required.

Call function with valid parameters, except ImageIndex = 0 or ImageIndex = *DescriptorCount + 1. The function should return EFI_INVALID_PARAMETER or EFI_ABORTED.

32.3.2.1.3

0x2410a859,

0xdf6f,

0x4857, 0x92,

0x4a, 0x26,

0x37, 0x7,

0x11, 0xf,

0x1c

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetImage()returns

EFI_SECURITY_VIOLATION

Function is supported.

Authentication not required.

Call function with valid parameters, except ImageIndex = 0 or ImageIndex = *DescriptorCount + 1. The function should return EFI_INVALID_PARAMETER or EFI_ABORTED.

Image has dummy authentication data.

The function should return

EFI_SECURITY_VIOLATION.

26.1.4. CheckImage()#

Number GUID Assertion Test Description
32.4.2.1.1 0x3987172c, 0xe6a0, 0x4099, 0xb1, 0x2b, 0xd8, 0xef, 0xf2, 0x62, 0x75, 0x93

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.CheckImage()returns

EFI_INVALID_PARAMETER

Function is supported.

Authentication not required.

Call function with valid parameters, except Image is NULL. The function should return EFI_INVALID_PARAMETER.

32.4.2.1.2

0xd6dad28e, 0x7f0f, 0x4f56,

0x9a, 0x93, 0x14, 0x7d, 0xb3, 0x74, 0x0, 0xc9

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.CheckImage()returns

EFI_SECURITY_VIOLATION

Function is supported.

Authentication required.

Call function with valid parameters, except Image has a dummy authentication data. The function should return EFI_SECURITY_VIOLATION.

26.1.5. GetPackageInfo()#

Number GUID Assertion Test Description
32.5.1.1.1 0x70884539, 0x9a34, 0x4146, 0x83, 0x3a, 0x4d, 0x89, 0x8b, 0x9c, 0x7e, 0xa4

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetPackageInfo()returns

EFI_SUCCESS or EFI_UNSUPPORTED

Call function with all valid parameters. The function should return EFI_SUCCESS or EFI_UNSUPPORTED.

Check *AttributesSupported has no bits set beyond bit 2.

Check *AttributesSetting has no bits set beyond bit 2.

26.1.6. SetPackageInfo()#

Number GUID Assertion Test Description
32.6.2.1.1 0xb5288fc3, 0xe906, 0x4468, 0x83, 0x3d, 0xd4, 0xa6, 0x58, 0xa5, 0x4f, 0xbd

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetPackageInfo()returns

EFI_INVALID_PARAMETER

Function is supported.

Authentication not required.

Call function with valid parameters, except **PackageVersionName is longer than the value returned in *PackageVersionNameMaxLen. The function should return EFI_INVALID_PARAMETER.

32.6.2.1.2

0x57355301, 0x1343, 0x497f,

0xbe, 0xe0, 0x8e, 0x5c, 0x27, 0xd2, 0x40, 0x2

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetPackageInfo()returns

EFI_SECURITY_VIOLATION

Function is supported.

Authentication is required.

Call function with valid parameters, except Image is NULL. The function should return EFI_SECURITY_VIOLATION.

32.6.2.1.3

0xadeab82d, 0x7592, 0x40fe,

0x87, 0xa8, 0x93, 0x2b, 0xad, 0x97, 0xff, 0x5e

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetPackageInfo()returns

EFI_SECURITY_VIOLATION

Function is supported.

Authentication is required.

Call function with valid parameters, except ImageSize is 0. The function should return EFI_SECURITY_VIOLATION.

32.6.2.1.4 0x9be658d2, 0x1312, 0x4254, 0x91, 0x10, 0x59, 0x0, 0xd5, 0xfd, 0x6c, 0x6c

EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetPackageInfo()returns

EFI_SECURITY_VIOLATION

Function is supported.

Authentication is required.

Call function with valid parameters, except Image has a dummy authentication data. The function should return EFI_SECURITY_VIOLATION.