Files
xen/xen/arch/arm/early_printk.c
T
Stefano Stabellini d25aeb176e add SPDX to arch/arm/*.c
Add SPDX license information to all the *.c files under arch/arm.

The SPDX tags added by this patch were chosen based on the existing
copyright headers. When the copyright header was missing we used the
default license which is GPLv2 for Xen (as per the COPYING file).

One exception is domain_page.c which is a split from mm.c so the license
is GPLv2+.

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Acked-by: Julien Grall <jgrall@amazon.com>
2022-12-09 14:55:33 -08:00

33 lines
669 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* printk() for use before the final page tables are setup.
*
* Copyright (C) 2012 Citrix Systems, Inc.
*/
#include <xen/init.h>
#include <xen/lib.h>
#include <xen/stdarg.h>
#include <xen/string.h>
#include <xen/early_printk.h>
void early_putch(char c);
void early_flush(void);
void early_puts(const char *s, size_t nr)
{
while ( nr-- > 0 )
{
if (*s == '\n')
early_putch('\r');
early_putch(*s);
s++;
}
/*
* Wait the UART has finished to transfer all characters before
* to continue. This will avoid lost characters if Xen abort.
*/
early_flush();
}