blob: c0c571bce9b2bbc420240ca94ede755876c3234f [file] [log] [blame]
Andre Przywara7400d342023-02-07 15:21:05 +00001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2022 Ventana Micro Systems Inc.
4 */
5
6#include <asm/asm.h>
7#include <linux/linkage.h>
8
9.pushsection .text.smh_trap, "ax"
10ENTRY(smh_trap)
11 .align 2
12 .option push
13 .option norvc /* semihosting sequence must be 32-bit wide */
14
15 slli zero, zero, 0x1f /* Entry NOP to identify semihosting */
16 ebreak
17 srai zero, zero, 7 /* NOP encoding of semihosting call number */
18 .option pop
19
20 ret
21ENDPROC(smh_trap)
22.popsection