git: bab7781e78fc - main - dtrace: deduplicate arm64 breakpoint definition
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Jun 2023 17:05:17 UTC
The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=bab7781e78fccecb7c969a63e2d5668ee1c09246 commit bab7781e78fccecb7c969a63e2d5668ee1c09246 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2023-06-03 17:04:10 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2023-06-03 17:04:10 +0000 dtrace: deduplicate arm64 breakpoint definition Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40363 --- sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h | 6 ++++++ sys/cddl/dev/fbt/aarch64/fbt_isa.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index b38bc71a6845..98ae9eba120a 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2479,6 +2479,10 @@ extern int dtrace_instr_c_ret(uint32_t **instr); #define INSN_SIZE 4 +#define BRK_INSTR 0xd4200000 +#define BRK_IMM16_SHIFT 5 +#define BRK_IMM16_VAL (0x40d << BRK_IMM16_SHIFT) + #define B_MASK 0xff000000 #define B_DATA_MASK 0x00ffffff #define B_INSTR 0x14000000 @@ -2515,6 +2519,8 @@ extern int dtrace_instr_c_ret(uint32_t **instr); #define OFFSET_SIZE 7 #define OFFSET_MASK ((1 << OFFSET_SIZE) - 1) +#define DTRACE_PATCHVAL (BRK_INSTR | BRK_IMM16_VAL) + #define DTRACE_INVOP_STP 1 #define DTRACE_INVOP_RET 2 #define DTRACE_INVOP_B 3 diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index 26d750bf540c..cc4ea42715c8 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -38,10 +38,7 @@ #include "fbt.h" -#define AARCH64_BRK 0xd4200000 -#define AARCH64_BRK_IMM16_SHIFT 5 -#define AARCH64_BRK_IMM16_VAL (0x40d << AARCH64_BRK_IMM16_SHIFT) -#define FBT_PATCHVAL (AARCH64_BRK | AARCH64_BRK_IMM16_VAL) +#define FBT_PATCHVAL DTRACE_PATCHVAL #define FBT_AFRAMES 4 int