On the ARM virt machine, there is currently no way to programmatically discover the frequency of the UART reference clock solely through the use of UEFI/ACPI (without the DTB). The SPCR table can include this information as of revision 3.
Bump the revision to 3 and add the clock frequency of 24 MHz to the table. Signed-off-by: Vadim Chichikalyuk <chichikal...@gmail.com> --- hw/arm/virt-acpi-build.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index b01fc4f8ef..029cbb37f7 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -559,12 +559,13 @@ spcr_setup(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) .pci_function = 0, .pci_flags = 0, .pci_segment = 0, + .uart_clk_freq = 24000000, /* 24MHz */ }; /* - * Passing NULL as the SPCR Table for Revision 2 doesn't support + * Passing NULL as the SPCR Table for Revision 3 doesn't support * NameSpaceString. */ - build_spcr(table_data, linker, &serial, 2, vms->oem_id, vms->oem_table_id, + build_spcr(table_data, linker, &serial, 3, vms->oem_id, vms->oem_table_id, NULL); } -- 2.39.5 (Apple Git-154)