qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	Antony Pavlov <antonynpavlov@gmail.com>
Subject: [Qemu-devel] [RFC v2 1/2] ARM: cpu: add "reset_hivecs" property (high vectors on reset)
Date: Wed, 11 Dec 2013 02:05:02 +0400	[thread overview]
Message-ID: <1386713103-24385-2-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1386713103-24385-1-git-send-email-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 target-arm/cpu-qom.h |  1 +
 target-arm/cpu.c     | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h
index b55306a..116320c 100644
--- a/target-arm/cpu-qom.h
+++ b/target-arm/cpu-qom.h
@@ -128,6 +128,7 @@ typedef struct ARMCPU {
     uint32_t ccsidr[16];
     uint32_t reset_cbar;
     uint32_t reset_auxcr;
+    bool reset_hivecs;
 } ARMCPU;
 
 #define TYPE_AARCH64_CPU "aarch64-cpu"
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index cbe108b..b60e3fc 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -224,6 +224,20 @@ static void arm_cpu_initfn(Object *obj)
     }
 }
 
+static bool reset_hivecs_get(Object *obj, Error **err)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+
+    return cpu->reset_hivecs;
+}
+
+static void reset_hivecs_set(Object *obj, bool value, Error **err)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+
+    cpu->reset_hivecs = value;
+}
+
 static void arm_cpu_post_init(Object *obj)
 {
     ARMCPU *cpu = ARM_CPU(obj);
@@ -234,6 +248,12 @@ static void arm_cpu_post_init(Object *obj)
                                        &err);
         assert_no_error(err);
     }
+
+    if (!arm_feature(&cpu->env, ARM_FEATURE_M)) {
+        object_property_add_bool(obj, "reset-hivecs",
+            reset_hivecs_get, reset_hivecs_set, &err);
+        assert_no_error(err);
+    }
 }
 
 static void arm_cpu_finalizefn(Object *obj)
@@ -295,6 +315,10 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
         set_feature(env, ARM_FEATURE_PXN);
     }
 
+    if (cpu->reset_hivecs) {
+            cpu->reset_sctlr |= (1 << 13);
+    }
+
     register_cp_regs_for_features(cpu);
     arm_cpu_register_gdb_regs_for_features(cpu);
 
-- 
1.8.5

  reply	other threads:[~2013-12-10 21:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 22:05 [Qemu-devel] [RFC v2 0/2] ARM: make possible to use high vectors for reset exception Antony Pavlov
2013-12-10 22:05 ` Antony Pavlov [this message]
2013-12-11  3:00   ` [Qemu-devel] [RFC v2 1/2] ARM: cpu: add "reset_hivecs" property (high vectors on reset) Peter Crosthwaite
2013-12-10 22:05 ` [Qemu-devel] [RFC v2 2/2] ARM: arm_cpu_reset: make possible to use high vectors for reset_exc Antony Pavlov
2013-12-11  2:57 ` [Qemu-devel] [RFC v2 0/2] ARM: make possible to use high vectors for reset exception Peter Crosthwaite

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=1386713103-24385-2-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=peter.crosthwaite@xilinx.com \
    --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).