[PATCH v2 0/3] hw/riscv/virt: Fix the UART register width in SPCR

Rick Richard posted 3 patches 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261005104008.214588-1-rick@sloservers.com
Maintainers: Sunil V L <sunilvl@ventanamicro.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu@processmission.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>
hw/riscv/virt-acpi-build.c        |   2 +-
tests/data/acpi/riscv64/virt/SPCR | Bin 90 -> 90 bytes
2 files changed, 1 insertion(+), 1 deletion(-)
[PATCH v2 0/3] hw/riscv/virt: Fix the UART register width in SPCR
Posted by Rick Richard 1 month, 2 weeks ago
The riscv virt board's SPCR table says its 16550 UART has a 32-bit
register stride, but the registers are actually byte spaced.  Linux
doesn't use this field to work out the register spacing, but FreeBSD's
EFI loader does, and the FreeBSD kernel then crashes on the console
UART when booted through EDK2 with ACPI enabled.

This series fixes the width, plus the usual bios-tables-test patches to
update the golden reference so 'make check' keeps passing.

v2:
- Keep the relative file path in the patch 3 iasl diff (Daniel)
- Add Reviewed-by tags

Thanks,
Rick

Rick Richard (3):
  tests/qtest/bios-tables-test: Allow changes to riscv64 virt SPCR
  hw/riscv/virt-acpi-build: Fix the UART register width in SPCR
  tests/qtest/bios-tables-test: Update riscv64 virt SPCR golden
    reference

 hw/riscv/virt-acpi-build.c        |   2 +-
 tests/data/acpi/riscv64/virt/SPCR | Bin 90 -> 90 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)

-- 
2.43.0
Re: [PATCH v2 0/3] hw/riscv/virt: Fix the UART register width in SPCR
Posted by Sunil V L 1 month, 2 weeks ago
On Mon, Oct 5, 2026 at 4:11 PM Rick Richard <rick@sloservers.com> wrote:
>
> The riscv virt board's SPCR table says its 16550 UART has a 32-bit
> register stride, but the registers are actually byte spaced.  Linux
> doesn't use this field to work out the register spacing, but FreeBSD's
> EFI loader does, and the FreeBSD kernel then crashes on the console
> UART when booted through EDK2 with ACPI enabled.
>
> This series fixes the width, plus the usual bios-tables-test patches to
> update the golden reference so 'make check' keeps passing.
>
> v2:
> - Keep the relative file path in the patch 3 iasl diff (Daniel)
> - Add Reviewed-by tags
>
> Thanks,
> Rick
>
> Rick Richard (3):
>   tests/qtest/bios-tables-test: Allow changes to riscv64 virt SPCR
>   hw/riscv/virt-acpi-build: Fix the UART register width in SPCR
>   tests/qtest/bios-tables-test: Update riscv64 virt SPCR golden
>     reference
>
>  hw/riscv/virt-acpi-build.c        |   2 +-
>  tests/data/acpi/riscv64/virt/SPCR | Bin 90 -> 90 bytes
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> --
> 2.43.0
>

Thanks for the fix!. Looks good to me.

For the series,
Reviewed-by: Sunil V L <sunilvl@oss.qualcomm.com>
Re: [PATCH v2 0/3] hw/riscv/virt: Fix the UART register width in SPCR
Posted by Alistair 1 month, 2 weeks ago
On Mon, 2026-10-05 at 03:40 -0700, Rick Richard wrote:
> The riscv virt board's SPCR table says its 16550 UART has a 32-bit
> register stride, but the registers are actually byte spaced.  Linux
> doesn't use this field to work out the register spacing, but
> FreeBSD's
> EFI loader does, and the FreeBSD kernel then crashes on the console
> UART when booted through EDK2 with ACPI enabled.
> 
> This series fixes the width, plus the usual bios-tables-test patches
> to
> update the golden reference so 'make check' keeps passing.
> 
> v2:
> - Keep the relative file path in the patch 3 iasl diff (Daniel)
> - Add Reviewed-by tags
> 
> Thanks,
> Rick
> 
> Rick Richard (3):
>   tests/qtest/bios-tables-test: Allow changes to riscv64 virt SPCR
>   hw/riscv/virt-acpi-build: Fix the UART register width in SPCR
>   tests/qtest/bios-tables-test: Update riscv64 virt SPCR golden
>     reference

Thanks!

Applied to riscv-to-apply.next

Alistair

> 
>  hw/riscv/virt-acpi-build.c        |   2 +-
>  tests/data/acpi/riscv64/virt/SPCR | Bin 90 -> 90 bytes
>  2 files changed, 1 insertion(+), 1 deletion(-)