Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 19cbfaa4319edabf5feb4e9d867f042c2d5e72b6
      
https://github.com/tianocore/edk2/commit/19cbfaa4319edabf5feb4e9d867f042c2d5e72b6
  Author: Dimitrije Pavlov <dimitrije.pav...@arm.com>
  Date:   2022-08-01 (Mon, 01 Aug 2022)

  Changed paths:
    M OvmfPkg/QemuVideoDxe/Gop.c

  Log Message:
  -----------
  OvmfPkg/QemuVideoDxe: Zero out PixelInformation in QueryMode

Ensure that the PixelInformation field of the
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION structure is zeroed out in
EFI_GRAPHICS_OUTPUT_PROTOCOL.QueryMode() and
EFI_GRAPHICS_OUTPUT_PROTOCOL.SetMode() when PixelFormat is
PixelBlueGreenRedReserved8BitPerColor.

According to UEFI 2.9 Section 12.9, PixelInformation field of the
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION structure is valid only if
PixelFormat is PixelBitMask. This means that firmware is not required
to fill out the PixelInformation field for other PixelFormat types,
which implies that the QemuVideoDxe implementation is technically
correct.

However, not zeroing out those fields will leak the contents of the
memory returned by the memory allocator, so it is better to explicitly
set them to zero.

In addition, the SCT test suite relies on PixelInformation always
having a consistent value, which causes failures.

Signed-off-by: Dimitrije Pavlov <dimitrije.pav...@arm.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com>




_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to