From: Laszlo Ersek <lersek@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
edk2-devel@lists.01.org, leif.lindholm@linaro.org,
jordan.l.justen@intel.com,
Shannon Zhao <zhaoshenglong@huawei.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu devel list <qemu-devel@nongnu.org>,
gengdongjiu <gengdongjiu@huawei.com>,
Drew Jones <drjones@redhat.com>
Subject: Re: [RFC PATCH] OvmfPkg/AcpiPlatformDxe: lift 4 GB alloc limit for modern ACPI systems
Date: Thu, 1 Jun 2017 18:37:47 +0200 [thread overview]
Message-ID: <3de97c67-5b9d-35a0-ec5d-0098180dec9b@redhat.com> (raw)
In-Reply-To: <20170601171650.4a196f36@nial.brq.redhat.com>
On 06/01/17 17:16, Igor Mammedov wrote:
> On Thu, 1 Jun 2017 14:25:48 +0200
> Laszlo Ersek <lersek@redhat.com> wrote:
>
>> On 06/01/17 13:22, Ard Biesheuvel wrote:
>>> ACPI supports architectures such as arm64, which did not exist when the
>>> original 32-bit ACPI 1.0 was introduced. These days, ACPI tables can all
>>> support 64-bit memory addresses, and so QEMU has been updated to emit
>>> 64-bit table and entry point types on arm64/mach-virt.
>>
>> Do you have commit cb51ac2ffe36 ("hw/arm/virt: generate 64-bit
>> addressable ACPI objects", 2017-04-10) in mind?
> My understanding was that OVMF discards RSDP/[RX]SDT so that commit
> probably irrelevant.
OVMF does not install these root tables, that's correct, but it does
execute the commands that refer to the blob(s) that contain these
tables. So for example pointers and checksums are updated, it's only the
last heuristics phase that detects if a pointer points to RSDT / XSDT
and then those tables are not installed.
OVMF catches pointer field overflows, and rolls back the entire
processing if one occurs. So the commit in question is certainly
relevant; without it, a >4GB allocation address would be added to an
RSDT entry (which is 4-byte wide), and that would fail the entire process.
> Now about FADT or any other blob, do we really need to extend
> loader protocol? Couldn't firmware decide where to allocate
> table based on size in add_pointer commands?
>
> That might be a bit complicated but on the bright side is that
> it is firmware only change and it should work both on old and
> new qemu without breaking anything.
For this I'd have to pre-scan the ADD_POINTER commands, and for target
blob ever pointed-at by them, find the minimum referring pointer width.
If that minimum width is smaller than 8 bytes, the pointed-at blob must
be allocated under 4GB.
I think this is too complex (it would add a third pass to OVMF's
processing), especially given that we already have a dedicated Zone
field that specifically tells the firmware where the blobs should be
allocated. The goal is to decrease the dirty tricks in OVMF, not
increase them.
Furthermore, this wouldn't help us turn off the SDT header probing in
OVMF (the feature that currently requires those strange AML-level offset
increments, into blobs that don't host ACPI tables). Suppressing the
probe in a nice way surely needs a specific hint, so we might as well
handle both cases with Zone extensions.
Laszlo
next prev parent reply other threads:[~2017-06-01 16:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 11:22 [RFC PATCH] OvmfPkg/AcpiPlatformDxe: lift 4 GB alloc limit for modern ACPI systems Ard Biesheuvel
2017-06-01 12:25 ` Laszlo Ersek
2017-06-01 15:16 ` Igor Mammedov
2017-06-01 16:37 ` Laszlo Ersek [this message]
2017-06-01 20:40 ` Laszlo Ersek
2017-06-02 14:56 ` Gerd Hoffmann
2017-06-02 22:40 ` Laszlo Ersek
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=3de97c67-5b9d-35a0-ec5d-0098180dec9b@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