edk2-test icon indicating copy to clipboard operation
edk2-test copied to clipboard

[Bug]: EFI_FIRMWARE_IMAGE DESCRIPTOR is not compliance UEFI Spec 2.11.

Open gapandya opened this issue 4 months ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched existing issues

Bug Type

  • [x] Test Coverage
  • [ ] Test Infrastructure
  • [ ] Memory or crash related
  • [ ] Build Issue

What packages are impacted?

UEFI-SCT

Which targets are impacted by this bug?

RELEASE, DEBUG

Which architectures are impacted by this bug?

All

Current Behavior

Struct EFI_FIRMWARE_IMAGE_DESCRIPTOR declared in file uefi-sct/SctPkg/UEFI/Protocol/FirmwareManagement.h is not compatible to declaration of UEFI 2.11 spec.

File uefi-sct/SctPkg/UEFI/Protocol/FirmwareManagement.h has: typedef struct {^M UINT8 ImageIndex;^M EFI_GUID ImageTypeId;^M UINT64 ImageId;^M CHAR16 *ImageIdName;^M UINT32 Version;^M CHAR16 *VersionName;^M UINTN Size;^M UINT64 AttributesSupported;^M UINT64 AttributesSetting;^M UINT64 Compatibilities;^M } EFI_FIRMWARE_IMAGE_DESCRIPTOR;^M

But edk2 source file MdePkg/Include/Protocol/FirmwareManagement.h typedef struct { UINT8 ImageIndex; EFI_GUID ImageTypeId; UINT64 ImageId; CHAR16 *ImageIdName; UINT32 Version; CHAR16 *VersionName; UINTN Size; UINT64 AttributesSupported; UINT64 AttributesSetting; UINT64 Compatibilities; UINT32 LowestSupportedImageVersion; UINT32 LastAttemptVersion; UINT32 LastAttemptStatus; UINT64 HardwareInstance; EFI_FIRMWARE_IMAGE_DEP *Dependencies; } EFI_FIRMWARE_IMAGE_DESCRIPTOR;

Following fields are missing in uefi-test repo: UINT32 LowestSupportedImageVersion; UINT32 LastAttemptVersion; UINT32 LastAttemptStatus; UINT64 HardwareInstance; EFI_FIRMWARE_IMAGE_DEP *Dependencies;

Investigate what are other Structures and defines missing from latest uefi spec 2.11 and add those to FirmwareManagement.h file in uefi-test repo.

Expected Behavior

All FirmwareManagement protocol related definitions should comply to latest uefi-sepc.

Steps To Reproduce

Open following files from latest source and compare:

uefi-test/uefi-sct/SctPkg/UEFI/Protocol/FirmwareManagement.h edk2/MdePkg/Include/Protocol/FirmwareManagement.h

Build Environment

- OS(s):Ubuntu 24.04
- Tool Chain(s):GCC

Version Information

Commit: ba6c13f4e4fa1bf92ed04f5cb969d6c8a76f8605

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

Maintainer feedback requested

Anything else?

This mismatch cause following tests to fail: Test Case Management - FirmwareManagementProtocol - ConformanceTest_GetImage:

Also there is possibility of false PASS for other test cases.

gapandya avatar Aug 20 '25 04:08 gapandya

Hi @gapandya , Thank you for the issue. This is a good find. Can you please take up fixing this particular issue and analyse the new tests that may be defined due to the addition of new fields? And the false positives in the existings tests if any?

We can raise another general tickets to investigate other protocol structure.

Please let the community know your thoughts.

edhay avatar Aug 28 '25 00:08 edhay

Hi @edhay,

Please assign it to me.

gapandya avatar Oct 31 '25 09:10 gapandya