From: Greg Bellows <greg.bellows@linaro.org>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: Greg Bellows <greg.bellows@linaro.org>
Subject: [Qemu-devel] [PATCH 4/4] target-arm: Add missing SP_ELx register definition
Date: Fri, 23 Jan 2015 08:49:23 -0600 [thread overview]
Message-ID: <1422024563-27096-5-git-send-email-greg.bellows@linaro.org> (raw)
In-Reply-To: <1422024563-27096-1-git-send-email-greg.bellows@linaro.org>
Added CP register definitions for SP_EL1 and SP_EL2.
Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
---
target-arm/helper.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index d5f0997..ae7394d 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -2096,7 +2096,7 @@ static uint64_t aa64_dczid_read(CPUARMState *env, const ARMCPRegInfo *ri)
return cpu->dcz_blocksize | dzp_bit;
}
-static CPAccessResult sp_el0_access(CPUARMState *env, const ARMCPRegInfo *ri)
+static CPAccessResult sp_el_access(CPUARMState *env, const ARMCPRegInfo *ri)
{
if (!(env->pstate & PSTATE_SP)) {
/* Access to SP_EL0 is undefined if it's being used as
@@ -2326,9 +2326,14 @@ static const ARMCPRegInfo v8_cp_reginfo[] = {
*/
{ .name = "SP_EL0", .state = ARM_CP_STATE_AA64,
.opc0 = 3, .opc1 = 0, .crn = 4, .crm = 1, .opc2 = 0,
- .access = PL1_RW, .accessfn = sp_el0_access,
+ .access = PL1_RW, .accessfn = sp_el_access,
.type = ARM_CP_NO_MIGRATE,
.fieldoffset = offsetof(CPUARMState, sp_el[0]) },
+ { .name = "SP_EL1", .state = ARM_CP_STATE_AA64,
+ .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0,
+ .access = PL2_RW, .accessfn = sp_el_access,
+ .type = ARM_CP_NO_MIGRATE,
+ .fieldoffset = offsetof(CPUARMState, sp_el[1]) },
{ .name = "SPSel", .state = ARM_CP_STATE_AA64,
.opc0 = 3, .opc1 = 0, .crn = 4, .crm = 2, .opc2 = 0,
.type = ARM_CP_NO_MIGRATE,
@@ -2410,6 +2415,11 @@ static const ARMCPRegInfo v8_el2_cp_reginfo[] = {
.access = PL2_RW, .writefn = vbar_write,
.fieldoffset = offsetof(CPUARMState, cp15.vbar_el[2]),
.resetvalue = 0 },
+ { .name = "SP_EL2", .state = ARM_CP_STATE_AA64,
+ .opc0 = 3, .opc1 = 6, .crn = 4, .crm = 1, .opc2 = 0,
+ .access = PL3_RW, .accessfn = sp_el_access,
+ .type = ARM_CP_NO_MIGRATE,
+ .fieldoffset = offsetof(CPUARMState, sp_el[2]) },
REGINFO_SENTINEL
};
--
1.8.3.2
next prev parent reply other threads:[~2015-01-23 14:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 14:49 [Qemu-devel] [PATCH 0/4] target-arm: Initial ARMv8 extended EL support Greg Bellows
2015-01-23 14:49 ` [Qemu-devel] [PATCH 1/4] target-arm: Fix RVBAR_EL1 register encoding Greg Bellows
2015-01-23 14:55 ` Peter Maydell
2015-01-23 14:59 ` Greg Bellows
2015-01-23 15:12 ` Peter Maydell
2015-01-23 14:49 ` [Qemu-devel] [PATCH 2/4] target-arm: Add extended RVBAR support Greg Bellows
2015-01-23 15:01 ` Peter Maydell
2015-01-23 14:49 ` [Qemu-devel] [PATCH 3/4] target-arm: Change reset to highest available EL Greg Bellows
2015-01-23 15:05 ` Peter Maydell
2015-01-23 15:25 ` Greg Bellows
2015-01-23 14:49 ` Greg Bellows [this message]
2015-01-23 15:12 ` [Qemu-devel] [PATCH 4/4] target-arm: Add missing SP_ELx register definition 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=1422024563-27096-5-git-send-email-greg.bellows@linaro.org \
--to=greg.bellows@linaro.org \
--cc=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 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).