public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: chitralekha ck <chitralekha.ck@intel.com>
To: devel@edk2.groups.io
Cc: chitralekha ck <chitralekha.ck@intel.com>,
	Ray Ni <ray.ni@intel.com>, Zhichao Gao <zhichao.gao@intel.com>,
	Ashraf Ali S <ashraf.ali.s@intel.com>,
	Chinni B Duggapu <chinni.b.duggapu@intel.com>
Subject: [edk2-devel] [PATCH v3] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt
Date: Thu,  3 Aug 2023 14:59:04 +0530	[thread overview]
Message-ID: <88dd0aaaa5fa6f6750515fe1441c167c5501947a.1691054931.git.chitralekha.ck@intel.com> (raw)

https://bugzilla.tianocore.org/show_bug.cgi?id=4507
AllocatePool limits to allocate memory of 64 KB at most in PEI Phase.
AllocatePool() is being avoided due to its 64k allocation size limit
when the library is incorporated into a PEI component.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Chinni B Duggapu <chinni.b.duggapu@intel.com>
Signed-off-by: chitralekha ck <chitralekha.ck@intel.com>
---
 MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
index c5e885d7a6..a7ebcd1d65 100644
--- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
+++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
@@ -52,7 +52,7 @@ const BMP_IMAGE_HEADER  mBmpImageHeaderTemplate = {
 /**
   Translate a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer
   is passed in a GopBlt buffer will be allocated by this routine using
-  EFI_BOOT_SERVICES.AllocatePool(). If a GopBlt buffer is passed in it will be
+  EFI_BOOT_SERVICES.AllocatePages(). If a GopBlt buffer is passed in it will be
   used if it is big enough.
 
   @param[in]       BmpImage      Pointer to BMP file.
@@ -312,7 +312,7 @@ TranslateBmpToGopBlt (
     //
     DEBUG ((DEBUG_INFO, "Bmp Support: Allocating 0x%X bytes of memory\n", BltBufferSize));
     *GopBltSize = (UINTN)BltBufferSize;
-    *GopBlt     = AllocatePool (*GopBltSize);
+    *GopBlt     = AllocatePages (*GopBltSize);
     IsAllocated = TRUE;
     if (*GopBlt == NULL) {
       return RETURN_OUT_OF_RESOURCES;
-- 
2.38.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107576): https://edk2.groups.io/g/devel/message/107576
Mute This Topic: https://groups.io/mt/100551576/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



             reply	other threads:[~2023-08-04 18:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03  9:29 chitralekha ck [this message]
2023-08-04 19:12 ` [edk2-devel] [PATCH v3] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt Mike Maslenkin
2023-09-01  5:29 ` Ni, Ray

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=88dd0aaaa5fa6f6750515fe1441c167c5501947a.1691054931.git.chitralekha.ck@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