Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / arm64 / include / asm / semihost.h
blob87e353dab86870bdaddc2c3cce42e25b7fdd8f36
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2012 ARM Ltd.
4 * Author: Marc Zyngier <marc.zyngier@arm.com>
6 * Adapted for ARM and earlycon:
7 * Copyright (C) 2014 Linaro Ltd.
8 * Author: Rob Herring <robh@kernel.org>
9 */
11 #ifndef _ARM64_SEMIHOST_H_
12 #define _ARM64_SEMIHOST_H_
14 struct uart_port;
16 static inline void smh_putc(struct uart_port *port, unsigned char c)
18 asm volatile("mov x1, %0\n"
19 "mov x0, #3\n"
20 "hlt 0xf000\n"
21 : : "r" (&c) : "x0", "x1", "memory");
24 #endif /* _ARM64_SEMIHOST_H_ */