Debian Codegraph @

arch/arm64/include/asm/semihost.h

raw
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2012 ARM Ltd.
4 * Author: Marc Zyngier <[email protected]>
5 *
6 * Adapted for ARM and earlycon:
7 * Copyright (C) 2014 Linaro Ltd.
8 * Author: Rob Herring <[email protected]>
9 */
10
11 #ifndef _ARM64_SEMIHOST_H_
12 #define _ARM64_SEMIHOST_H_
13
14 struct uart_port;
15
16 static inline void smh_putc(struct uart_port *port, unsigned char c)
17 {
18 asm volatile("mov x1, %0\n"
19 "mov x0, #3\n"
20 "hlt 0xf000\n"
21 : : "r" (&c) : "x0", "x1", "memory");
22 }
23
24 #endif /* _ARM64_SEMIHOST_H_ */