public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"osde@linux.microsoft.com" <osde@linux.microsoft.com>,
	"dhaval@rivosinc.com" <dhaval@rivosinc.com>,
	Michael Kubacki <mikuback@linux.microsoft.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute
Date: Tue, 11 Jun 2024 17:30:36 +0000	[thread overview]
Message-ID: <CO1PR11MB492949805AA4A98F57CE7977D2C72@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ed98815d-e762-4f17-b54a-673da24a8d18@linux.microsoft.com>

Hi Oliver,

The DXE Core already has a policy to auto convert untested memory to
tested memory if the DXE Core runs out of memory.

Should we have a different memory type to allocate memory with the
EFI_MEMORY_SP attribute?

What would be the side effects of performing general allocations from
memory with the EFI_MEMORY_SP attribute?  If there are potentially bad 
side effects, then the DXE Core should never allocate from those
ranges and it is up to the platform to make sure there is enough normal
memory to boot.

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oliver Smith-
> Denny
> Sent: Tuesday, June 11, 2024 10:04 AM
> To: devel@edk2.groups.io; dhaval@rivosinc.com; Michael Kubacki
> <mikuback@linux.microsoft.com>
> Subject: Re: [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Add the
> EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute
> 
> On 6/9/2024 6:44 PM, Dhaval Sharma wrote:
> > Related to this, I also faced this issue where in order to prevent edk2
> > from allocating this memory I had to modify CoreFindFreePagesI
> >      //
> >      // Don't allocate out of Special-Purpose memory.
> >      //
> >      if ((Entry->Attribute & EFI_MEMORY_SP) != 0) {
> >        continue;
> >      }
> > Can't we add PCD based logic here to selectively NOT use SP memory for
> > edk2 allocations? I think "reserved-memory" attr does not work well
> > because it would force OS/drivers not to use it. Which is not what we
> > 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
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119552): https://edk2.groups.io/g/devel/message/119552
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-06-11 17:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-18  0:57 [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute Michael Kubacki
2024-05-22  3:40 ` Du Lin
2024-05-22 15:03   ` Oliver Smith-Denny
2024-05-23  9:17     ` Du Lin
2024-05-23 21:05       ` Oliver Smith-Denny
2024-05-31  3:44         ` Du Lin
2024-05-31 17:00           ` Oliver Smith-Denny
2024-06-03  1:27             ` Du Lin
2024-06-10  1:44 ` Dhaval Sharma
2024-06-11 17:03   ` Oliver Smith-Denny
2024-06-11 17:30     ` Michael D Kinney [this message]
2024-06-11 17:53       ` Oliver Smith-Denny

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=CO1PR11MB492949805AA4A98F57CE7977D2C72@CO1PR11MB4929.namprd11.prod.outlook.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