summaryrefslogtreecommitdiff
path: root/arch/arm64/lib/semihosting.S
blob: 6e3fc316a578cfccaf32e1f264892ab61f292738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * semihosting.S - the trap instruction itself. qemu answers this when
 * it is started with -semihosting, and nothing happens without it, so
 * every caller has to cope with the no-debugger case.
 *
 * Copyright (C) 2026 Bradley Morgan <brads@mainlining.org>
 */

#include <asm/linkage.h>

.pushsection .text.smh_trap, "ax"
/* long smh_trap(unsigned int sysnum, void *addr); */
ENTRY(smh_trap)
	hlt	#0xf000
	ret
ENDPROC(smh_trap)
.popsection