From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 08/28] target/arm: Move arm_debug_exception_fsr to debug_helper.c
Date: Fri, 10 Jun 2022 17:07:18 +0100 [thread overview]
Message-ID: <20220610160738.2230762-9-peter.maydell@linaro.org> (raw)
In-Reply-To: <20220610160738.2230762-1-peter.maydell@linaro.org>
From: Richard Henderson <richard.henderson@linaro.org>
This function now now only used in debug_helper.c, so there is
no reason to have a declaration in a header.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220609202901.1177572-9-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/internals.h | 25 -------------------------
target/arm/debug_helper.c | 26 ++++++++++++++++++++++++++
2 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index 02fa70f75ae..6f94f3019db 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -793,31 +793,6 @@ static inline TCR *regime_tcr(CPUARMState *env, ARMMMUIdx mmu_idx)
return &env->cp15.tcr_el[regime_el(env, mmu_idx)];
}
-/* Return the FSR value for a debug exception (watchpoint, hardware
- * breakpoint or BKPT insn) targeting the specified exception level.
- */
-static inline uint32_t arm_debug_exception_fsr(CPUARMState *env)
-{
- ARMMMUFaultInfo fi = { .type = ARMFault_Debug };
- int target_el = arm_debug_target_el(env);
- bool using_lpae = false;
-
- if (target_el == 2 || arm_el_is_aa64(env, target_el)) {
- using_lpae = true;
- } else {
- if (arm_feature(env, ARM_FEATURE_LPAE) &&
- (env->cp15.tcr_el[target_el].raw_tcr & TTBCR_EAE)) {
- using_lpae = true;
- }
- }
-
- if (using_lpae) {
- return arm_fi_to_lfsc(&fi);
- } else {
- return arm_fi_to_sfsc(&fi);
- }
-}
-
/**
* arm_num_brps: Return number of implemented breakpoints.
* Note that the ID register BRPS field is "number of bps - 1",
diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c
index 80dff0788b7..a743061e89b 100644
--- a/target/arm/debug_helper.c
+++ b/target/arm/debug_helper.c
@@ -379,6 +379,32 @@ bool arm_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp)
return check_watchpoints(cpu);
}
+/*
+ * Return the FSR value for a debug exception (watchpoint, hardware
+ * breakpoint or BKPT insn) targeting the specified exception level.
+ */
+static uint32_t arm_debug_exception_fsr(CPUARMState *env)
+{
+ ARMMMUFaultInfo fi = { .type = ARMFault_Debug };
+ int target_el = arm_debug_target_el(env);
+ bool using_lpae = false;
+
+ if (target_el == 2 || arm_el_is_aa64(env, target_el)) {
+ using_lpae = true;
+ } else {
+ if (arm_feature(env, ARM_FEATURE_LPAE) &&
+ (env->cp15.tcr_el[target_el].raw_tcr & TTBCR_EAE)) {
+ using_lpae = true;
+ }
+ }
+
+ if (using_lpae) {
+ return arm_fi_to_lfsc(&fi);
+ } else {
+ return arm_fi_to_sfsc(&fi);
+ }
+}
+
void arm_debug_excp_handler(CPUState *cs)
{
/*
--
2.25.1
next prev parent reply other threads:[~2022-06-10 16:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 16:07 [PULL 00/28] target-arm queue Peter Maydell
2022-06-10 16:07 ` [PULL 01/28] target/arm: Mark exception helpers as noreturn Peter Maydell
2022-06-10 16:07 ` [PULL 02/28] target/arm: Add coproc parameter to syn_fp_access_trap Peter Maydell
2022-08-12 14:47 ` Peter Maydell
2022-06-10 16:07 ` [PULL 03/28] target/arm: Move exception_target_el out of line Peter Maydell
2022-06-10 16:07 ` [PULL 04/28] target/arm: Move arm_singlestep_active " Peter Maydell
2022-06-10 16:07 ` [PULL 05/28] target/arm: Move arm_generate_debug_exceptions " Peter Maydell
2022-06-10 16:07 ` [PULL 06/28] target/arm: Use is_a64 in arm_generate_debug_exceptions Peter Maydell
2022-06-10 16:07 ` [PULL 07/28] target/arm: Move exception_bkpt_insn to debug_helper.c Peter Maydell
2022-06-10 16:07 ` Peter Maydell [this message]
2022-06-10 16:07 ` [PULL 09/28] target/arm: Rename helper_exception_with_syndrome Peter Maydell
2022-06-10 16:07 ` [PULL 10/28] target/arm: Introduce gen_exception_insn_el_v Peter Maydell
2022-06-10 16:07 ` [PULL 11/28] target/arm: Rename gen_exception_insn to gen_exception_insn_el Peter Maydell
2022-06-10 16:07 ` [PULL 12/28] target/arm: Introduce gen_exception_insn Peter Maydell
2022-06-10 16:07 ` [PULL 13/28] target/arm: Create helper_exception_swstep Peter Maydell
2022-06-10 16:07 ` [PULL 14/28] target/arm: Remove TBFLAG_ANY.DEBUG_TARGET_EL Peter Maydell
2022-06-10 16:07 ` [PULL 15/28] target/arm: Move gen_exception to translate.c Peter Maydell
2022-06-10 16:07 ` [PULL 16/28] target/arm: Rename gen_exception to gen_exception_el Peter Maydell
2022-06-10 16:07 ` [PULL 17/28] target/arm: Introduce gen_exception Peter Maydell
2022-06-10 16:07 ` [PULL 18/28] target/arm: Introduce gen_exception_el_v Peter Maydell
2022-06-10 16:07 ` [PULL 19/28] target/arm: Introduce helper_exception_with_syndrome Peter Maydell
2022-06-10 16:07 ` [PULL 20/28] target/arm: Remove default_exception_el Peter Maydell
2022-06-10 16:07 ` [PULL 21/28] target/arm: Create raise_exception_debug Peter Maydell
2022-06-10 16:07 ` [PULL 22/28] target/arm: Move arm_debug_target_el to debug_helper.c Peter Maydell
2022-06-10 16:07 ` [PULL 23/28] target/arm: Fix Secure PL1 tests in fp_exception_el Peter Maydell
2022-06-10 16:07 ` [PULL 24/28] tests/qtest: Reduce npcm7xx_sdhci test image size Peter Maydell
2022-06-10 16:07 ` [PULL 25/28] target/arm: Adjust format test in scr_write Peter Maydell
2022-06-10 16:07 ` [PULL 26/28] target/arm: SCR_EL3.RW is RAO/WI without AArch32 EL[12] Peter Maydell
2022-06-10 16:07 ` [PULL 27/28] gdbstub: Don't use GDB syscalls if no GDB is attached Peter Maydell
2022-06-10 16:07 ` [PULL 28/28] semihosting/config: Merge --semihosting-config option groups Peter Maydell
2022-06-10 23:10 ` [PULL 00/28] target-arm queue Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220610160738.2230762-9-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.