This patch series adds support for ACPI tables on the
SBSA Qemu platform. We are using a pseudo static
approach to create the ACPI tables. Some of the tables
such as DSDT, MCFG, SPCR, GTDT are created in a static
way at compile time because they hold a fixed configuration
and there are no changes at runtime.
The MADT and SSDT are dependant on the number of CPUs and
hence they are created at runtime based on the number of
CPUs the user has requested.
Changes in V2:
- Add support for SSDT table creation
- Addressed the comments of V1 patch
o Moved PCI changes to a separate patch
o Used Pcd to create common ACPI fields such as OEMID,
OEM revision etc.
o Created an Include directory to hold the common
header files for ACPI
Tanmay Jagdale (5):
SbsaQemu: Initial support for static ACPI tables
SbsaQemu: AcpiTables: Add PCI support and MCFG Table
SbsaQemu: Add new ACPI driver and FDT parser to count CPU
SbsaQemu: AcpiDxe: Create MADT table at runtime
SbsaQemu: AcpiDxe: Add support to SSDT Table
Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 12 +-
Platform/Qemu/SbsaQemu/SbsaQemu.fdf | 9 +
Silicon/Qemu/SbsaQemu/Acpi.dsc.inc | 36 ++
.../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 46 ++
Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl | 449 ++++++++++++++++++
Silicon/Qemu/SbsaQemu/AcpiTables/Fadt.aslc | 80 ++++
Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc | 67 +++
Silicon/Qemu/SbsaQemu/AcpiTables/Mcfg.aslc | 43 ++
Silicon/Qemu/SbsaQemu/AcpiTables/Spcr.aslc | 53 +++
.../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 379 +++++++++++++++
.../SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 67 +++
.../SbsaQemuPlatformDxe.inf | 1 -
.../Include/IndustryStandard/SbsaQemuAcpi.h | 81 ++++
Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 8 +-
14 files changed, 1326 insertions(+), 5 deletions(-)
create mode 100644 Silicon/Qemu/SbsaQemu/Acpi.dsc.inc
create mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf
create mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl
create mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/Fadt.aslc
create mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc
create mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/Mcfg.aslc
create mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/Spcr.aslc
create mode 100644 Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c
create mode 100644 Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf
create mode 100644 Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h
--
2.28.0
Hi all,
We've started looking at the TF-A qemu_sbsa port a bit, and found some
things that were carried over from the mach-virt port for no good
reason:
Looking at plat/qemu/qemu_sbsa/platform.mk:
- lib/cpus/aarch64/aem_generic.S is for fast models/foundation model.
- although we may want to add a "generic armv8 cpu" to TF-A at some
point, to reduce synchronization needs when bumping the cpu
used by sbsa-ref in upstream QEMU.
- lib/cpus/aarch64/cortex_a53.S is not supported by sbsa-ref, nor does
the A53 support enough physical address bits to be able to control
this platform.
- drivers/io/io_semihosting.c, lib/semihosting/semihosting.c, and
lib/semihosting/${ARCH}/semihosting_call.S are not actually used.
But there *are* some other bits of qemu/common code which needs to
be cinditionalized-out if these files aren't included.
- plat/common/plat_psci_common.c
- all of the ${ARCH} stanzas should just be 'aarch64', this platform
cannot be booted in aarch32.
- plat/common/plat_psci_common.c isn't usefully hooked up to anything
at the moment, but we can fix that when we get to actually
implementing useful PSCI. That file may simply not belong in
'common'.
/
Leif
I have played with ARM Enterprise ACS test suite yesterday locally.
It can not be added to CI yet as it requires working watchdog and reset
needs to function too (ASA-54).
Part of it was run of Luv. I put results online as someone may find it
interesting and useful:
https://people.linaro.org/~marcin.juszkiewicz/sbsa/luv-results-2020-08-06--…
I can add them to CI if this would be useful.
On 29/07/2020 21:35, Tanmay Jagdale via Asa-dev wrote:
> Hi Leif, Graeme,
>
> I have pushed the following branch that adds support for the
> pseudo static approach of modifying the ACPI tables.
> http://git.linaro.org/people/tanmay.jagdale/edk2-platforms.git/log/?h=qemu_…
>
> With this we can boot Linux with any number of CPUs and the
> ACPI tables will get configured at runtime based on the CPU
> count.
>
> I have separated them into 4 commits and a patch with all the
> changes consolidated into one is in the attached file.
>
> There are a few issues
> 1. We have to pass acpi_apic_instance=2 bootarg to Linux because
> 2 APIC tables are getting created we have to use the 2nd instance
> which gets created at runtime.
> I'm working on a fix for this issue.
I think if you just rename the madt.aslc to madt.c this will fix that.
The aslc extension means that version of the table automatically gets
installed.
Thanks
Graeme
> 2. The SSDT table does not have entries for all CPUs and I'm working
> on updating that table too.
>
> Can you please review this patchset and see if these changes are
> okay ?
>
> With Regards,
> Tanmay
Hi Leif, Graeme,
I have pushed the following branch that adds support for the
pseudo static approach of modifying the ACPI tables.
http://git.linaro.org/people/tanmay.jagdale/edk2-platforms.git/log/?h=qemu_…
With this we can boot Linux with any number of CPUs and the
ACPI tables will get configured at runtime based on the CPU
count.
I have separated them into 4 commits and a patch with all the
changes consolidated into one is in the attached file.
There are a few issues
1. We have to pass acpi_apic_instance=2 bootarg to Linux because
2 APIC tables are getting created we have to use the 2nd instance
which gets created at runtime.
I'm working on a fix for this issue.
2. The SSDT table does not have entries for all CPUs and I'm working
on updating that table too.
Can you please review this patchset and see if these changes are
okay ?
With Regards,
Tanmay