diff options
author | Julien Grall <julien.grall@linaro.org> | 2013-08-01 17:09:29 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-08-08 12:55:28 +0100 |
commit | acc86a712eb1d6ac4cbcb0aad595ab6b98aab71e (patch) | |
tree | d3702df27e392784696ceff263469be96a2ed663 /xen/arch/arm/domain.c | |
parent | 7360db4276ffed96b54bbddb7aff4127fe69f051 (diff) | |
download | xen-acc86a712eb1d6ac4cbcb0aad595ab6b98aab71e.tar.gz xen-acc86a712eb1d6ac4cbcb0aad595ab6b98aab71e.tar.bz2 xen-acc86a712eb1d6ac4cbcb0aad595ab6b98aab71e.zip |
xen/arm: Implement a virtual UART
This code is based on the previous vuart0 implementation. Unlike the latter,
it's intend to replace UART stolen by XEN to DOM0 via dtuart=... on its
command line.
It's useful when the kernel is compiled with early printk enabled or for a
single platform. Most of the time, the hardcoded code to handle the UART
will need 2 registers: status and data, the others registers can be
implemented as RAZ/WI.
This commit will also drop support of early printk (based on vexpress pl011)
in the guest.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/arch/arm/domain.c')
-rw-r--r-- | xen/arch/arm/domain.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 4e9cece380..cb0424d490 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -32,7 +32,7 @@ #include <asm/gic.h> #include "vtimer.h" -#include "vpl011.h" +#include "vuart.h" DEFINE_PER_CPU(struct vcpu *, curr_vcpu); @@ -525,8 +525,12 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags) if ( (rc = vcpu_domain_init(d)) != 0 ) goto fail; - /* Domain 0 gets a real UART not an emulated one */ - if ( d->domain_id && (rc = domain_uart0_init(d)) != 0 ) + /* + * Virtual UART is only used by linux early printk and decompress code. + * Only use it for dom0 because the linux kernel may not support + * multi-platform. + */ + if ( (d->domain_id == 0) && (rc = domain_vuart_init(d)) ) goto fail; return 0; @@ -542,7 +546,7 @@ void arch_domain_destroy(struct domain *d) { p2m_teardown(d); domain_vgic_free(d); - domain_uart0_free(d); + domain_vuart_free(d); free_xenheap_page(d->shared_info); } |