Andre Przywara | c34de68 | 2023-02-07 15:21:05 +0000 | [diff] [blame] | 1 | /* 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" |
| 10 | ENTRY(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 |
| 21 | ENDPROC(smh_trap) |
| 22 | .popsection |