public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: devel@edk2.groups.io, Andrew Fish <afish@apple.com>,
	 "Ard Biesheuvel (TianoCore)" <ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] Is there an ACPI solution for ARM (or other) platforms that don't have DRAM under 4 GiB?
Date: Sun, 21 Mar 2021 14:23:44 +0100	[thread overview]
Message-ID: <CAMj1kXH+9pU4sSiBJ0RnWpp=84ck0ngZnRoYpQNetexAS0TuYg@mail.gmail.com> (raw)
In-Reply-To: <ca0dc3ea-0538-daaa-356e-2366efac2bce@redhat.com>

On Fri, 19 Mar 2021 at 20:41, Laszlo Ersek <lersek@redhat.com> wrote:
>
> adding Ard, comment below
>
> On 03/19/21 02:47, Andrew Fish via groups.io wrote:
> > Some one was asking me this question and I did not know the answer?
> > It looks like the stock ACPI stack needs memory under 4 GiB to fill
> > in 32-bits as it was the 1990’s when that got written down. Is there
> > support on TianoCore to implement ACPI on a platform that does not
> > have memory < 4 GiB in its address map?
>
> Yes, I think so. The most relevant commits seem to be:
>
>   f9bbb8d9c3f0 MdeModulePkg: AcpiTableDxe: make 4 GB table allocation limit optional
>
>   f859c6796f40 MdeModulePkg/AcpiTableDxe: consider version mask when removing tables
>   09da11081915 MdeModulePkg/BootGraphicsResourceTableDxe: don't allocate below 4 GB
>
>   0e0ae47da6bd MdeModulePkg/AcpiTableDxe: use pool allocations when possible
>   cf299745ae66 MdeModulePkg/AcpiTableDxe: use pool allocation for RSDT/XSDT if possible
>   8ead7af22bc5 MdeModulePkg/AcpiTableDxe: use pool allocation for RSDP if possible
>
> This should be possible to control through PcdAcpiExposedTableVersions.
>

Yes, the AMD seattle based platforms in edk2-platforms are a good
example of this: on these systems, physical DRAM starts at
0x80_0000_0000, which resulted in a host of 32-bit problems in EDK2,
not only with ACPI and SMBIOS, but also with DMA support in PCI
drivers that did not bother to enable 64-bit DMA even if the hardware
supported it.

On these systems, we have

gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20

which omits all 32-bit only allocations that exist in various places
in the ACPI code.

With a recent build of EDK2 Tianocore, the Linux boot code reports the
following set of ACPI tables

RSDP 0x00000087FBE10018 000024 (v02 AMDINC)
XSDT 0x00000087FBE1FE98 00008C (v01 AMDINC SEATTLE  00000000      01000013)
FACP 0x00000087FBE1E818 00010C (v05 AMDINC SEATTLE  00000000 AMD  00000000)
DSDT 0x00000087FBE1E998 000752 (v02 AMDINC SEATTLE  00000003 INTL 20180105)
SSDT 0x00000087FBE1FA98 00012F (v02 AMDINC StyxB1   00000003 INTL 20180105)
SSDT 0x00000087FBE1FC18 0000B1 (v02 AMDINC StyxKcs  00000003 INTL 20180105)
SSDT 0x00000087FBE1F418 00045B (v02 AMDINC StyxXgbe 00000003 INTL 20180105)
CSRT 0x00000087FBE1FD18 000060 (v00 AMDINC SEATTLE  00000000 AMD  00000000)
DBG2 0x00000087FBE17518 00005B (v00 AMDINC SEATTLE  00000000 AMD  00000000)
GTDT 0x00000087FBE1E418 0000B8 (v02 AMDINC SEATTLE  00000000 AMD  00000000)
IORT 0x00000087FBE1D998 000914 (v00 AMDINC SEATTLE  00000000 AMD  00000000)
APIC 0x00000087FBE1BE18 0002BC (v03 AMDINC SEATTLE  00000000 AMD  00000000)
MCFG 0x00000087FBE1E798 00003C (v01 AMDINC SEATTLE  00000000 AMD  00000000)
PPTT 0x00000087FBE1D318 000374 (v01 AMDINC SEATTLE  00000000 AMD  00000000)
SPCR 0x00000087FBE1FE18 000050 (v02 AMDINC SEATTLE  00000000 AMD  00000000)
VFCT 0x00000087FBDE0018 00E484 (v01 AMDINC SEATTLE  00000001 AMD  31504F47)

There is a similar PCD to omit the legacy SMBIOS entrypoint, and only
emit the 64-bit capable one.

      reply	other threads:[~2021-03-21 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  1:47 Is there an ACPI solution for ARM (or other) platforms that don't have DRAM under 4 GiB? Andrew Fish
2021-03-19 19:41 ` [edk2-devel] " Laszlo Ersek
2021-03-21 13:23   ` 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='CAMj1kXH+9pU4sSiBJ0RnWpp=84ck0ngZnRoYpQNetexAS0TuYg@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