diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-02-27 11:33:25 -1000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-03-06 14:08:11 +0000 |
commit | abf1f1b03aad07d9b7aa4bb5b06ac5a2c7b134d1 (patch) | |
tree | ec74f325f241725c978439572c5ee60221e894c6 /target/arm/internals.h | |
parent | 55f0fc61f8a386dbadecec6aa0ab442df5f12e4d (diff) |
target/arm: Create pauth_ptr_mask
Keep the logic for pauth within pauth_helper.c, and expose
a helper function for use with the gdbstub pac extension.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-11-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/internals.h')
-rw-r--r-- | target/arm/internals.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/arm/internals.h b/target/arm/internals.h index 15988768be..c891c7a383 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1368,6 +1368,16 @@ int exception_target_el(CPUARMState *env); bool arm_singlestep_active(CPUARMState *env); bool arm_generate_debug_exceptions(CPUARMState *env); +/** + * pauth_ptr_mask: + * @env: cpu context + * @ptr: selects between TTBR0 and TTBR1 + * @data: selects between TBI and TBID + * + * Return a mask of the bits of @ptr that contain the authentication code. + */ +uint64_t pauth_ptr_mask(CPUARMState *env, uint64_t ptr, bool data); + /* Add the cpreg definitions for debug related system registers */ void define_debug_regs(ARMCPU *cpu); |