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 40FCB7803CE for ; Tue, 11 Jun 2024 17:03:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LRYId0mbQcWJ1kud0r7R/9Ia7yXulaxIueolWkwY5p8=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:Message-ID:Date:MIME-Version:User-Agent:Subject:To:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1718125423; v=1; b=RVJ/zGr/pkFeoesB6vA6HNIEA4p/++s3j5UTQUooS+I1B06dWJONxfY5CLVClGJ/bIFOzWPF z0o95g2n+TZsfRMldYGI6bDuYPlrshTgAB5nqfNSc7gPKD/erRX3/y1O48oCT0K3sDJ8GnwvRdM bvFv5n+yUN10o1VcagMPDIzYpBQfiDmftp+Sh9biEP4uTuOxfeVPUb0c/Az+DsGl5H/ydfejI3C v+VMByRmXRMKziFeeLfS074/aaG0wS4ErxdbLABfNYNJmo+aleqjJm86jtKZb6UgxcYzC7BTdyD DyXHXZ6+BgqkFzTFFZ/bXDN/iy9SFpT6poN8hXmZvgXtg== X-Received: by 127.0.0.2 with SMTP id vbkiYY7687511x5LQlQwBtO9; Tue, 11 Jun 2024 10:03:41 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.1908.1718125421086552708 for ; Tue, 11 Jun 2024 10:03:41 -0700 X-Received: from [10.137.194.171] (unknown [131.107.159.43]) by linux.microsoft.com (Postfix) with ESMTPSA id 4ADA120B915A; Tue, 11 Jun 2024 10:03:40 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4ADA120B915A Message-ID: Date: Tue, 11 Jun 2024 10:03:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute To: devel@edk2.groups.io, dhaval@rivosinc.com, Michael Kubacki References: <20240518005757.1639-1-mikuback@linux.microsoft.com> <24273.1717983877551380256@groups.io> From: "Oliver Smith-Denny" In-Reply-To: <24273.1717983877551380256@groups.io> 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: Tue, 11 Jun 2024 10:03:41 -0700 Resent-From: osde@linux.microsoft.com Reply-To: devel@edk2.groups.io,osde@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: E6P8njDLOnZTxiABCEFKQA1ox7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="RVJ/zGr/"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io On 6/9/2024 6:44 PM, Dhaval Sharma wrote: > Related to this, I also faced this issue where in order to prevent edk2= =20 > from allocating this memory I had to modify CoreFindFreePagesI > =C2=A0 =C2=A0 // > =C2=A0 =C2=A0 // Don't allocate out of Special-Purpose memory. > =C2=A0 =C2=A0 // > =C2=A0 =C2=A0 if ((Entry->Attribute & EFI_MEMORY_SP) !=3D 0) { > =C2=A0 =C2=A0 =C2=A0 continue; > =C2=A0 =C2=A0 } > Can't we add PCD based logic here to selectively NOT use SP memory for=20 > edk2 allocations? I think "reserved-memory" attr does not work well=20 > because it would force OS/drivers not to use it. Which is not what we=20 > want. We really want special drivers to make use of it. We've had some other conversations around this and I agree, we don't want DXE Core to allocate this memory unless it has no other option. I don't think this should be a PCD, I think DXE can make the statement that it won't allocate EFI_MEMORY_SP memory unless it has run out of other memory. Thanks, Oliver -=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 (#119550): https://edk2.groups.io/g/devel/message/119550 Mute This Topic: https://groups.io/mt/106165072/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-