public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Update Graphics Info Hob FrameBufferSize Based on UEFI Spec 2.0
@ 2022-01-02 16:33 Ashraf Ali S
  2022-01-02 20:25 ` Michael D Kinney
  0 siblings, 1 reply; 3+ messages in thread
From: Ashraf Ali S @ 2022-01-02 16:33 UTC (permalink / raw)
  To: devel
  Cc: Ashraf Ali S, Rangasai V Chaganty, Digant H Solanki, Sangeetha V,
	Ray Ni, Michael D Kinney, Liming Gao, Zhiguang Liu

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3793
Basede on UEFI Spec 2.0 section 17.7.1 structure
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE say FrameBufferSize should be size of
UINTN, in MdePkg\Include\Guid\GraphicsInfoHob.h
EFI_PEI_GRAPHICS_INFO_HOB FrameBufferSize  is UINT32,

UefiPayloadPkg\GraphicsOutputDxe\GraphicsOutput.c
MdeModulePkg\Universal\Console\GraphicsOutputDxe\GraphicsOutput.c

Private->GraphicsOutputMode.FrameBufferSize = \
GraphicsInfo->FrameBufferSize;

UINT32 value is getting assigned to UINTN,
in X64 build compiler will throw possible loss of data error.

so update the EFI_PEI_GRAPHICS_INFO_HOB  based on UEFI Spec 2.0

Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Digant H Solanki <digant.h.solanki@intel.com>
Cc: Sangeetha V <sangeetha.v@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
---
 MdePkg/Include/Guid/GraphicsInfoHob.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Include/Guid/GraphicsInfoHob.h b/MdePkg/Include/Guid/GraphicsInfoHob.h
index 237911e63a..92bd907f20 100644
--- a/MdePkg/Include/Guid/GraphicsInfoHob.h
+++ b/MdePkg/Include/Guid/GraphicsInfoHob.h
@@ -26,7 +26,7 @@
 
 typedef struct {
   EFI_PHYSICAL_ADDRESS                    FrameBufferBase;
-  UINT32                                  FrameBufferSize;
+  UINTN                                   FrameBufferSize;
   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION    GraphicsMode;
 } EFI_PEI_GRAPHICS_INFO_HOB;
 
-- 
2.30.2.windows.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-03  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-02 16:33 [PATCH] Update Graphics Info Hob FrameBufferSize Based on UEFI Spec 2.0 Ashraf Ali S
2022-01-02 20:25 ` Michael D Kinney
2022-01-03  7:33   ` Ashraf Ali S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox