From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 4A0FCAC157B for ; Fri, 1 Sep 2023 09:29:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=r3rt3dyLWd4SVMWOU11OMU9gu/RfT/C8G7sIQgtSRJY=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20140610; t=1693560557; v=1; b=kbDI28FQH3ere/zL5wJGO/PmqF9Kky1ifPAgk/IzGTpNlz24JW10JjM1FxxcUctqdn8oLuxz O8tE6SwNGtU71Ib1vQRfUCO7PTqjhd6SIYI+6j/SRk6m0i8kc07Bo3eKL/Qr5V5Ubh88guH6B9f LGc0qMA1m6RbidgkkHBpm4hU= X-Received: by 127.0.0.2 with SMTP id HKVBYY7687511xhKeJmcSRGp; Fri, 01 Sep 2023 02:29:17 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.340.1693546156727980834 for ; Thu, 31 Aug 2023 22:29:16 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10819"; a="355634923" X-IronPort-AV: E=Sophos;i="6.02,218,1688454000"; d="scan'208,217";a="355634923" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2023 22:29:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10819"; a="913577086" X-IronPort-AV: E=Sophos;i="6.02,218,1688454000"; d="scan'208,217";a="913577086" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 31 Aug 2023 22:29:15 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 31 Aug 2023 22:29:15 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 31 Aug 2023 22:29:14 -0700 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Thu, 31 Aug 2023 22:29:14 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 31 Aug 2023 22:29:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EaZfLOI72fscL2AnhivD/GR68lKl87nqkSEBt46iXKv+wgzCRRZlV4SKknKSxqZowWrHaclaHCabq9z+mIOfIn1uUA/kCYY7dtfn7Bpx1C5ONPi5FGYs47NAkRvKtxOJhBl9j6azTVSXWMHPLlNQKO1vmxxjX4Xzf6rlzfH6RcHAE+2reqfV0F0/1JvTNidbD+OYjdZetMmcQk4dIo4EpQTqN+toBO4QADYkyb+ZevvbUa/FHl0Kt2H0qUdpL09dHsXE9vRxfwHqj6TZbuKr3k8WjGhpI20tcMVdKa6ap43W/83FKANNSrjheswAx9QtNIZCi1pJgxQrOKej4oZg6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2WmaamKK9xAA5hS+fiofn82XGAhsIvEbxkQFp7Ulw4s=; b=SRo3DXqggw2OIrRhCxk5Jqto3d677OlTrge/jECWToX4ZxVxsaWHz633zH/yx2fMY1r3A/w/YqEC6W0IKMZdzS/HizUXF38K26KubahhSmRTo2MKEUmqT14ZY4ExYBXqWaw0w/PDE6l95cCjcx/ahoPOxaQDDqLIUxpXPqOV0OZ0+cfvKNITQKt2xKxZOXxr07omdRxu7VRvxTI0sQexvsfuAiW7pGPk1cUnsMOTDWAlJ3is4AtWTYweHRV2X+7+cVEVTFMkbEftVbwZ23w6oE2cg7T0VbVCCGn0kwn3C8MWy892z9YlEYfEEt7j/l48qmhpkToGnWQpbfUYqpmeXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by IA1PR11MB8100.namprd11.prod.outlook.com (2603:10b6:208:445::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.21; Fri, 1 Sep 2023 05:29:05 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::bf9a:54ca:d270:59b]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::bf9a:54ca:d270:59b%5]) with mapi id 15.20.6745.021; Fri, 1 Sep 2023 05:29:05 +0000 From: "Ni, Ray" To: "Ck, Chitralekha" , "devel@edk2.groups.io" CC: "Gao, Zhichao" , "S, Ashraf Ali" , "Duggapu, Chinni B" Subject: Re: [edk2-devel] [PATCH v3] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt Thread-Topic: [PATCH v3] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt Thread-Index: AQHZxez7HO2uhH90BEm869pM6uDugbAFmk4Q Date: Fri, 1 Sep 2023 05:29:04 +0000 Message-ID: References: <88dd0aaaa5fa6f6750515fe1441c167c5501947a.1691054931.git.chitralekha.ck@intel.com> In-Reply-To: <88dd0aaaa5fa6f6750515fe1441c167c5501947a.1691054931.git.chitralekha.ck@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|IA1PR11MB8100:EE_ x-ms-office365-filtering-correlation-id: 0c6edb90-a2ce-426a-5077-08dbaaac5b81 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: DmvJXZ2lByfuumGXlYQMewjDSRlzgZv5ajHyyYkCKuaxQ85p3ZKcOigvANNKToBKxCOW/gbnLDT6sl9AknnXEGJWDO6ZeEyfZ1fWmw2bk1MnOqVgbHptLWYG8thX8oJsOna1rC57mveZVI7d+NcmBImPi4h/BoGzMkL7V5Lpcn6kesULCokUScJyX2MbgjOwpbAyDZNGuWBzHQqoN9RlNrBVjPKlSW/3c2mfpr8jLLyB/9nY4etgGk7hXW3YwEJuQyUF5sVkE4Z7/AJGTCgtZmv54ANtbolZE+8dbxeFf8DOm0OOEp7ifsVBtr5YnBe71QCZ5CBRIAbeIuBcPv93gAMamDT9O3lAZNU/5aEeazLewulKQuqvP3VCpLoXxGXWkHsfANWubv2pxKGU7epJx5Y7lXXZ9YbShysLExJ53hRnJVCKGYtpKmRsyLPwzePWc+wTVDP70E48ua4+yf5S54xKgWUUo7L44cVFU7ZN6DEE9osqsjBc+hPSQXyXw6z/844HevnRgpOstQUel+BGTLCp9WZH95f/X4ORjobt7oSdTCcp8vw/M8R5UGEI+WpLsvGmmGSXaJa65C5FkN52zE6jhnr3HimzhrIow9+PLtc= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4LiBxYmemhSf5AZVInCpshGXJW0kY928BN6GyapwmdZREoINZ4swr4nF8kFx?= =?us-ascii?Q?JuhbW4h5JSCa2et4KmVDCc0YjrSRGQ9kff9lo9gaH6NkMfghlZHUp2Facq9e?= =?us-ascii?Q?s00iZOolGRqU1JTQDxzq5X+2Jtr7P8jEInkf+Yf6wIXU+h1TtytoiCCD0y3m?= =?us-ascii?Q?CjUYP7LAW5yBtB9JgsNSuPudfUeJNF0a8RBzQpNE3wl7IuMqSY6uhCBIt4nZ?= =?us-ascii?Q?WmS8LAmiF4ayRQ+ja/g2GZ299qa6NkAzu7wi+/2trQKktnYopNZWRRI5q/Mw?= =?us-ascii?Q?WiOAmb8qZu9iFJWuOXfQfVLCyQQxUgba6mTVeWlN2wK92RJ+FKkf13Z/LxIi?= =?us-ascii?Q?5nRqQyA/jYuKaPB/kjz7X7SOsVTxe8Cdv6VqaozHDQHGR0Quh/r8d62mj2q0?= =?us-ascii?Q?NVV4/kJlABn3tKwR28LMs98Yl7qLVsgCTK0vqUE/o4eFQM99GAYIEIK4CQNt?= =?us-ascii?Q?OYO2RvCozgWKGyaWRMPtJiEsLsJW3OZbuAXXm7S8BkuCuMQf+n8qLvexYoVd?= =?us-ascii?Q?bznbH/J1MAPqlkQxGlOjsRhA7Eb9FwiaL6akHoV0vVqV4xbtOVIZDYUTlH6+?= =?us-ascii?Q?a0eIbLBWAwlQ2QHr6PSRIIpKK12Yg9+w/VkjcLrhkp0ijGsceWuGG/UAiNhv?= =?us-ascii?Q?gBVuOVO+MF1Uv0PAZSwZ6ab1EX60qpfjApKzha4dd8FEK4azhD9QnAYJY1eE?= =?us-ascii?Q?ITO5TNwp7qtOIHeQxnwemyFmmm2V1NfdONTxiJlIuYPXhUS7fzL7/o7BD243?= =?us-ascii?Q?EcGdFW3CW6SXKIWb2hbM5R72jo0i7iVxikgxSbD/euEumgah5trUfp3mmUkt?= =?us-ascii?Q?Dj7vVV0da4pKvcTEBZbGoDL+WKpAAK7S/bXEmELr+1EelxCpY32jgQ7Ws3zm?= =?us-ascii?Q?bqQTud0JDB+CK0lqYlRU5GSFda2rI0hp3tTzjKpA73m3dI/lDZgbn7SiXZKj?= =?us-ascii?Q?CO+zYqn9T4bB1KCSvEhN5ZrYpOXCnLG/0sUuQGoO5i93Fn4zSZ9tyPz/A/od?= =?us-ascii?Q?YydVyWYZW6XyzdS2d+XlISmCmUQNemUm+l836wSFfimkM5aaDDMF+P0ncyJC?= =?us-ascii?Q?u6AZ2IwA6fshxDntK3FBdh5Mv59ROmoIs23RgErexUC38C7waGByyLRI6V65?= =?us-ascii?Q?Jr9VwJA+dqOI+xo5oP7EeU/sz9XVwMLIPdWNOeHV2JcFFO/FbsyH0/WPVYFt?= =?us-ascii?Q?OywgJgpE2a/ug5JVpk0n9I/50xscIyRuPIAYZhikud8blHcN41r8pcx02X3C?= =?us-ascii?Q?yGrMtIHJD0AdoHEu4Y+AbUdAwmKzffA+MZqHsREDjODeUOUAMysyylp+/cRg?= =?us-ascii?Q?5xgV9dJQHuV3GCs358hCvCgc0Gquw1wB44AQSiWpF6DPSQ116bWn3smuQIT8?= =?us-ascii?Q?mN+tnuDngjbfsM09cHW4DvOH62VCgYS2HVLDIZNNLR1rPQGcH0+2TJvLTyP0?= =?us-ascii?Q?uyL63jGGZgk/VQYeW6QOlaHM0ALoOr9lwbeXOe1dUKGhD7/vCsuFB9csNFsr?= =?us-ascii?Q?yxHzI8nM9nUQ2GsPigNWtzZ9IaIDkwQqElhuUWRI6u3CrjQV3UDCJUOFAx9d?= =?us-ascii?Q?MmJUQFKPIlgEjkzmcqs=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c6edb90-a2ce-426a-5077-08dbaaac5b81 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2023 05:29:04.9243 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Hu9Nu3VIs4gYwkhsEKHoWuRy4KlKECStdqLlkNHZej0s71icQInXMOO8ht63F/cBi+WQoAo1uNqrNlQFg76hog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB8100 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: EO4rHzeA1Kl2DpaLadzkiRGyx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244604FD77DAE56B5EC8D5D8CE4AMN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=kbDI28FQ; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB8244604FD77DAE56B5EC8D5D8CE4AMN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable - *GopBlt =3D AllocatePool (*GopBltSize); + *GopBlt =3D AllocatePages (*GopBltSize); It doesn't look right. You cannot pass in the same value origilly passed to= AllocatePool(). Thanks, Ray ________________________________ From: Ck, Chitralekha Sent: Thursday, August 3, 2023 5:29 PM To: devel@edk2.groups.io Cc: Ck, Chitralekha ; Ni, Ray ;= Gao, Zhichao ; S, Ashraf Ali ; Duggapu, Chinni B Subject: [PATCH v3] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt https://bugzilla.tianocore.org/show_bug.cgi?id=3D4507 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 Cc: Zhichao Gao Cc: Ashraf Ali S Cc: Chinni B Duggapu Signed-off-by: chitralekha ck --- MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c b/MdeMo= dulePkg/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 =3D { /** Translate a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buff= er 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 wil= l be + EFI_BOOT_SERVICES.AllocatePages(). If a GopBlt buffer is passed in it wi= ll 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 =3D (UINTN)BltBufferSize; - *GopBlt =3D AllocatePool (*GopBltSize); + *GopBlt =3D AllocatePages (*GopBltSize); IsAllocated =3D TRUE; if (*GopBlt =3D=3D NULL) { return RETURN_OUT_OF_RESOURCES; -- 2.38.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108225): https://edk2.groups.io/g/devel/message/108225 Mute This Topic: https://groups.io/mt/100551576/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB8244604FD77DAE56B5EC8D5D8CE4AMN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
-    *GopBlt     =3D AllocatePool (*GopBltSize);
+    *GopBlt     =3D AllocatePages (*GopBltSize);

It doesn't look right. You cannot pass in the same value origilly passed to= AllocatePool().

Thanks,
Ray

From: Ck, Chitralekha <c= hitralekha.ck@intel.com>
Sent: Thursday, August 3, 2023 5:29 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ck, Chitralekha <chitralekha.ck@intel.com>; Ni, Ray <ra= y.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; S, Ashraf A= li <ashraf.ali.s@intel.com>; Duggapu, Chinni B <chinni.b.duggapu@i= ntel.com>
Subject: [PATCH v3] MdeModulePkg: AllocatePages for TranslateBmpToGo= pBlt
 
https://bugzilla.tianocore.org/show_bug.cgi?id=3D4507 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/MdeMo= dulePkg/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 =3D = {
 /**
   Translate a *.BMP graphics image to a GOP blt buffer. If a NUL= L 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 i= t 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 &= nbsp;    Pointer to BMP file.
@@ -312,7 +312,7 @@ TranslateBmpToGopBlt (
     //
     DEBUG ((DEBUG_INFO, "Bmp Support: Allocating = 0x%X bytes of memory\n", BltBufferSize));
     *GopBltSize =3D (UINTN)BltBufferSize;
-    *GopBlt     =3D AllocatePool (*GopB= ltSize);
+    *GopBlt     =3D AllocatePages (*Gop= BltSize);
     IsAllocated =3D TRUE;
     if (*GopBlt =3D=3D NULL) {
       return RETURN_OUT_OF_RESOURCES;
--
2.38.1.windows.1

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#108225) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB8244604FD77DAE56B5EC8D5D8CE4AMN6PR11MB8244namp_--