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 DC41C940EC2 for ; Wed, 16 Aug 2023 01:01:40 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=0OcVarNDBNezp5hXotcrGXEIjltoSYKP2xJ3W+4hzlo=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20140610; t=1692147699; v=1; b=EW/8AIt/ynn38yERp9ETUmjGB+J7ws0MKw6fRVhZ0R87PzXPS+SG/xN6vdnLS0jfJfqBWz4c HiM41p+cW2/CaywQM/Cnw4MZXVR9hvGd0iKzjmqMb3sq2so0Wi+Jm0y1tfjtU02JMHIaxPORFux GHjYv7janL0QS94ht5jdU7cQ= X-Received: by 127.0.0.2 with SMTP id UA0tYY7687511xv5OsCxM8H0; Tue, 15 Aug 2023 18:01:39 -0700 X-Received: from zrleap.intel-email.com (zrleap.intel-email.com [114.80.218.36]) by mx.groups.io with SMTP id smtpd.web11.150811.1692147697004969875 for ; Tue, 15 Aug 2023 18:01:38 -0700 X-Received: from zrleap.intel-email.com (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id 3EC7BA32E166 for ; Wed, 16 Aug 2023 09:01:34 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id EEBE2A32E15F for ; Wed, 16 Aug 2023 09:01:33 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by zrleap.intel-email.com (Postfix) with SMTP id 22BA0A32E159 for ; Wed, 16 Aug 2023 09:01:30 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 16 Aug 2023 09:01:28 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: "'Taylor Beebe'" , Cc: "'Jian J Wang'" , "'Dandan Bi'" References: <20230810180630.1879-1-t@taylorbeebe.com> <20230810180630.1879-2-t@taylorbeebe.com> In-Reply-To: <20230810180630.1879-2-t@taylorbeebe.com> Subject: =?UTF-8?B?W2VkazItZGV2ZWxdIOWbnuWkjTogW1BBVENIIHYxIDEvMV0gTWRlTW9kdWxlUGtnOiBNZW1vcnkgQmluIFJhbmdlIFVwZGF0ZSBBY2NvdW50cyBmb3IgR3VhcmQgUGFnZQ==?= Date: Wed, 16 Aug 2023 09:01:30 +0800 Message-ID: <00f601d9cfdd$316eb040$944c10c0$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQKF+9e/7meAxxeSltwKEHHgXC9HIAHB7RmnroWzMzA= 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,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ILOtOxUrJeDpmW5m2o7QipvMx7686176AA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="EW/8AIt/"; dmarc=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 Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Taylor Beebe > =B7=A2=CB=CD=CA=B1=BC=E4: 2023=C4=EA8=D4=C211=C8=D5 2:07 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Jian J Wang ; Liming Gao > ; Dandan Bi > =D6=F7=CC=E2: [PATCH v1 1/1] MdeModulePkg: Memory Bin Range Update Accoun= ts > for Guard Page >=20 > From: Taylor Beebe >=20 > When finding a free page range for allocation, if the found range > starts below the tracked memory bin address range, the lowest > memory bin address is updated which will not include the guard page if > present. When CoreConvertPagesWithGuard() is called on the range > being allocated, the memory range is adjusted to include guard > pages which can push it out of the memory bin address range and > cause the memory type statistics to be unaltered. >=20 > This patch updates the lowest memory bin address range to account for > the guard page if NeedGuard is TRUE so the memory type statistics > are updated correctly. >=20 > Signed-off-by: Taylor Beebe > Cc: Jian J Wang > Cc: Liming Gao > Cc: Dandan Bi > --- > MdeModulePkg/Core/Dxe/Mem/Page.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c > b/MdeModulePkg/Core/Dxe/Mem/Page.c > index 41af50b3d5ab..6497af573353 100644 > --- a/MdeModulePkg/Core/Dxe/Mem/Page.c > +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c > @@ -1210,7 +1210,7 @@ FindFreePages ( > ); > if (Start !=3D 0) { > if (Start < mDefaultBaseAddress) { > - mDefaultBaseAddress =3D Start; > + mDefaultBaseAddress =3D NeedGuard ? Start - EFI_PAGE_SIZE : > Start; > } >=20 > return Start; > -- > 2.41.0.windows.3 -=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 (#107774): https://edk2.groups.io/g/devel/message/107774 Mute This Topic: https://groups.io/mt/100771119/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-