xen/arm: if direct-map domain use native UART address and IRQ number for vPL011
authorStefano Stabellini <sstabellini@kernel.org>
Mon, 14 Feb 2022 03:19:55 +0000 (03:19 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 17 Feb 2022 19:43:02 +0000 (19:43 +0000)
commit3580c8b2dfc35d70b436430cbb14f72c64c2855a
treefb43924675f2a2bb07569dff9c998a4ea60306ab
parent4809f9ec7d71bdf6fb9e952ac5730f5592c30ec7
xen/arm: if direct-map domain use native UART address and IRQ number for vPL011

We always use a fix address to map the vPL011 to domains. The address
could be a problem for direct-map domains.

So, for domains that are directly mapped, reuse the address of the
physical UART on the platform to avoid potential clashes.

Do the same for the virtual IRQ number: instead of always using
GUEST_VPL011_SPI, try to reuse the physical SPI number if possible.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain_build.c
xen/arch/arm/include/asm/vpl011.h
xen/arch/arm/vpl011.c