* Re: [edk2-devel] Is there an ACPI solution for ARM (or other) platforms that don't have DRAM under 4 GiB?
2021-03-19 19:41 ` [edk2-devel] " Laszlo Ersek
@ 2021-03-21 13:23 ` Ard Biesheuvel
0 siblings, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2021-03-21 13:23 UTC (permalink / raw)
To: Laszlo Ersek; +Cc: devel, Andrew Fish, Ard Biesheuvel (TianoCore)
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.
^ permalink raw reply [flat|nested] 3+ messages in thread