From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <rth@twiddle.net>,
"Andreas Färber" <afaerber@suse.de>,
patches@linaro.org
Subject: [Qemu-devel] [PATCH 10/10] target-arm: Implement minimal DBGVCR, OSDLR_EL1, MDCCSR_EL0
Date: Fri, 29 Aug 2014 12:21:32 +0100 [thread overview]
Message-ID: <1409311292-18860-11-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1409311292-18860-1-git-send-email-peter.maydell@linaro.org>
Implement debug registers DBGVCR, OSDLR_EL1 and MDCCSR_EL0
(as dummy or limited-functionality). 32 bit Linux kernels will
access these at startup so they are required for breakpoints
and watchpoints to be supported.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target-arm/helper.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 6ae3c50..2945828 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -2194,10 +2194,29 @@ static const ARMCPRegInfo debug_cp_reginfo[] = {
.access = PL1_RW,
.fieldoffset = offsetof(CPUARMState, cp15.mdscr_el1),
.resetvalue = 0 },
+ /* MDCCSR_EL0, aka DBGDSCRint. This is a read-only mirror of MDSCR_EL1.
+ * We don't implement the configurable EL0 access.
+ */
+ { .name = "MDCCSR_EL0", .state = ARM_CP_STATE_BOTH,
+ .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 0,
+ .type = ARM_CP_NO_MIGRATE,
+ .access = PL1_R,
+ .fieldoffset = offsetof(CPUARMState, cp15.mdscr_el1),
+ .resetfn = arm_cp_reset_ignore },
/* We define a dummy WI OSLAR_EL1, because Linux writes to it. */
{ .name = "OSLAR_EL1", .state = ARM_CP_STATE_BOTH,
.cp = 14, .opc0 = 2, .opc1 = 0, .crn = 1, .crm = 0, .opc2 = 4,
.access = PL1_W, .type = ARM_CP_NOP },
+ /* Dummy OSDLR_EL1: 32-bit Linux will read this */
+ { .name = "OSDLR_EL1", .state = ARM_CP_STATE_BOTH,
+ .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 1, .crm = 3, .opc2 = 4,
+ .access = PL1_RW, .type = ARM_CP_NOP },
+ /* Dummy DBGVCR: Linux wants to clear this on startup, but we don't
+ * implement vector catch debug events yet.
+ */
+ { .name = "DBGVCR",
+ .cp = 14, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 0,
+ .access = PL1_RW, .type = ARM_CP_NOP },
REGINFO_SENTINEL
};
--
1.9.1
next prev parent reply other threads:[~2014-08-29 11:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 11:21 [Qemu-devel] [PATCH 00/10] Implement ARM architectural watchpoints Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 01/10] exec.c: Relax restrictions on watchpoint length and alignment Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 02/10] exec.c: Provide full set of dummy wp remove functions in user-mode Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 03/10] exec.c: Record watchpoint fault address and direction Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 04/10] cpu-exec: Make debug_excp_handler a QOM CPU method Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 05/10] target-arm: Implement setting of watchpoints Peter Maydell
2014-08-29 16:42 ` Richard Henderson
2014-08-29 16:43 ` Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 06/10] target-arm: Move extended_addresses_enabled() to internals.h Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 07/10] target-arm: Implement handling of fired watchpoints Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 08/10] target-arm: Set DBGDSCR.MOE for debug exceptions taken to AArch32 Peter Maydell
2014-08-29 11:21 ` [Qemu-devel] [PATCH 09/10] target-arm: Remove comment about MDSCR_EL1 being dummy implementation Peter Maydell
2014-08-29 11:21 ` Peter Maydell [this message]
2014-08-29 16:49 ` [Qemu-devel] [PATCH 00/10] Implement ARM architectural watchpoints Richard Henderson
2014-09-11 10:54 ` Peter Maydell
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=1409311292-18860-11-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).