public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Benjamin Doron" <benjamin.doron00@gmail.com>
To: Laszlo Ersek <lersek@redhat.com>,devel@edk2.groups.io
Subject: Re: [edk2-devel] [Patch V2 0/2] Let AcpiTableDxe driver install Acpi table from Hob
Date: Wed, 24 Mar 2021 18:39:01 -0700	[thread overview]
Message-ID: <14713.1616636341486510048@groups.io> (raw)
In-Reply-To: <2e602df8-b1fc-193b-f61a-86802ace9108@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2186 bytes --]

On Wed, Mar 24, 2021 at 02:33 PM, Laszlo Ersek wrote:

> 
> 
>> 
>>> 
>>>> Hi all,
>>>> Would it be acceptable/feasible for AcpiTableDxe or AcpiPlatformDxe (in
>>>> MdeModulePkg) to use `EfiGetSystemConfigurationTable` to get the RSDP
>>>> and then install the tables? It's a solution that uses the regular
>>>> UefiLib, so it avoids platform-specific quirks (and as I see it, if RSDP
>>>> is in the configuration table, we probably always want those tables).
>>> 
>>> I'm sorry, I don't understand how this would help.
>> 
>> As I understand it, the issue is that this patchset changes MdeModulePkg
>> to do platform-specific parsing.
>> 
>> Perhaps it would be an acceptable solution for platforms to retrieve the
>> tables, then add
>> RSDP/them to the configuration table to be installed by
>> AcpiTableDxe/AcpiPlatformDxe.
>> This allows MdeModulePkg to abstract away the parsing, only installing
>> tables
>> available to it.
> 
> But this is already the best approach, and already what's happening --
> when you call EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() from the
> platform's AcpiPlatformDxe, that's *how* you tell AcpiTableDxe in
> MdeModulePkg to pick up the table and hook it into the RSDT / XSDT /
> wherever, and also to manage RSD PTR as a UEFI configuration table.
> 
> Are you (more or less) proposing a new EFI_ACPI_TABLE_PROTOCOL member
> function for taking a forest of ACPI tables, passed in by RSD PTR?

Yes.
I thought the implementation of AcpiPlatformDxe in MdeModulePkg could take it, so it will install
ACPI tables from flash or from memory.

Regarding UefiPayloadPkg: gEfiAcpiTableGuid is not a HOB. It's an entry in
gUefiSystemTableInfoGuid (which is a HOB) that was installed in the config table. Therefore,
retrieving its GUID as a HOB in AcpiTableDxe fails.

To make this patchset work in UefiPayloadPkg (actually a fork), I have to add AcpiTableDxe to its
FDF, drop patch 2/2 and make `InstallAcpiTableFromHob` do
`Status = EfiGetSystemConfigurationTable (&gEfiAcpiTableGuid, (VOID **) &Rsdp);`.
Then, this patchset works: "acpiview" shell command shows tables from QEMU + coreboot, as well
as a BGRT.

[-- Attachment #2: Type: text/html, Size: 2300 bytes --]

  parent reply	other threads:[~2021-03-25  1:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23  3:24 [Patch V2 1/2] MdeModulePkg/ACPI: Install ACPI table from HOB Zhiguang Liu
2021-03-23  3:24 ` [Patch V2 2/2] UefiPayloadPkg: Remove code that installs APCI Zhiguang Liu
2021-03-23  3:44   ` Ni, Ray
2021-03-23  5:19   ` Guo Dong
2021-03-23  3:24 ` [Patch V2 0/2] Let AcpiTableDxe driver install Acpi table from Hob Zhiguang Liu
2021-03-23 12:40   ` [edk2-devel] " Laszlo Ersek
2021-03-23 15:45     ` Guo Dong
2021-03-23 16:12       ` Andrew Fish
2021-03-23 17:29         ` Guo Dong
2021-03-24  5:30         ` Ni, Ray
2021-03-23 16:48       ` Laszlo Ersek
2021-03-23 17:15         ` Guo Dong
2021-03-24  9:50           ` Laszlo Ersek
2021-03-24  4:09         ` Ni, Ray
2021-03-24 10:29           ` Laszlo Ersek
2021-03-23 23:52     ` Benjamin Doron
2021-03-24  9:53       ` Laszlo Ersek
2021-03-24 16:55         ` Benjamin Doron
2021-03-24 18:33           ` Laszlo Ersek
2021-03-25  1:10             ` Ni, Ray
2021-03-25  3:55               ` Andrew Fish
2021-03-25 17:35                 ` Laszlo Ersek
2021-03-25 17:33               ` Laszlo Ersek
2021-03-25  1:39             ` Benjamin Doron [this message]
2021-03-23  3:44 ` [Patch V2 1/2] MdeModulePkg/ACPI: Install ACPI table from HOB Ni, Ray

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=14713.1616636341486510048@groups.io \
    --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