All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] Add support for RISC-V ACPI tests
@ 2024-03-15 13:05 Sunil V L
  2024-03-15 13:05 ` [PATCH 01/12] roms/edk2-build.py: Add --module support Sunil V L
  2024-03-15 13:05 ` [PATCH 02/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support Sunil V L
  0 siblings, 2 replies; 6+ messages in thread
From: Sunil V L @ 2024-03-15 13:05 UTC (permalink / raw)
  To: qemu-devel, qemu-arm, qemu-riscv
  Cc: Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
	Thomas Huth, Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Igor Mammedov, Ani Sinha,
	Laurent Vivier, Daniel Henrique Barboza, Alistair Francis,
	Andrew Jones, Anup Patel, Haibo1 Xu, Sunil V L

Currently, bios-table-test doesn't support RISC-V. This series enables
the framework changes required and basic testing. Things like NUMA
related test cases will be added later.

This needs refactoring/renaming of ARM64 bios table tests. Importantly,
the test cases now look for the expected AML files under
tests/data/acpi/virt/aarch64 path instead of directly under
tests/data/acpi/virt. To keep test cases not to fail because of this
movement, they are updated to look for both paths first.

As part of this effort, it is found that uefi-test-tools is currently
broken to build. So, updated its Makefile as well to use python based
edk2 build script.

The series depends on Gerd's below series.
https://lists.gnu.org/archive/html/qemu-devel/2024-03/msg03855.html

The changes are also available at branch
https://gitlab.com/vlsunil/qemu/-/tree/riscv_bios_table_test_v1

This branch which is on top of Gerd's series completed CI tests.
https://gitlab.com/vlsunil/qemu/-/pipelines/1214784985


Sunil V L (12):
  roms/edk2-build.py: Add --module support
  uefi-test-tools/UefiTestToolsPkg: Add RISC-V support
  uefi-test-tools: Add support for python based build script
  tests/data/uefi-boot-images: Add RISC-V ISO image
  qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them
  tests/qtest/bios-tables-test.c: Add support for arch in path
  tests/data/acpi/virt: Move ACPI tables under aarch64
  meson.build: Add RISC-V to the edk2-target list
  pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs
  tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V
  tests/data/acpi/virt/riscv64: Add expected ACPI tables for RISC-V
  tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

 meson.build                                   |   2 +-
 pc-bios/meson.build                           |   2 +
 roms/edk2-build.py                            |   3 +
 tests/data/acpi/rebuild-expected-aml.sh       |   5 +-
 tests/data/acpi/virt/{ => aarch64}/APIC       | Bin
 .../acpi/virt/{ => aarch64}/APIC.acpihmatvirt | Bin
 .../acpi/virt/{ => aarch64}/APIC.topology     | Bin
 tests/data/acpi/virt/{ => aarch64}/DBG2       | Bin
 tests/data/acpi/virt/{ => aarch64}/DSDT       | Bin
 .../acpi/virt/{ => aarch64}/DSDT.acpihmatvirt | Bin
 tests/data/acpi/virt/{ => aarch64}/DSDT.memhp | Bin
 tests/data/acpi/virt/{ => aarch64}/DSDT.pxb   | Bin
 .../acpi/virt/{ => aarch64}/DSDT.topology     | Bin
 tests/data/acpi/virt/{ => aarch64}/FACP       | Bin
 tests/data/acpi/virt/{ => aarch64}/GTDT       | Bin
 .../acpi/virt/{ => aarch64}/HMAT.acpihmatvirt | Bin
 tests/data/acpi/virt/{ => aarch64}/IORT       | Bin
 tests/data/acpi/virt/{ => aarch64}/MCFG       | Bin
 tests/data/acpi/virt/{ => aarch64}/NFIT.memhp | Bin
 tests/data/acpi/virt/{ => aarch64}/PPTT       | Bin
 .../acpi/virt/{ => aarch64}/PPTT.acpihmatvirt | Bin
 .../acpi/virt/{ => aarch64}/PPTT.topology     | Bin
 tests/data/acpi/virt/{ => aarch64}/SLIT.memhp | Bin
 tests/data/acpi/virt/{ => aarch64}/SPCR       | Bin
 .../acpi/virt/{ => aarch64}/SRAT.acpihmatvirt | Bin
 tests/data/acpi/virt/{ => aarch64}/SRAT.memhp | Bin
 .../data/acpi/virt/{ => aarch64}/SRAT.numamem | Bin
 tests/data/acpi/virt/{ => aarch64}/SSDT.memhp | Bin
 tests/data/acpi/virt/{ => aarch64}/VIOT       | Bin
 tests/data/acpi/virt/riscv64/APIC             | Bin 0 -> 116 bytes
 tests/data/acpi/virt/riscv64/BGRT             | Bin 0 -> 56 bytes
 tests/data/acpi/virt/riscv64/DSDT             | Bin 0 -> 3518 bytes
 tests/data/acpi/virt/riscv64/FACP             | Bin 0 -> 276 bytes
 tests/data/acpi/virt/riscv64/MCFG             | Bin 0 -> 60 bytes
 tests/data/acpi/virt/riscv64/RHCT             | Bin 0 -> 314 bytes
 tests/data/acpi/virt/riscv64/RSDP             | Bin 0 -> 36 bytes
 tests/data/acpi/virt/riscv64/SPCR             | Bin 0 -> 80 bytes
 tests/data/acpi/virt/riscv64/XSDT             | Bin 0 -> 84 bytes
 .../bios-tables-test.riscv64.iso.qcow2        | Bin 0 -> 16896 bytes
 tests/qtest/bios-tables-test.c                |  95 ++++++++++++++----
 tests/qtest/meson.build                       |   3 +
 tests/uefi-test-tools/Makefile                |  18 ++--
 .../UefiTestToolsPkg/UefiTestToolsPkg.dsc     |   6 +-
 tests/uefi-test-tools/uefi-test-build.config  |  57 +++++++++++
 44 files changed, 156 insertions(+), 35 deletions(-)
 rename tests/data/acpi/virt/{ => aarch64}/APIC (100%)
 rename tests/data/acpi/virt/{ => aarch64}/APIC.acpihmatvirt (100%)
 rename tests/data/acpi/virt/{ => aarch64}/APIC.topology (100%)
 rename tests/data/acpi/virt/{ => aarch64}/DBG2 (100%)
 rename tests/data/acpi/virt/{ => aarch64}/DSDT (100%)
 rename tests/data/acpi/virt/{ => aarch64}/DSDT.acpihmatvirt (100%)
 rename tests/data/acpi/virt/{ => aarch64}/DSDT.memhp (100%)
 rename tests/data/acpi/virt/{ => aarch64}/DSDT.pxb (100%)
 rename tests/data/acpi/virt/{ => aarch64}/DSDT.topology (100%)
 rename tests/data/acpi/virt/{ => aarch64}/FACP (100%)
 rename tests/data/acpi/virt/{ => aarch64}/GTDT (100%)
 rename tests/data/acpi/virt/{ => aarch64}/HMAT.acpihmatvirt (100%)
 rename tests/data/acpi/virt/{ => aarch64}/IORT (100%)
 rename tests/data/acpi/virt/{ => aarch64}/MCFG (100%)
 rename tests/data/acpi/virt/{ => aarch64}/NFIT.memhp (100%)
 rename tests/data/acpi/virt/{ => aarch64}/PPTT (100%)
 rename tests/data/acpi/virt/{ => aarch64}/PPTT.acpihmatvirt (100%)
 rename tests/data/acpi/virt/{ => aarch64}/PPTT.topology (100%)
 rename tests/data/acpi/virt/{ => aarch64}/SLIT.memhp (100%)
 rename tests/data/acpi/virt/{ => aarch64}/SPCR (100%)
 rename tests/data/acpi/virt/{ => aarch64}/SRAT.acpihmatvirt (100%)
 rename tests/data/acpi/virt/{ => aarch64}/SRAT.memhp (100%)
 rename tests/data/acpi/virt/{ => aarch64}/SRAT.numamem (100%)
 rename tests/data/acpi/virt/{ => aarch64}/SSDT.memhp (100%)
 rename tests/data/acpi/virt/{ => aarch64}/VIOT (100%)
 create mode 100755 tests/data/acpi/virt/riscv64/APIC
 create mode 100755 tests/data/acpi/virt/riscv64/BGRT
 create mode 100755 tests/data/acpi/virt/riscv64/DSDT
 create mode 100755 tests/data/acpi/virt/riscv64/FACP
 create mode 100755 tests/data/acpi/virt/riscv64/MCFG
 create mode 100755 tests/data/acpi/virt/riscv64/RHCT
 create mode 100755 tests/data/acpi/virt/riscv64/RSDP
 create mode 100755 tests/data/acpi/virt/riscv64/SPCR
 create mode 100755 tests/data/acpi/virt/riscv64/XSDT
 create mode 100644 tests/data/uefi-boot-images/bios-tables-test.riscv64.iso.qcow2
 create mode 100644 tests/uefi-test-tools/uefi-test-build.config

-- 
2.40.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 01/12] roms/edk2-build.py: Add --module support
  2024-03-15 13:05 [PATCH 00/12] Add support for RISC-V ACPI tests Sunil V L
@ 2024-03-15 13:05 ` Sunil V L
  2024-03-15 14:13   ` Gerd Hoffmann
  2024-03-15 13:05 ` [PATCH 02/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support Sunil V L
  1 sibling, 1 reply; 6+ messages in thread
From: Sunil V L @ 2024-03-15 13:05 UTC (permalink / raw)
  To: qemu-devel, qemu-arm, qemu-riscv
  Cc: Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
	Thomas Huth, Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Igor Mammedov, Ani Sinha,
	Laurent Vivier, Daniel Henrique Barboza, Alistair Francis,
	Andrew Jones, Anup Patel, Haibo1 Xu, Sunil V L

UefiTestToolsPkg which should use edk2-build.py needs --module parameter
support. Add this optional parameter handling.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
 roms/edk2-build.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/roms/edk2-build.py b/roms/edk2-build.py
index e564765aaa..3bfe200929 100755
--- a/roms/edk2-build.py
+++ b/roms/edk2-build.py
@@ -192,6 +192,9 @@ def build_one(cfg, build, jobs = None, silent = False, nologs = False):
         cmdline += [ '-n', jobs ]
     for arch in b['arch'].split():
         cmdline += [ '-a', arch ]
+    if 'module' in b:
+        for module in b['module'].split():
+            cmdline += [ '-m', module ]
     if 'opts' in b:
         for name in b['opts'].split():
             section = 'opts.' + name
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 02/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support
  2024-03-15 13:05 [PATCH 00/12] Add support for RISC-V ACPI tests Sunil V L
  2024-03-15 13:05 ` [PATCH 01/12] roms/edk2-build.py: Add --module support Sunil V L
@ 2024-03-15 13:05 ` Sunil V L
  2024-03-15 14:14   ` Gerd Hoffmann
  1 sibling, 1 reply; 6+ messages in thread
From: Sunil V L @ 2024-03-15 13:05 UTC (permalink / raw)
  To: qemu-devel, qemu-arm, qemu-riscv
  Cc: Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
	Thomas Huth, Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Igor Mammedov, Ani Sinha,
	Laurent Vivier, Daniel Henrique Barboza, Alistair Francis,
	Andrew Jones, Anup Patel, Haibo1 Xu, Sunil V L

Enable building the test application for RISC-V with appropriate
dependencies updated.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
 tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc b/tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc
index c8511cd732..0902fd3c73 100644
--- a/tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc
+++ b/tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc
@@ -19,7 +19,7 @@
   PLATFORM_VERSION        = 0.1
   PLATFORM_NAME           = UefiTestTools
   SKUID_IDENTIFIER        = DEFAULT
-  SUPPORTED_ARCHITECTURES = ARM|AARCH64|IA32|X64
+  SUPPORTED_ARCHITECTURES = ARM|AARCH64|IA32|X64|RISCV64
   BUILD_TARGETS           = DEBUG
 
 [BuildOptions.IA32]
@@ -60,6 +60,10 @@
 
 [LibraryClasses.IA32, LibraryClasses.X64]
   BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
+
+[LibraryClasses.RISCV64]
+  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
 
 [PcdsFixedAtBuild]
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 01/12] roms/edk2-build.py: Add --module support
  2024-03-15 13:05 ` [PATCH 01/12] roms/edk2-build.py: Add --module support Sunil V L
@ 2024-03-15 14:13   ` Gerd Hoffmann
  2024-03-18  5:24     ` Sunil V L
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2024-03-15 14:13 UTC (permalink / raw)
  To: Sunil V L
  Cc: qemu-devel, qemu-arm, qemu-riscv, Paolo Bonzini,
	Marc-André Lureau, Daniel P . Berrangé,
	Thomas Huth, Philippe Mathieu-Daudé,
	Michael S . Tsirkin, Igor Mammedov, Ani Sinha, Laurent Vivier,
	Daniel Henrique Barboza, Alistair Francis, Andrew Jones,
	Anup Patel, Haibo1 Xu

On Fri, Mar 15, 2024 at 06:35:08PM +0530, Sunil V L wrote:
> UefiTestToolsPkg which should use edk2-build.py needs --module parameter
> support. Add this optional parameter handling.

I don't think this is needed.  By default everything listed in
[Components] should be built, which is just that one module we
have ;)

take care,
  Gerd



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 02/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support
  2024-03-15 13:05 ` [PATCH 02/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support Sunil V L
@ 2024-03-15 14:14   ` Gerd Hoffmann
  0 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2024-03-15 14:14 UTC (permalink / raw)
  To: Sunil V L
  Cc: qemu-devel, qemu-arm, qemu-riscv, Paolo Bonzini,
	Marc-André Lureau, Daniel P . Berrangé,
	Thomas Huth, Philippe Mathieu-Daudé,
	Michael S . Tsirkin, Igor Mammedov, Ani Sinha, Laurent Vivier,
	Daniel Henrique Barboza, Alistair Francis, Andrew Jones,
	Anup Patel, Haibo1 Xu

On Fri, Mar 15, 2024 at 06:35:09PM +0530, Sunil V L wrote:
> Enable building the test application for RISC-V with appropriate
> dependencies updated.
> 
> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
> ---
>  tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Acked-by: Gerd Hoffmann <kraxel@redhat.com>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 01/12] roms/edk2-build.py: Add --module support
  2024-03-15 14:13   ` Gerd Hoffmann
@ 2024-03-18  5:24     ` Sunil V L
  0 siblings, 0 replies; 6+ messages in thread
From: Sunil V L @ 2024-03-18  5:24 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: qemu-devel, qemu-arm, qemu-riscv, Paolo Bonzini,
	Marc-André Lureau, Daniel P . Berrangé,
	Thomas Huth, Philippe Mathieu-Daudé,
	Michael S . Tsirkin, Igor Mammedov, Ani Sinha, Laurent Vivier,
	Daniel Henrique Barboza, Alistair Francis, Andrew Jones,
	Anup Patel, Haibo1 Xu

On Fri, Mar 15, 2024 at 03:13:44PM +0100, Gerd Hoffmann wrote:
> On Fri, Mar 15, 2024 at 06:35:08PM +0530, Sunil V L wrote:
> > UefiTestToolsPkg which should use edk2-build.py needs --module parameter
> > support. Add this optional parameter handling.
> 
> I don't think this is needed.  By default everything listed in
> [Components] should be built, which is just that one module we
> have ;)
> 
Ahh yes. Makes sense. Let me remove this in next revision of the series.

Thanks!
Sunil


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-18  5:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-15 13:05 [PATCH 00/12] Add support for RISC-V ACPI tests Sunil V L
2024-03-15 13:05 ` [PATCH 01/12] roms/edk2-build.py: Add --module support Sunil V L
2024-03-15 14:13   ` Gerd Hoffmann
2024-03-18  5:24     ` Sunil V L
2024-03-15 13:05 ` [PATCH 02/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support Sunil V L
2024-03-15 14:14   ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.