[PATCH] arm/dts/qemu-sbsa: Fix interrupt

2025-05-27 Thread Patrick Rudolph
Change the vcpumntirq in the GICv3 node from SPI to PPI. Prevents Linux from complaining: '[Firmware Bug]: CPU interface incapable of MMIO access' Fixes: 6d722894fd48 "board: emulation: Add QEMU sbsa support" Signed-off-by: Patrick Rudolph --- arch/arm/dts/qemu-sbsa.d

[PATCH 3/3] emulation: qemu-sbsa: Fill in correct ITS ID

2025-03-20 Thread Patrick Rudolph
d fetch it from the device instead. TEST: Fixes non working IRQs in QEMU sbsa-ref. Signed-off-by: Patrick Rudolph --- board/emulation/qemu-sbsa/acpi.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/board/emulation/qemu-sbsa/acpi.c b/board/emulation/q

[PATCH 2/3] emulation: qemu-sbsa: Move ITS node into GICv3 node

2025-03-20 Thread Patrick Rudolph
According to the binding [1] the ITS node should be a subnode of the GICv3 node. Thus move it now that the driver binds subnodes as well. 1: https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/arm%2Cgic-v3.txt Signed-off-by: Patrick Rudolph --- arch/arm/dts/qemu

[PATCH 1/3] arm: gic-v3: Scan for subnodes

2025-03-20 Thread Patrick Rudolph
oller/arm%2Cgic-v3.txt Signed-off-by: Patrick Rudolph --- arch/arm/lib/gic-v3-its.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c index 51cc2397768..34f05e94672 100644 --- a/arch/arm/lib/gic-v3-its.c +++ b/arch/arm/lib/gic-v3-its.c @@ -

[PATCH 5/5] test: acpi: Add IORT tests

2025-03-16 Thread Patrick Rudolph
Add tests for IORT table generation: - SMMU_V3 node - RC node Signed-off-by: Patrick Rudolph --- test/dm/acpigen.c | 115 ++ 1 file changed, 115 insertions(+) diff --git a/test/dm/acpigen.c b/test/dm/acpigen.c index 23c16bd9866..ee9517f9c29 100644

[PATCH 4/5] acpi: Conditionally set mapping_offset in IORT

2025-03-16 Thread Patrick Rudolph
The spec recommends to set the mapping_offset only when there are ID mappings as indicated by the mapping_count field. Signed-off-by: Patrick Rudolph --- lib/acpi/acpi_table.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/acpi/acpi_table.c b/lib/acpi

[PATCH 3/5] acpi: Clear reserved bits in IORT

2025-03-16 Thread Patrick Rudolph
The IORT spec says that reserved bits must be set to zero, thus clear all fields of the struct before starting to fill out non-reserved fields. Signed-off-by: Patrick Rudolph --- lib/acpi/acpi_table.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/acpi/acpi_table.c b/lib/acpi

[PATCH 2/5] acpi_table: Add asserts in IORT

2025-03-16 Thread Patrick Rudolph
Check that the provided offsets are really pointing to a node that have been previously written and are of the correct type. Signed-off-by: Patrick Rudolph --- lib/acpi/acpi_table.c | 17 + 1 file changed, 17 insertions(+) diff --git a/lib/acpi/acpi_table.c b/lib/acpi

[PATCH 1/5] acpi_table: Fix IORT RC node

2025-03-16 Thread Patrick Rudolph
ace back to an invalid IORT RC nodes. Add the missing ID mapping count and mapping offset. TEST: Fixes IRQ usage of PCI devices on qemu/sbsa-ref. Fixes: bf5d37662da5 "acpi: acpi_table: Add IORT support" Signed-off-by: Patrick Rudolph --- lib/acpi/acpi_table.c | 2 ++ 1 file changed

Re: [RESEND PATCH 1/3] pci_auto: Downgrade prefetch if necessary

2025-03-11 Thread Patrick Rudolph
Hi Tom, On Mon, Mar 10, 2025 at 3:30 PM Tom Rini wrote: > > On Mon, Mar 10, 2025 at 10:01:32AM +0100, Patrick Rudolph wrote: > > > Legacy PCI devices, like qemu's Bochs VGA device, are allowed to have > > prefetchable 32-bit BARs, while PCIe devices are not allowed to ha

[RESEND PATCH 1/3] pci_auto: Downgrade prefetch if necessary

2025-03-10 Thread Patrick Rudolph
he BAR and place it in the non-prefetch MMIO window. For prefetch BARs there's no downside on being placed in non prefetch MMIO areas, besides the possible slower performance when a driver tries to map it Write-Combine. TEST: Fixes pci_auto on QEMU sbsa-ref fails to autoconfigure BAR0. Signed-

[RESEND PATCH 3/3] emulation: qemu-sbsa: Enable PCI enumeration

2025-03-10 Thread Patrick Rudolph
-off-by: Patrick Rudolph --- board/emulation/qemu-sbsa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/emulation/qemu-sbsa/Kconfig b/board/emulation/qemu-sbsa/Kconfig index f4ad63e681c..728cecae6b3 100644 --- a/board/emulation/qemu-sbsa/Kconfig +++ b/board/emulation/qemu-sbsa

[RESEND PATCH 2/3] emulation: qemu-sbsa: Select SYS_PCI_64BIT

2025-03-10 Thread Patrick Rudolph
qemu's sbsa-ref is always using a 64bit CPU and the PCI prefetch MMIO window is located above 4GiB, thus always enable SYS_PCI_64BIT. Signed-off-by: Patrick Rudolph --- board/emulation/qemu-sbsa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/emulation/qemu-sbsa/Kconf

Re: [PATCH] efi_loader: Install the ACPI table from the bloblist

2025-03-06 Thread Patrick Rudolph
_high) { > > > + start = ALIGN_DOWN(gd->arch.table_start_high, > > > +EFI_PAGE_MASK); > > > + end = ALIGN(gd->arch.table_end_high, EFI_PAGE_MASK); > > > + ret = efi_add_memory_map(start, end - start, > > > + EFI_ACPI_RECLAIM_MEMORY); > > > + if (ret != EFI_SUCCESS) > > > + return ret; > > > + } > > > > > > - addr = gd_acpi_start(); > > > + addr = gd_acpi_start(); > > > + } > > > log_debug("EFI using ACPI tables at %lx\n", addr); > > > > > > /* And expose them to our EFI payload */ > > > > Regards, > Simon I can confirm that your patch fixes booting on qemu-system-aarch64 sbsa-ref as the ACPI tables are visible to the OS again. Signed-off-by: Patrick Rudolph Regards, Patrick

[PATCH 2/3] emulation: qemu-sbsa: Select SYS_PCI_64BIT

2025-02-26 Thread Patrick Rudolph
qemu's sbsa-ref is always using a 64bit CPU and the PCI prefetch MMIO window is located above 4GiB, thus always enable SYS_PCI_64BIT. Signed-off-by: Patrick Rudolph --- board/emulation/qemu-sbsa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/emulation/qemu-sbsa/Kconf

[PATCH 3/3] emulation: qemu-sbsa: Enable PCI enumeration

2025-02-26 Thread Patrick Rudolph
-off-by: Patrick Rudolph --- board/emulation/qemu-sbsa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/emulation/qemu-sbsa/Kconfig b/board/emulation/qemu-sbsa/Kconfig index f4ad63e681c..728cecae6b3 100644 --- a/board/emulation/qemu-sbsa/Kconfig +++ b/board/emulation/qemu-sbsa

[PATCH 1/3] pci_auto: Downgrade prefetch if necessary

2025-02-26 Thread Patrick Rudolph
he BAR and place it in the non-prefetch MMIO window. For prefetch BARs there's no downside on being placed in non prefetch MMIO areas, besides the possible slower performance when a driver tries to map it Write-Combine. TEST: Fixes pci_auto on QEMU sbsa-ref fails to autoconfigure BAR0. Signed-

Re: [PATCH v3 00/30] upl: Prerequite patches for updated spec

2025-02-16 Thread Patrick Rudolph
Hi Simon, On Thu, Jan 23, 2025 at 3:13 PM Tom Rini wrote: > > On Fri, 10 Jan 2025 16:59:59 -0700, Simon Glass wrote: > > > The current UPL spec[1] has been tidied up and improved over the last > > year, since U-Boot's original UPL support was written. > > > > This series includes some prerequisite

Re: [PATCH 1/1] acpi: don't fill FADT, MADT if CONFIG_QFW_ACPI=y

2025-01-16 Thread Patrick Rudolph
Hi Heinrich, here it is https://lists.denx.de/pipermail/u-boot/2024-November/571757.html I'm fine with either solution. Regards, Patrick On Thu, Jan 16, 2025 at 2:34 PM Heinrich Schuchardt wrote: > > On 20.12.24 07:30, Patrick Rudolph wrote: > > On Fri, Dec 20, 2024 at

Re: [PATCH 1/1] acpi: don't fill FADT, MADT if CONFIG_QFW_ACPI=y

2024-12-19 Thread Patrick Rudolph
, 0); > +#endif > > void acpi_create_dbg2(struct acpi_dbg2_header *dbg2, > int port_type, int port_subtype, > -- > 2.47.1 > Anything wrong with the patch series send Nov 14 2024 that addressed this issue as well? Reviewed-by: Patrick Rudolph

[PATCH 2/2] configs: Add QEMU riscv ACPI defconfig

2024-11-14 Thread Patrick Rudolph
Build test QEMU riscv with ACPI enabled. Signed-off-by: Patrick Rudolph --- board/emulation/qemu-riscv/MAINTAINERS | 1 + configs/qemu-riscv64_acpi_defconfig| 25 + 2 files changed, 26 insertions(+) create mode 100644 configs/qemu-riscv64_acpi_defconfig diff --git

[PATCH 1/2] acpi: acpi_table: Fix compilation on QFW enabled platforms

2024-11-14 Thread Patrick Rudolph
On ACPI enabled platforms where QFW passes in the pre-generated ACPI tables do not attempt to fill MADT and FADT. On all other platforms MADT and FADT must be filled by SoC or mainboard code. Fixes a compilation error on QEMU platforms that enable: - CONFIG_QFW_ACPI Signed-off-by: Patrick

Re: [PATCH v10 02/37] acpi: x86: Write FADT in common code

2024-11-07 Thread Patrick Rudolph
Hi Heinrich, On Thu, Nov 7, 2024 at 10:19 AM Heinrich Schuchardt wrote: > > On 10/23/24 15:19, Patrick Rudolph wrote: > > From: Maximilian Brune > > > > Write the FADT in common code since it's used on all architectures. > > Since the FADT is mandatory all So

[PATCH v2] acpi_table: Fix coverity defect in acpi_write_spcr

2024-10-30 Thread Patrick Rudolph
Fix "Integer handling issues (SIGN_EXTENSION)" in newly added code: Cast serial_info.reg_offset to u64 to prevent an integer overflow when shifted too many bits to the left. Currently this never happens as the shift is supposed to be less than 4. Signed-off-by: Patrick Rudolph ---

Re: [PATCH v1] acpi_table: Fix coverity defect in acpi_write_spcr

2024-10-30 Thread Patrick Rudolph
Hi Tom, On Tue, Oct 29, 2024 at 3:53 AM Tom Rini wrote: > > On Mon, Oct 28, 2024 at 05:27:14PM -0600, Tom Rini wrote: > > On Mon, 28 Oct 2024 09:08:35 +0100, Patrick Rudolph wrote: > > > > > Fix "Integer handling issues (SIGN_EXTENSION)" in newly added code:

[PATCH v1] acpi_table: Fix coverity defect in acpi_write_spcr

2024-10-28 Thread Patrick Rudolph
Fix "Integer handling issues (SIGN_EXTENSION)" in newly added code: Cast serial_info.reg_offset to u64 to prevent an integer overflow when shifted too many bits to the left. Currently this never happens as the shift is supposed to be less than 4. Signed-off-by: Patrick Rudolph ---

[PATCH v10 34/37] arm: mach-bcm283x: Enable ARMV8_MULTIENTRY

2024-10-23 Thread Patrick Rudolph
spi4b - APs on real hardware do not enter Linux, but continue spinning in their ACPI parking protocol spinloop. To be investigated. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Matthias Brugger Cc: Peter Robinson Cc: Tom Rini --- arch/arm/mach-bcm283x/Kconfig

[PATCH v10 26/37] arm: mach-bcm283x: Map the ARM local MMIO as well

2024-10-23 Thread Patrick Rudolph
d accessed the GIC in C code without crash. 1: https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Acked-by: Matthias Brugger Cc: Matthias Brugger Cc: Peter Robinson --- arch/arm/mach-bcm283x/init.c | 2 +- 1 file

[PATCH v10 07/37] arm: acpi: Add generic ACPI methods

2024-10-23 Thread Patrick Rudolph
Add generic ACPI code to generate - MADT GICC - MADT GICD - MADT GICR - MADT GIC ITS - PPTT processor - PPTT cache as commonly used on arm platforms. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Tom Rini Cc: Simon Glass --- Changelog v2: - Add full comments to exported

[PATCH v10 37/37] CI: Enable qemu_sbsa

2024-10-23 Thread Patrick Rudolph
Add QEMU's SBSA ref board to azure pipelines and gitlab CI to run tests on it. TEST: Run on Azure pipelines and confirmed that tests succeed. Signed-off-by: Patrick Rudolph Reviewed-by: Tom Rini --- Changelog v6: - Add gitlab CI support --- .azure-pipelines.yml | 8 .gitlab-c

[PATCH v10 35/37] bloblist: Fix use of uninitialized variable

2024-10-23 Thread Patrick Rudolph
Initialize addr to zero which allows to build on the CI which is more strict. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- common/bloblist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bloblist.c b/common/bloblist.c index 2008ab4d25..cf1a3b8b62

[PATCH v10 36/37] configs: Add RPI4 ACPI defconfig

2024-10-23 Thread Patrick Rudolph
Allows to build the RPi4 with ACPI enabled. TEST: - Boots on qemu-system-aarch64 -machine raspi4b - Boots on real hardware with arm_64bit=1 in config.txt Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Reviewed-by: Tom Rini Cc: Simon Glass Cc: Matthias Brugger Cc: Peter

[PATCH v10 28/37] arm: bcm283x: Generate ACPI tables

2024-10-23 Thread Patrick Rudolph
functions that needs to be implemented. When ACPI is not enabled the added code does nothing, keeping existing behaviour. TEST: Booted on RPi4 with only ACPI enabled, providing no FDT to the OS. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Matthias Brugger Cc: Peter

[PATCH v10 33/37] arm: mach-bcm283x: Add ARMV8_MULTIENTRY support

2024-10-23 Thread Patrick Rudolph
he APs are released from reset and will enter U-Boot after it has been relocated as well. By default ARMV8_MULTIENTRY is not selected, keeping existing behaviour. TEST: All APs enter U-Boot when run on qemu-system-aarch64 and on real hardware. Signed-off-by: Patrick Rudolph Reviewed-by: S

[PATCH v10 32/37] arm: Implement read_mpidr on armv7

2024-10-23 Thread Patrick Rudolph
Implement read_mpidr() on armv7 to make use of it in generic code that compiles on both armv7 and armv8. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- arch/arm/include/asm/system.h | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/include/asm/system.h b/arch

[PATCH v10 31/37] armv8: cpu: Enable ACPI parking protocol

2024-10-23 Thread Patrick Rudolph
mailbox with the OS to release the CPU. TEST: Boots all CPUs on qemu-system-aarch64 -machine raspi4b Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- arch/arm/cpu/armv8/start.S | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu

[PATCH v10 30/37] arm: cpu: Add ACPI parking protocol support

2024-10-23 Thread Patrick Rudolph
extended to other platforms, like ARMv7. TEST: Boots all CPUs on qemu-system-aarch64 -machine raspi4b Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Tom Rini --- Changelog v2: - Use shorter function names - Drop the use of atomics, they do not work on real ha

[PATCH v10 29/37] board: raspberrypi: Add ASL files from tianocore

2024-10-23 Thread Patrick Rudolph
9.0 without modifications, since it doesn't emulate PCIe yet. Signed-off-by: Simon Glass Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Matthias Brugger Cc: Peter Robinson --- Changelog v5: - Drop CPU device from DSDT - Add Extern to CPU devices in SSDT ---

[PATCH v10 27/37] arm: mach-bcm283x: Bring in some header files from tianocore

2024-10-23 Thread Patrick Rudolph
From: Simon Glass These header files presumably duplicate things already in the U-Boot devicetree. For now, bring them in to get the ASL code and ACPI table code to compile. Signed-off-by: Simon Glass Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Acked-by: Matthias Brugger Cc

[PATCH v10 25/37] board: emulation: Add QEMU sbsa support

2024-10-23 Thread Patrick Rudolph
dora 40 1: Server Base System Architecture (SBSA) 2: https://www.qemu.org/docs/master/system/arm/sbsa.html Signed-off-by: Patrick Rudolph Cc: Peter Robinson Cc: Simon Glass Cc: Tom Rini --- Changelog v3: - Add GIC and GIC-ITS to devicetree - Select GICv3 driver - Drop acpi_fill_madt and use dr

[PATCH v10 21/37] arm: lib: Add GICV2 driver

2024-10-23 Thread Patrick Rudolph
are used for SGIs - ID16-ID31 are used for PPIs TEST: Booted on QEMU raspb4 using GICV2 driver model generated MADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- Changelog v6: - Update header order Changelog v9: - Map SPI interrupts to ID32+ - Map PPI interrupts to ID16+ --- arch

[PATCH v10 24/37] common: Enable BLOBLIST_TABLES on arm

2024-10-23 Thread Patrick Rudolph
Allow to use BLOBLIST_TABLES on arm to store ACPI or other tables. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Tom Rini --- Changelog v9: - default to BLOBLIST_ALLOC on arm - Move default for BLOBLIST_SIZE_RELOC up Changelog v10: - Revert changes done in v9 and use revision v8

[PATCH v10 22/37] drivers: misc: irq-uclass: Update irq_get_by_index

2024-10-23 Thread Patrick Rudolph
upts" property doesn't contain a phandle as "interrupts-extended" does, so implement a new method to locate the interrupt-parent called irq_get_interrupt_parent(). TEST: Read the interrupts from the GIC node for ACPI MADT generation. Signed-off-by: Patrick Rudolph Reviewed-

[PATCH v10 23/37] drivers/arm: Implement acpi_fill_madt

2024-10-23 Thread Patrick Rudolph
mainboard code. TEST: Booted on QEMU sbsa-ref using GICV3 driver model generated MADT. Booted on QEMU raspb4 using GICV2 driver model generated MADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- Changelog v4: - Read everything from the DT - Export

[PATCH v10 18/37] drivers/cpu: Add generic armv8 cpu driver

2024-10-23 Thread Patrick Rudolph
reused on other CPU drivers that are compatible with armv8. TEST: Booted on QEMU sbsa and verify the driver binds to CPU nodes. Confirmed with FWTS that all ACPI processor devices are present. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Tom Rini Cc: Simon Glass

[PATCH v10 20/37] arm: gic-v3-its: Implement of_xlate

2024-10-23 Thread Patrick Rudolph
-ref that has a GICV3. Signed-off-by: Patrick Rudolph Reviewed-by: Moritz Fischer --- Changelog v9: - Require at least 3 interrupt-cells - Map SPI interrupts to ID32+ - Map PPI interrupts to ID16+ --- arch/arm/lib/gic-v3-its.c | 24 1 file changed, 24 insertions(+) diff

[PATCH v10 19/37] arm: gic-v3-its: Rename objects

2024-10-23 Thread Patrick Rudolph
The code accesses the gic-v3 node, but not the gic-v3-its node, thus rename the objects to clarify which node it operates on. The following commit will make use of the gic-v3-its node for real. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- arch/arm/lib/gic-v3-its.c | 10

[PATCH v10 17/37] drivers: ata: Rename ahci_mvebu

2024-10-23 Thread Patrick Rudolph
to use the new Kconfig name as well. TEST: Booted on QEMU sbsa using the generic-ahci node. Signed-off-by: Patrick Rudolph Reviewed-by: Stefan Roese Cc: Tom Rini Cc: Stefan Roese --- MAINTAINERS | 2 +- configs/clearfog_defconfig

[PATCH v10 16/37] drivers: usb: Add generic XHCI

2024-10-23 Thread Patrick Rudolph
Add support for the generic XHCI driver that contains no SoC specific code. It can be used on platforms that simply work out of the box, like on emulated platforms. TEST: Booted on QEMU sbsa machine using the generic xhci driver. Signed-off-by: Patrick Rudolph Reviewed-by: Marek Vasut Cc: Tom

[PATCH v10 15/37] acpi: Add processor device

2024-10-23 Thread Patrick Rudolph
Add a new method to write the processor device identified by _HID ACPI0007, that is preferred over the Processor OpCode since ACPI 6.0. Fixes booting arm using ACPI only since the Processor OpCode isn't found valid by the Linux kernel. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glas

[PATCH v10 14/37] acpi: Allocate and write ACPI tables

2024-10-23 Thread Patrick Rudolph
ables in memory. TEST: Booted QEMU SBSA (no QFW) using EFI and ACPI only. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Tom Rini --- Changelog v8: - Only use bloblist to store tables on arm --- lib/acpi/acpi_table.c

[PATCH v10 13/37] acpi_table: Support platforms with unusable RSDT

2024-10-23 Thread Patrick Rudolph
4GiB, like QEMU sbsa, the RSDT cannot be used. Allow both RSDT and XSDT to be null and only fill those tables that are present in acpi_add_table(). TEST: Fixes a crash on QEMU sbsa and allows to boot on QEMU sbsa. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Tom Rini

[PATCH v10 11/37] acpi: acpi_table: Add IORT support

2024-10-23 Thread Patrick Rudolph
The SoC can implement acpi_fill_iort to update the IORT table. Add a helper function to fill out the NAMED_COMPONENT node. TEST=Run FWTS V24.03.00 on RPi4 and round no problems. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- include/acpi/acpi_table.h | 213

[PATCH v10 09/37] acpi: acpi_table: Bump revisions

2024-10-23 Thread Patrick Rudolph
The FADT structure found in U-Boot represents FADT revision 6 and the GICC and GICD structures defined in U-Boot are based on ACPI revision 6.3. Bump the table revision to fix FWTS failures seen on aarch64. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Bin Meng

[PATCH v10 10/37] acpi: Add ACPITAB for PPTT and GTDT

2024-10-23 Thread Patrick Rudolph
Return the ACPI table revision in acpi_get_table_revision() for PPTT and GTDT. Match both to ACPI 6.2. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- include/acpi/acpi_table.h | 2 ++ lib/acpi/acpi_table.c | 4 2 files changed, 6 insertions(+) diff --git

[PATCH v10 12/37] acpi: Move function prototype

2024-10-23 Thread Patrick Rudolph
Allow other architectures to use acpi_create_mcfg_mmconfig as well by moving the function prototype to common code. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- arch/x86/include/asm/acpi_table.h | 2 -- include/acpi/acpi_table.h | 13 + 2

[PATCH v10 08/37] acpi: Add fill_madt to acpi_ops

2024-10-23 Thread Patrick Rudolph
Add a new method to acpi_ops to let drivers fill out ACPI MADT. The code is unused for now until drivers implement the new ops. TEST: Booted on QEMU sbsa using driver model generated MADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- Changelog v4: - Drop __weak

[PATCH v10 02/37] acpi: x86: Write FADT in common code

2024-10-23 Thread Patrick Rudolph
From: Maximilian Brune Write the FADT in common code since it's used on all architectures. Since the FADT is mandatory all SoCs or mainboards must implement the introduced function acpi_fill_fadt() and properly update the FADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc:

[PATCH v10 03/37] acpi: x86: Move MADT to common code

2024-10-23 Thread Patrick Rudolph
Write MADT in common code and let the SoC fill out the body by calling acpi_fill_madt() which must be implemented at SoC level. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Bin Meng --- Changelog v3: - Pass ACPI context to acpi_fill_madt --- arch/sandbox/lib

[PATCH v10 06/37] acpi: Add define for GTDT

2024-10-23 Thread Patrick Rudolph
Add the interrupt flag used in ACPI GTDT table as define. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- include/acpi/acpi_table.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index a1bdab7305

[PATCH v10 05/37] serial: serial_pl01x: Implement .getinfo() for PL01

2024-10-23 Thread Patrick Rudolph
From: Maximilian Brune When ACPI is enabled on arm it will use the getinfo function to fill the SPCR ACPI table. Signed-off-by: Maximilian Brune Reviewed-by: Simon Glass Cc: Simon Glass Cc: Tom Rini --- boot/bootflow.c | 8 ++-- drivers/serial/serial_pl01x.c | 24

[PATCH v10 04/37] acpi: Fix typo

2024-10-23 Thread Patrick Rudolph
Rename ACPI tables MADR to MADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- include/acpi/acpi_table.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index c356df72ba

[PATCH v10 01/37] acpi: x86: Move SPCR and DBG2 into common code

2024-10-23 Thread Patrick Rudolph
From: Maximilian Brune This moves the SPCR and DBG2 table generation into common code, so that they can be used by architectures other than x86. Signed-off-by: Maximilian Brune Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Bin Meng --- Changelog v2: - Do not

[PATCH v10 00/37] Implement ACPI on aarch64

2024-10-23 Thread Patrick Rudolph
une (3): acpi: x86: Move SPCR and DBG2 into common code acpi: x86: Write FADT in common code serial: serial_pl01x: Implement .getinfo() for PL01 Patrick Rudolph (32): acpi: x86: Move MADT to common code acpi: Fix typo acpi: Add define for GTDT arm: acpi: Add generic ACPI methods ac

Re: [PATCH v9 24/37] common: Enable BLOBLIST_TABLES on arm

2024-10-22 Thread Patrick Rudolph
Hi Simon, On Tue, Oct 22, 2024 at 2:16 PM Simon Glass wrote: > > Hi Peter, > > On Mon, 21 Oct 2024 at 19:57, Peter Robinson wrote: > > > > > > > > Allow to use BLOBLIST_TABLES on arm to store ACPI or other tables. > > > > > > > > >

Re: [PATCH v9 24/37] common: Enable BLOBLIST_TABLES on arm

2024-10-21 Thread Patrick Rudolph
Hi Simon, On Fri, Oct 18, 2024 at 1:18 AM Simon Glass wrote: > > Hi Patrick, > > On Wed, 16 Oct 2024 at 00:16, Patrick Rudolph > wrote: > > > > Allow to use BLOBLIST_TABLES on arm to store ACPI or other tables. > > > > Signed-off-by: Patrick Rudolph >

[PATCH v9 37/37] CI: Enable qemu_sbsa

2024-10-15 Thread Patrick Rudolph
Add QEMU's SBSA ref board to azure pipelines and gitlab CI to run tests on it. TEST: Run on Azure pipelines and confirmed that tests succeed. Signed-off-by: Patrick Rudolph Reviewed-by: Tom Rini --- Changelog v6: - Add gitlab CI support --- .azure-pipelines.yml | 8 .gitlab-c

[PATCH v9 36/37] configs: Add RPI4 ACPI defconfig

2024-10-15 Thread Patrick Rudolph
Allows to build the RPi4 with ACPI enabled. TEST: - Boots on qemu-system-aarch64 -machine raspi4b - Boots on real hardware with arm_64bit=1 in config.txt Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Reviewed-by: Tom Rini Cc: Simon Glass Cc: Matthias Brugger Cc: Peter

[PATCH v9 35/37] bloblist: Fix use of uninitialized variable

2024-10-15 Thread Patrick Rudolph
Initialize addr to zero which allows to build on the CI which is more strict. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- common/bloblist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bloblist.c b/common/bloblist.c index 2008ab4d25..cf1a3b8b62

[PATCH v9 34/37] arm: mach-bcm283x: Enable ARMV8_MULTIENTRY

2024-10-15 Thread Patrick Rudolph
spi4b - APs on real hardware do not enter Linux, but continue spinning in their ACPI parking protocol spinloop. To be investigated. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Matthias Brugger Cc: Peter Robinson Cc: Tom Rini --- arch/arm/mach-bcm283x/Kconfig

[PATCH v9 33/37] arm: mach-bcm283x: Add ARMV8_MULTIENTRY support

2024-10-15 Thread Patrick Rudolph
he APs are released from reset and will enter U-Boot after it has been relocated as well. By default ARMV8_MULTIENTRY is not selected, keeping existing behaviour. TEST: All APs enter U-Boot when run on qemu-system-aarch64 and on real hardware. Signed-off-by: Patrick Rudolph Reviewed-by: S

[PATCH v9 32/37] arm: Implement read_mpidr on armv7

2024-10-15 Thread Patrick Rudolph
Implement read_mpidr() on armv7 to make use of it in generic code that compiles on both armv7 and armv8. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- arch/arm/include/asm/system.h | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/include/asm/system.h b/arch

[PATCH v9 30/37] arm: cpu: Add ACPI parking protocol support

2024-10-15 Thread Patrick Rudolph
extended to other platforms, like ARMv7. TEST: Boots all CPUs on qemu-system-aarch64 -machine raspi4b Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Tom Rini --- Changelog v2: - Use shorter function names - Drop the use of atomics, they do not work on real ha

[PATCH v9 31/37] armv8: cpu: Enable ACPI parking protocol

2024-10-15 Thread Patrick Rudolph
mailbox with the OS to release the CPU. TEST: Boots all CPUs on qemu-system-aarch64 -machine raspi4b Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- arch/arm/cpu/armv8/start.S | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu

[PATCH v9 29/37] board: raspberrypi: Add ASL files from tianocore

2024-10-15 Thread Patrick Rudolph
9.0 without modifications, since it doesn't emulate PCIe yet. Signed-off-by: Simon Glass Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Matthias Brugger Cc: Peter Robinson --- Changelog v5: - Drop CPU device from DSDT - Add Extern to CPU devices in SSDT ---

[PATCH v9 28/37] arm: bcm283x: Generate ACPI tables

2024-10-15 Thread Patrick Rudolph
functions that needs to be implemented. When ACPI is not enabled the added code does nothing, keeping existing behaviour. TEST: Booted on RPi4 with only ACPI enabled, providing no FDT to the OS. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Matthias Brugger Cc: Peter

[PATCH v9 27/37] arm: mach-bcm283x: Bring in some header files from tianocore

2024-10-15 Thread Patrick Rudolph
From: Simon Glass These header files presumably duplicate things already in the U-Boot devicetree. For now, bring them in to get the ASL code and ACPI table code to compile. Signed-off-by: Simon Glass Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Acked-by: Matthias Brugger Cc

[PATCH v9 26/37] arm: mach-bcm283x: Map the ARM local MMIO as well

2024-10-15 Thread Patrick Rudolph
d accessed the GIC in C code without crash. 1: https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Acked-by: Matthias Brugger Cc: Matthias Brugger Cc: Peter Robinson --- arch/arm/mach-bcm283x/init.c | 2 +- 1 file

[PATCH v9 25/37] board: emulation: Add QEMU sbsa support

2024-10-15 Thread Patrick Rudolph
dora 40 1: Server Base System Architecture (SBSA) 2: https://www.qemu.org/docs/master/system/arm/sbsa.html Signed-off-by: Patrick Rudolph Cc: Peter Robinson Cc: Simon Glass Cc: Tom Rini --- Changelog v3: - Add GIC and GIC-ITS to devicetree - Select GICv3 driver - Drop acpi_fill_madt and use dr

[PATCH v9 24/37] common: Enable BLOBLIST_TABLES on arm

2024-10-15 Thread Patrick Rudolph
Allow to use BLOBLIST_TABLES on arm to store ACPI or other tables. Signed-off-by: Patrick Rudolph Cc: Tom Rini --- Changelog v9: - default to BLOBLIST_ALLOC on arm - Move default for BLOBLIST_SIZE_RELOC up --- common/Kconfig | 2 ++ lib/Kconfig| 15 +-- 2 files changed, 11

[PATCH v9 21/37] arm: lib: Add GICV2 driver

2024-10-15 Thread Patrick Rudolph
are used for SGIs - ID16-ID31 are used for PPIs TEST: Booted on QEMU raspb4 using GICV2 driver model generated MADT. Signed-off-by: Patrick Rudolph --- Changelog v6: - Update header order Changelog v9: - Map SPI interrupts to ID32+ - Map PPI interrupts to ID16+ --- arch/arm/Kconfig | 7

[PATCH v9 23/37] drivers/arm: Implement acpi_fill_madt

2024-10-15 Thread Patrick Rudolph
mainboard code. TEST: Booted on QEMU sbsa-ref using GICV3 driver model generated MADT. Booted on QEMU raspb4 using GICV2 driver model generated MADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- Changelog v4: - Read everything from the DT - Export

[PATCH v9 22/37] drivers: misc: irq-uclass: Update irq_get_by_index

2024-10-15 Thread Patrick Rudolph
upts" property doesn't contain a phandle as "interrupts-extended" does, so implement a new method to locate the interrupt-parent called irq_get_interrupt_parent(). TEST: Read the interrupts from the GIC node for ACPI MADT generation. Signed-off-by: Patrick Rudolph --- Changelo

[PATCH v9 20/37] arm: gic-v3-its: Implement of_xlate

2024-10-15 Thread Patrick Rudolph
-ref that has a GICV3. Signed-off-by: Patrick Rudolph --- Changelog v9: - Require at least 3 interrupt-cells - Map SPI interrupts to ID32+ - Map PPI interrupts to ID16+ --- arch/arm/lib/gic-v3-its.c | 24 1 file changed, 24 insertions(+) diff --git a/arch/arm/lib/gic-v3

[PATCH v9 17/37] drivers: ata: Rename ahci_mvebu

2024-10-15 Thread Patrick Rudolph
to use the new Kconfig name as well. TEST: Booted on QEMU sbsa using the generic-ahci node. Signed-off-by: Patrick Rudolph Reviewed-by: Stefan Roese Cc: Tom Rini Cc: Stefan Roese --- MAINTAINERS | 2 +- configs/clearfog_defconfig

[PATCH v9 19/37] arm: gic-v3-its: Rename objects

2024-10-15 Thread Patrick Rudolph
The code accesses the gic-v3 node, but not the gic-v3-its node, thus rename the objects to clarify which node it operates on. The following commit will make use of the gic-v3-its node for real. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass --- arch/arm/lib/gic-v3-its.c | 10

[PATCH v9 18/37] drivers/cpu: Add generic armv8 cpu driver

2024-10-15 Thread Patrick Rudolph
reused on other CPU drivers that are compatible with armv8. TEST: Booted on QEMU sbsa and verify the driver binds to CPU nodes. Confirmed with FWTS that all ACPI processor devices are present. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Tom Rini Cc: Simon Glass

[PATCH v9 16/37] drivers: usb: Add generic XHCI

2024-10-15 Thread Patrick Rudolph
Add support for the generic XHCI driver that contains no SoC specific code. It can be used on platforms that simply work out of the box, like on emulated platforms. TEST: Booted on QEMU sbsa machine using the generic xhci driver. Signed-off-by: Patrick Rudolph Reviewed-by: Marek Vasut Cc: Tom

[PATCH v9 15/37] acpi: Add processor device

2024-10-15 Thread Patrick Rudolph
Add a new method to write the processor device identified by _HID ACPI0007, that is preferred over the Processor OpCode since ACPI 6.0. Fixes booting arm using ACPI only since the Processor OpCode isn't found valid by the Linux kernel. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glas

[PATCH v9 14/37] acpi: Allocate and write ACPI tables

2024-10-15 Thread Patrick Rudolph
ables in memory. TEST: Booted QEMU SBSA (no QFW) using EFI and ACPI only. Signed-off-by: Patrick Rudolph Cc: Simon Glass Cc: Tom Rini --- Changelog v8: - Only use bloblist to store tables on arm --- lib/acpi/acpi_table.c| 66 +++- test/py/

[PATCH v9 13/37] acpi_table: Support platforms with unusable RSDT

2024-10-15 Thread Patrick Rudolph
4GiB, like QEMU sbsa, the RSDT cannot be used. Allow both RSDT and XSDT to be null and only fill those tables that are present in acpi_add_table(). TEST: Fixes a crash on QEMU sbsa and allows to boot on QEMU sbsa. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Tom Rini

[PATCH v9 12/37] acpi: Move function prototype

2024-10-15 Thread Patrick Rudolph
Allow other architectures to use acpi_create_mcfg_mmconfig as well by moving the function prototype to common code. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- arch/x86/include/asm/acpi_table.h | 2 -- include/acpi/acpi_table.h | 13 + 2

[PATCH v9 11/37] acpi: acpi_table: Add IORT support

2024-10-15 Thread Patrick Rudolph
The SoC can implement acpi_fill_iort to update the IORT table. Add a helper function to fill out the NAMED_COMPONENT node. TEST=Run FWTS V24.03.00 on RPi4 and round no problems. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- include/acpi/acpi_table.h | 213

[PATCH v9 10/37] acpi: Add ACPITAB for PPTT and GTDT

2024-10-15 Thread Patrick Rudolph
Return the ACPI table revision in acpi_get_table_revision() for PPTT and GTDT. Match both to ACPI 6.2. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- include/acpi/acpi_table.h | 2 ++ lib/acpi/acpi_table.c | 4 2 files changed, 6 insertions(+) diff --git

[PATCH v9 09/37] acpi: acpi_table: Bump revisions

2024-10-15 Thread Patrick Rudolph
The FADT structure found in U-Boot represents FADT revision 6 and the GICC and GICD structures defined in U-Boot are based on ACPI revision 6.3. Bump the table revision to fix FWTS failures seen on aarch64. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Bin Meng

[PATCH v9 08/37] acpi: Add fill_madt to acpi_ops

2024-10-15 Thread Patrick Rudolph
Add a new method to acpi_ops to let drivers fill out ACPI MADT. The code is unused for now until drivers implement the new ops. TEST: Booted on QEMU sbsa using driver model generated MADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- Changelog v4: - Drop __weak

[PATCH v9 07/37] arm: acpi: Add generic ACPI methods

2024-10-15 Thread Patrick Rudolph
Add generic ACPI code to generate - MADT GICC - MADT GICD - MADT GICR - MADT GIC ITS - PPTT processor - PPTT cache as commonly used on arm platforms. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Tom Rini Cc: Simon Glass --- Changelog v2: - Add full comments to exported

[PATCH v9 06/37] acpi: Add define for GTDT

2024-10-15 Thread Patrick Rudolph
Add the interrupt flag used in ACPI GTDT table as define. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- include/acpi/acpi_table.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index a1bdab7305

[PATCH v9 05/37] serial: serial_pl01x: Implement .getinfo() for PL01

2024-10-15 Thread Patrick Rudolph
From: Maximilian Brune When ACPI is enabled on arm it will use the getinfo function to fill the SPCR ACPI table. Signed-off-by: Maximilian Brune Reviewed-by: Simon Glass Cc: Simon Glass Cc: Tom Rini --- boot/bootflow.c | 8 ++-- drivers/serial/serial_pl01x.c | 24

[PATCH v9 04/37] acpi: Fix typo

2024-10-15 Thread Patrick Rudolph
Rename ACPI tables MADR to MADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass --- include/acpi/acpi_table.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index c356df72ba

  1   2   3   4   5   >