public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: "Yao, Jiewen" <jiewen.yao@intel.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	"Ni, Ray" <ray.ni@intel.com>
Subject: Re: WSMT bits
Date: Wed, 11 Mar 2020 14:02:39 +0100	[thread overview]
Message-ID: <9ec35b01-86cc-c68b-3615-9d29585cdbdc@redhat.com> (raw)
In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503F97BDC5@shsmsx102.ccr.corp.intel.com>

On 03/11/20 13:00, Yao, Jiewen wrote:
> Great question on ACPIReclaim!
> Yes, it is the confusing part.
> 
> 1) Per ACPI specification, ACPI reclaim is the memory to hold the ACPI table.
> It *may* be reclaimed by OS as OS memory, after OS copied the ACPI table to its own local space.
> As such, we need make sure it is treated as *OS usable* memory. So we do not allow SMM driver to touch it.
> 
> 2) Per our experience, ACPI reclaim *may* be treated as reserved memory by some OS.
> OS just does not use it.
> As such, we need group them in the BIN to not leave too many holes for OS. So we need track it in MemoryTypeInfo.
> 
> 
> You may refer to https://github.com/tianocore/edk2-platforms/blob/master/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
> Below is our platform template.
> GLOBAL_REMOVE_IF_UNREFERENCED EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
>   { EfiACPIReclaimMemory,   FixedPcdGet32 (PcdPlatformEfiAcpiReclaimMemorySize) },  // ASL
>   { EfiACPIMemoryNVS,       FixedPcdGet32 (PcdPlatformEfiAcpiNvsMemorySize) },      // ACPI NVS (including S3 related)
>   { EfiReservedMemoryType,  FixedPcdGet32 (PcdPlatformEfiReservedMemorySize) },     // BIOS Reserved (including S3 related)
>   { EfiRuntimeServicesData, FixedPcdGet32 (PcdPlatformEfiRtDataMemorySize) },       // Runtime Service Data
>   { EfiRuntimeServicesCode, FixedPcdGet32 (PcdPlatformEfiRtCodeMemorySize) },       // Runtime Service Code
>   { EfiMaxMemoryType, 0 }
> };

Very tricky indeed. Thanks for the explanation! Now I know what to do.

Cheers!
Laszlo


      reply	other threads:[~2020-03-11 13:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10  9:36 WSMT bits Laszlo Ersek
2020-03-10 13:48 ` Laszlo Ersek
2020-03-11  2:01   ` Yao, Jiewen
2020-03-11 10:23     ` Laszlo Ersek
2020-03-11 12:00       ` Yao, Jiewen
2020-03-11 13:02         ` Laszlo Ersek [this message]

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=9ec35b01-86cc-c68b-3615-9d29585cdbdc@redhat.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