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: Peter Jones <pjones@redhat.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	 "Dong, Eric" <eric.dong@intel.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	 "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>
Subject: Re: [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory
Date: Fri, 19 Oct 2018 13:28:33 +0800	[thread overview]
Message-ID: <CAKv+Gu9QxZwuJr8ZS1RPBEC=CkwO15GO94QZXYq18WHQpfF=pg@mail.gmail.com> (raw)
In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BC23615@shsmsx102.ccr.corp.intel.com>

On 19 October 2018 at 13:25, Zeng, Star <star.zeng@intel.com> wrote:
> Be honest, I am not clear about the history why EfiBootServicesData is required for ESRT. But OS indeed cares about ESRT table, for example, I guess the Firmware in Device Manager for Windows is built based on ESRT table. In fact,  I think OS loader can access either EfiBootServicesData or EfiRuntimeServicesData configuration table as it controls the runtime phase point.
>

The problem is not with the OS. The OS can access it it any time it
want, and create a virtual mapping for it.

The problem is with the firmware: any table that the firmware wants to
access *itself* requires a virtual mapping to be provided by the OS in
SetVirtualAdressMap(), so that the virtual address is known to the
firmware.

> I am concerning that even the spec could be updated, our code may still need caching for backward compatibility.
>

I don't think that should be a problem: Linux permits the ESRT to
reside in EfiRuntimeServicesData already, because certain x86
production systems do that. This means that it is highly unlikely that
Windows disallows this.



>
> -----Original Message-----
> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> Sent: Friday, October 19, 2018 1:11 PM
> To: Zeng, Star <star.zeng@intel.com>
> Cc: Peter Jones <pjones@redhat.com>; edk2-devel@lists.01.org; Dong, Eric <eric.dong@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Subject: Re: [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory
>
> On 19 October 2018 at 13:01, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>> On 19 October 2018 at 12:48, Zeng, Star <star.zeng@intel.com> wrote:
>>> Ok, thanks and got the case.
>>>
>>> DxeCapsuleLibVirtualAddressChangeEvent may be too late as it could not allocate pool to do caching.
>>> I meant registering gEfiSystemResourceTableGuid event group notification(installconfigurationtable will trigger event group) and do caching in the notification function.
>>>
>>>
>>
>> OK, I will create a bugzilla for this.
>>
>
> As I understand it, the reason we require EfiBootServicesData for the ESRT is because the OS may not care about this table, and so we don't want to waste the memory. However, if we end up caching the entire table in EfiRuntimeServicesData anyway [so that the firmware itself can access it], is there still a point to keeping this requirement?
> Shouldn't we update the spec regardless?


  reply	other threads:[~2018-10-19  5:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19  2:54 [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory Ard Biesheuvel
2018-10-19  3:24 ` Ard Biesheuvel
2018-10-19  3:46   ` Zeng, Star
2018-10-19  3:48     ` Ard Biesheuvel
2018-10-19  4:39       ` Zeng, Star
2018-10-19  4:43         ` Ard Biesheuvel
2018-10-19  4:48           ` Zeng, Star
2018-10-19  5:01             ` Ard Biesheuvel
2018-10-19  5:11               ` Ard Biesheuvel
2018-10-19  5:25                 ` Zeng, Star
2018-10-19  5:28                   ` Ard Biesheuvel [this message]
2018-10-19  6:01                     ` Zeng, Star

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+Gu9QxZwuJr8ZS1RPBEC=CkwO15GO94QZXYq18WHQpfF=pg@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