Public bug reported:

On resolute I am running

qemu-system-riscv64 \
  -cpu rva23s64 \
  -machine virt,acpi=on -m 4G -smp cpus=2 \
  -nographic \
  -drive 
if=pflash,format=raw,unit=0,file=/usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd,readonly=on
 \
  -drive if=pflash,format=raw,unit=1,file=RISCV_VIRT_VARS.fd,readonly=off \
  -netdev user,id=net0 \
  -device virtio-net-device,netdev=net0 \
  -device virtio-rng-pci \
  -drive file=resolute-preinstalled-server-riscv64.img,format=raw,if=virtio

In the VM I run

snap install fwts
fwts

Generated file results.log shows an error

spcr: SPCR Serial Port Console Redirection Table test.
--------------------------------------------------------------------------------
Test 1 of 3: SPCR Serial Port Console Redirection Table test.
Serial Interface: 16550-compatible with parameters defined in Generic Address 
Structure
Baud Rate:        115200
Terminal Type:    VT100
FAILED [MEDIUM] SPCRReservedNonZero: Test 1, SPCR Language field must be zero,
got 0x03 instead


In the QEMU code hw/riscv/virt-acpi-build.c, function spcr_setup() has 

        .terminal_type = 3,        /* ANSI */
        .language = 0,             /* Language */

The terminal type is specified in
https://docs.riscv.org/reference/platform-software/brs/_attachments/riscv-brs-spec.pdf

Could it be that the structures in FWTS an QEMU are not aligned?
The SPCR table is defined in 
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table.

** Affects: fwts (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: qemu (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: fwts (Ubuntu Resolute)
     Importance: Undecided
         Status: New

** Affects: qemu (Ubuntu Resolute)
     Importance: Undecided
         Status: New

** Also affects: fwts (Ubuntu)
   Importance: Undecided
       Status: New

** No longer affects: edk2 (Ubuntu)

** Also affects: qemu (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: qemu (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Also affects: fwts (Ubuntu Resolute)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2146419

Title:
  QEMU/FWTS: SPCR Language field must be zero, got 0x03 instead

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/fwts/+bug/2146419/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to