[PATCH v5 0/3] hw/acpi: correct field sequence in SPCR table

Heinrich Schuchardt posted 3 patches 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260705063147.199732-1-heinrich.schuchardt@canonical.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>
hw/acpi/aml-build.c                   |   4 ++--
tests/data/acpi/loongarch64/virt/SPCR | Bin 80 -> 80 bytes
tests/data/acpi/riscv64/virt/SPCR     | Bin 90 -> 90 bytes
3 files changed, 2 insertions(+), 2 deletions(-)
[PATCH v5 0/3] hw/acpi: correct field sequence in SPCR table
Posted by Heinrich Schuchardt 3 weeks ago
On LoongArch and RISC-V invalid SPCR tables are created:

    Terminal Type : 00
    Language : 03

The correct values are:

    Terminal Type : 03
    Language : 00

This is due to commit 7dd0b070fa09 ("hw/arm/virt-acpi-build.c: Migrate
SPCR creation to common location") that swapped the fields.

See the specification of the table in
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table

This page shows version 1.10. But the sequence of the fields was not changed
since version 1.0.

Our LoongArch and ARM code uses version 1.07 of the specification.
Our RISC-V code uses version 1.10 of the specification.

v5:
	Include 
v4:
	Reproduce the test data changes using rebuild-expected-aml.sh
	creating the same diff as v3 but in two separate patches.
v3:
	Add test data changes	
v2:
	Update commit message

Heinrich Schuchardt (3):
  tests: allow differences in SPCR
  hw/acpi: correct field sequence in SPCR table
  tests: update SPCR loongarch64 and riscv64 test data

 hw/acpi/aml-build.c                   |   4 ++--
 tests/data/acpi/loongarch64/virt/SPCR | Bin 80 -> 80 bytes
 tests/data/acpi/riscv64/virt/SPCR     | Bin 90 -> 90 bytes
 3 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.53.0
Re: [PATCH v5 0/3] hw/acpi: correct field sequence in SPCR table
Posted by Alistair Francis 2 weeks, 3 days ago
On Sun, Jul 5, 2026 at 4:31 PM Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> On LoongArch and RISC-V invalid SPCR tables are created:
>
>     Terminal Type : 00
>     Language : 03
>
> The correct values are:
>
>     Terminal Type : 03
>     Language : 00
>
> This is due to commit 7dd0b070fa09 ("hw/arm/virt-acpi-build.c: Migrate
> SPCR creation to common location") that swapped the fields.
>
> See the specification of the table in
> https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table
>
> This page shows version 1.10. But the sequence of the fields was not changed
> since version 1.0.
>
> Our LoongArch and ARM code uses version 1.07 of the specification.
> Our RISC-V code uses version 1.10 of the specification.
>
> v5:
>         Include
> v4:
>         Reproduce the test data changes using rebuild-expected-aml.sh
>         creating the same diff as v3 but in two separate patches.
> v3:
>         Add test data changes
> v2:
>         Update commit message
>
> Heinrich Schuchardt (3):
>   tests: allow differences in SPCR
>   hw/acpi: correct field sequence in SPCR table
>   tests: update SPCR loongarch64 and riscv64 test data

Thanks!

Applied to riscv-to-apply.next

Alistair

>
>  hw/acpi/aml-build.c                   |   4 ++--
>  tests/data/acpi/loongarch64/virt/SPCR | Bin 80 -> 80 bytes
>  tests/data/acpi/riscv64/virt/SPCR     | Bin 90 -> 90 bytes
>  3 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.53.0
>