From acd53a6eeaf8a6a07149af22724152982d7efce7 Mon Sep 17 00:00:00 2001 From: rin Date: Thu, 14 Sep 2023 03:25:31 +0000 Subject: [PATCH] riscv: ptrace: Add PTRACE_ILLEGAL_ASM for ATF All related tests successfully pass. --- sys/arch/riscv/include/ptrace.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arch/riscv/include/ptrace.h b/sys/arch/riscv/include/ptrace.h index 4c49e77ccaf5..3041923bb77e 100644 --- a/sys/arch/riscv/include/ptrace.h +++ b/sys/arch/riscv/include/ptrace.h @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.4 2023/08/24 05:40:08 rin Exp $ */ +/* $NetBSD: ptrace.h,v 1.5 2023/09/14 03:25:31 rin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -54,6 +54,8 @@ #define PTRACE_REG_SP(r) (r)->r_reg[1] #define PTRACE_REG_INTRV(r) (r)->r_reg[9] +#define PTRACE_ILLEGAL_ASM __asm __volatile("c.unimp" ::: "memory") + #define PTRACE_BREAKPOINT ((const uint8_t[]) { 0x02, 0x90 }) #define PTRACE_BREAKPOINT_ASM __asm __volatile("c.ebreak" ::: "memory") #define PTRACE_BREAKPOINT_SIZE 2