41f7b58b63
Documentation for using the GAS in ACPI tables to report debug UART addresses at https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table states the following: - The Register Bit Width field contains the register stride and must be a power of 2 that is at least as large as the access size. On 32-bit platforms this value cannot exceed 32. On 64-bit platforms this value cannot exceed 64. - The Access Size field is used to determine whether byte, WORD, DWORD, or QWORD accesses are to be used. QWORD accesses are only valid on 64-bit architectures. Documentation for the ARM PL011 at https://developer.arm.com/documentation/ddi0183/latest/ states that the registers are: - spaced 4 bytes apart (see Table 3-2), so register stride must be 32. - 16 bits in size in some cases (see individual registers), so access size must be at least 2. Linux doesn't seem to care about this error in the table, but it does affect at least the NOVA microhypervisor. In theory we therefore have a choice between reporting the access size as 2 (16 bit accesses) or 3 (32-bit accesses). In practice, Linux does not correctly handle the case where the table reports the access size as 2: as of kernel commit 750b95887e5678, the code in acpi_parse_spcr() tries to tell the serial driver to use 16 bit accesses by passing "mmio16" in the option string, but the PL011 driver code in pl011_console_match() only recognizes "mmio" or "mmio32". The result is that unless the user has enabled 'earlycon' there is no console output from the guest kernel. We therefore choose to report the access size as 32 bits; this works for NOVA and also for Linux. It is also what the UEFI firmware on a Raspberry Pi 4 reports, so we're in line with existing real-world practice. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1938 Signed-off-by: Udo Steinberg <udo@hypervisor.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: minor commit message tweaks; use 32 bit accesses] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
||
---|---|---|
.. | ||
allwinner-a10.c | ||
allwinner-h3.c | ||
allwinner-r40.c | ||
armsse.c | ||
armv7m.c | ||
aspeed_ast10x0.c | ||
aspeed_ast2400.c | ||
aspeed_ast2600.c | ||
aspeed_eeprom.c | ||
aspeed_eeprom.h | ||
aspeed_soc_common.c | ||
aspeed.c | ||
bananapi_m2u.c | ||
bcm2835_peripherals.c | ||
bcm2836.c | ||
boot.c | ||
collie.c | ||
cubieboard.c | ||
digic_boards.c | ||
digic.c | ||
exynos4_boards.c | ||
exynos4210.c | ||
fby35.c | ||
fsl-imx6.c | ||
fsl-imx6ul.c | ||
fsl-imx7.c | ||
fsl-imx25.c | ||
fsl-imx31.c | ||
gumstix.c | ||
highbank.c | ||
imx25_pdk.c | ||
integratorcp.c | ||
Kconfig | ||
kzm.c | ||
mainstone.c | ||
mcimx6ul-evk.c | ||
mcimx7d-sabre.c | ||
meson.build | ||
microbit.c | ||
mps2-tz.c | ||
mps2.c | ||
msf2-soc.c | ||
msf2-som.c | ||
musca.c | ||
musicpal.c | ||
netduino2.c | ||
netduinoplus2.c | ||
npcm7xx_boards.c | ||
npcm7xx.c | ||
nrf51_soc.c | ||
nseries.c | ||
olimex-stm32-h405.c | ||
omap1.c | ||
omap2.c | ||
omap_sx1.c | ||
orangepi.c | ||
palm.c | ||
pxa2xx_gpio.c | ||
pxa2xx_pic.c | ||
pxa2xx.c | ||
raspi.c | ||
realview.c | ||
sabrelite.c | ||
sbsa-ref.c | ||
smmu-common.c | ||
smmu-internal.h | ||
smmuv3-internal.h | ||
smmuv3.c | ||
spitz.c | ||
stellaris.c | ||
stm32f100_soc.c | ||
stm32f205_soc.c | ||
stm32f405_soc.c | ||
stm32vldiscovery.c | ||
strongarm.c | ||
strongarm.h | ||
tosa.c | ||
trace-events | ||
trace.h | ||
versatilepb.c | ||
vexpress.c | ||
virt-acpi-build.c | ||
virt.c | ||
xen_arm.c | ||
xilinx_zynq.c | ||
xlnx-versal-virt.c | ||
xlnx-versal.c | ||
xlnx-zcu102.c | ||
xlnx-zynqmp.c | ||
z2.c |