From: "Ashraf Ali S" <ashraf.ali.s@intel.com>
To: devel@edk2.groups.io
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>,
Rangasai V Chaganty <rangasai.v.chaganty@intel.com>,
Digant H Solanki <digant.h.solanki@intel.com>,
Sangeetha V <sangeetha.v@intel.com>, Ray Ni <ray.ni@intel.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Zhiguang Liu <zhiguang.liu@intel.com>
Subject: [PATCH] Update Graphics Info Hob FrameBufferSize Based on UEFI Spec 2.0
Date: Sun, 2 Jan 2022 22:03:51 +0530 [thread overview]
Message-ID: <3a8e50cf4d5d293d4ce53ffbdad4b5be9bb64a41.1641141173.git.ashraf.ali.s@intel.com> (raw)
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
next reply other threads:[~2022-01-02 16:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-02 16:33 Ashraf Ali S [this message]
2022-01-02 20:25 ` [PATCH] Update Graphics Info Hob FrameBufferSize Based on UEFI Spec 2.0 Michael D Kinney
2022-01-03 7:33 ` Ashraf Ali S
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a8e50cf4d5d293d4ce53ffbdad4b5be9bb64a41.1641141173.git.ashraf.ali.s@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox