public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Zeng, Star" <star.zeng@intel.com>
Cc: Larry Cleeton <Larry.Cleeton@microsoft.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"Yao, Jiewen" <jiewen.yao@intel.com>
Subject: Re: EFI_MEMORY_ATTRIBUTES_TABLE not in runtime memory
Date: Mon, 18 Sep 2017 19:26:38 -0700	[thread overview]
Message-ID: <CAKv+Gu97bCa8xW0-hv=bLE4E+o7OH3nS6LtQoBkYnm+3wAuH7w@mail.gmail.com> (raw)
In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B972DD1@shsmsx102.ccr.corp.intel.com>

On 18 September 2017 at 18:52, Zeng, Star <star.zeng@intel.com> wrote:
> As I know according to UEFI spec, it has no requirement about the Table needs to be in runtime memory, but only requires the list (holding Guid value and Table pointer) needs to be in runtime memory.
>
> "The InstallConfigurationTable() function is used to maintain the list of configuration tables that are stored in the EFI System Table. The list is stored as an array of (GUID, Pointer) pairs. The list must be allocated from pool memory with PoolType set to EfiRuntimeServicesData."
>
>
> Jiewen, you should know more detail about this feature.
>

Whether the list of configuration tables is in runtime memory and
whether the tables themselves are in runtime memory are completely
different things.

Runtime memory will get a mapping in the virtual tables created by the
OS, which is only necessary if the firmware itself refers to the
contents when runtime services are in progress. Using runtime memory
so that it will be automatically protected from allocation by the OS
implies that the memory is lost even if the OS does not understand the
table type in the first place. And if it does understand the table
type, it can reserve the region itself.

In summary, using runtime memory for configuration tables is a bad
idea, and the fact that it is recommended for SMbios (and there is
even a mention that no virtual mapping should be requested, which is
impossible) is a mistake IMO.

-- 
Ard.


      reply	other threads:[~2017-09-19  2:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 19:48 EFI_MEMORY_ATTRIBUTES_TABLE not in runtime memory Larry Cleeton
2017-09-19  1:52 ` Zeng, Star
2017-09-19  2:26   ` Ard Biesheuvel [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='CAKv+Gu97bCa8xW0-hv=bLE4E+o7OH3nS6LtQoBkYnm+3wAuH7w@mail.gmail.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