From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5ED0AD80212 for ; Fri, 17 May 2024 06:27:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=wfg1vZ4a+Ob3G0EUOdGxzIfanRykGIqFwJAtqlivEUQ=; 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:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20240206; t=1715927225; v=1; b=XBylPZI7BcGl2QLx8nlHZL16khW3jJdmrNXkoE78V+AUIq62CqmMvkHrpQwSEMOXv4bjmEdo cnwbUca/eHSLhM5BKrYYyTzqwTO43MSrVpqQm0E2C0bku+dWH4W0o24fmZ+Pz3kz3avdIp0YqhK rfSjrmQrioSJswMzkIoexA0Jk83+ZanbJlDKnIWe3eml3WYvW1vAfxNey1TDAzrDu1ZlLKKBzHw 1BR8EJ+l9cvSUkvYASQbicvncxGOSnXATgxSYzjj3yLALwzS/y10Yt5bEa0zAcCBSnVa0JVDhp1 B+CmpaRKb9W+zAwMj9wHtYacmuPT50rHQ1HOF2yZ+zGZw== X-Received: by 127.0.0.2 with SMTP id JFuLYY7687511xUqgKHmkmGP; Thu, 16 May 2024 23:27:05 -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.34437.1715927219795106949 for ; Thu, 16 May 2024 23:27:00 -0700 X-Received: from zrleap.intel-email.com (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id 406C3A32E009 for ; Fri, 17 May 2024 14:26:55 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id 247E8A32E000 for ; Fri, 17 May 2024 14:26:55 +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 23C67A32E039 for ; Fri, 17 May 2024 14:26:51 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Fri, 17 May 2024 14:26:47 +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: , Cc: "'Michael D Kinney'" , "'Lin, Du'" , "'Ray Ni'" References: <20240516201952.1625-1-mikuback@linux.microsoft.com> In-Reply-To: <20240516201952.1625-1-mikuback@linux.microsoft.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYxIDEvMV0gQWRkIHRoZSBFRklfUkVTT1VSQ0VfQVRUUklCVVRFX1NQRUNJQUxfUFVSUE9TRSBhdHRyaWJ1dGUu?= Date: Fri, 17 May 2024 14:26:51 +0800 Message-ID: <05c201daa823$34936e90$9dba4bb0$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQKOJo3ohvD4IzimYyh0sujxq6oksrAz99OQ 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 Resent-Date: Thu, 16 May 2024 23:27:00 -0700 Resent-From: gaoliming@byosoft.com.cn Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: LTeVRGrcsa4tYlXtkcuTCNLjx7686176AA= 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=20240206 header.b=XBylPZI7; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io Patrick: Commit message needs package name MdePkg.=20 One comment for the change is below.=20 Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED Michael Kubacki > =B7=A2=CB=CD=CA=B1=BC=E4: 2024=C4=EA5=D4=C217=C8=D5 4:20 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Liming Gao ; Michael D Kinney > > =D6=F7=CC=E2: [edk2-devel] [PATCH v1 1/1] Add the > EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute. >=20 > From: Patrick Payne >=20 > Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE resource attribute as > per the PI 1.8 spec. This flag is used to indicate that the memory > should be treated as special purpose memory (SPM). >=20 > Also adds GCD code that marks the SPM with the EFI_MEMORY_SP bit and > sets the GCD memory type to EfiGcdMemoryTypeSystemMemory. >=20 > Cc: Liming Gao > Cc: Michael D Kinney > Signed-off-by: Patrick Payne > --- > MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c > b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c > index fe1bbd6974b7..c941fe941276 100644 > --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c > +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c > @@ -26,7 +26,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > EFI_RESOURCE_ATTRIBUTE_16_BIT_IO | \ >=20 > EFI_RESOURCE_ATTRIBUTE_32_BIT_IO | \ >=20 > EFI_RESOURCE_ATTRIBUTE_64_BIT_IO | \ > - > EFI_RESOURCE_ATTRIBUTE_PERSISTENT ) > + > EFI_RESOURCE_ATTRIBUTE_PERSISTENT | \ > + > EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE ) >=20 > #define TESTED_MEMORY_ATTRIBUTES > (EFI_RESOURCE_ATTRIBUTE_PRESENT | \ >=20 > EFI_RESOURCE_ATTRIBUTE_INITIALIZED | \ > @@ -92,6 +93,7 @@ GCD_ATTRIBUTE_CONVERSION_ENTRY > mAttributeConversionTable[] =3D { > { EFI_RESOURCE_ATTRIBUTE_TESTED, > EFI_MEMORY_TESTED, FALSE }, > { EFI_RESOURCE_ATTRIBUTE_PERSISTABLE, EFI_MEMORY_NV, > TRUE }, > { EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE, > EFI_MEMORY_MORE_RELIABLE, TRUE }, > + { EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE, EFI_MEMORY_SP, > TRUE }, > { 0, 0, > FALSE } > }; >=20 > @@ -691,6 +693,10 @@ ConverToCpuArchAttributes ( > CpuArchAttributes |=3D EFI_MEMORY_WP; > } >=20 > + if ((Attributes & EFI_MEMORY_SP) =3D=3D EFI_MEMORY_SP) { > + CpuArchAttributes |=3D EFI_MEMORY_SP; > + } > + > return CpuArchAttributes; > } >=20 > @@ -2660,6 +2666,10 @@ CoreInitializeGcdServices ( > GcdMemoryType =3D EfiGcdMemoryTypePersistent; > } >=20 > + if ((ResourceHob->ResourceAttribute & > EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE) =3D=3D > EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE) { > + GcdMemoryType =3D EfiGcdMemoryTypeSystemMemory; > + } > + [Liming] The type memory is earmarked for specific purposes such as for specific device drivers or applications. So, its Gcd memory type may be EfiGcdMemoryTypeReserved.=20 Then, this memory range can't be allocated as the normal system memory.=20 Thanks Liming > break; > case EFI_RESOURCE_MEMORY_MAPPED_IO: > case EFI_RESOURCE_FIRMWARE_DEVICE: > -- > 2.45.1.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#118972): https://edk2.groups.io/g/devel/message/11897= 2 > Mute This Topic: https://groups.io/mt/106142180/4905953 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [gaoliming@byosoft.com.cn] > -=3D-=3D-=3D-=3D-=3D-=3D >=20 -=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 (#118983): https://edk2.groups.io/g/devel/message/118983 Mute This Topic: https://groups.io/mt/106149241/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-