diff options
Diffstat (limited to 'arch/arm/cpu/armv8/xen/print.c')
-rw-r--r-- | arch/arm/cpu/armv8/xen/print.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/xen/print.c b/arch/arm/cpu/armv8/xen/print.c new file mode 100644 index 0000000000..5194d3661a --- /dev/null +++ b/arch/arm/cpu/armv8/xen/print.c @@ -0,0 +1,29 @@ +/* + * Copyright 2018 NXP + * + * Peng Fan <peng.fan@nxp.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <hypercall.h> +#include <linux/types.h> +#include <linux/string.h> +#include <linux/ctype.h> +#include <xen.h> + +/* + * To non privileged domain, need CONFIG_VERBOSE_DEBUG in XEN to + * get output. + */ +void xenprintf(const char *buf) +{ + (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf); + return; +} + +void xenprintc(const char c) +{ + (void)HYPERVISOR_console_io(CONSOLEIO_write, 1, &c); + return; +} |