xen/arm: avoid lost characters with early_printk
authorJulien Grall <julien.grall@linaro.org>
Thu, 23 May 2013 14:50:11 +0000 (15:50 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 30 May 2013 08:14:48 +0000 (09:14 +0100)
commitcafdceb66e154f1ac204be935f9030959827bd1f
tree99e3b01483853eb6fda2461ca72cdaf1093fd13d
parent121dac93afd2f600485618d9b493892e2fca8fa8
xen/arm: avoid lost characters with early_printk

Introduce the function early_flush to wait until the UART has finished to
transfer the character.
When early printk is enabled, it's possible to loose the last characters if:
    - the UART is initialized by the UART driver
    - Xen hang

This is result to a truncated message. To be sure that the message is fully
transfered by early_printk, add a call to early_flush. This will avoid lost
characters.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/arm32/debug.S
xen/arch/arm/arm64/debug.S
xen/arch/arm/early_printk.c