File Index
Files and directories
Sign in
FILE

semihost.h

File preview with syntax highlighting.

linux-6.19.14/arch/arm64/include/asm/semihost.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Copyright (C) 2012 ARM Ltd.
 4 * Author: Marc Zyngier <marc.zyngier@arm.com>
 5 *
 6 * Adapted for ARM and earlycon:
 7 * Copyright (C) 2014 Linaro Ltd.
 8 * Author: Rob Herring <robh@kernel.org>
 9 */
10
11#ifndef _ARM64_SEMIHOST_H_
12#define _ARM64_SEMIHOST_H_
13
14struct uart_port;
15
16static 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_ */
~/ Read-only file preview.