From: Mark Langsdorf <mark.langsdorf@calxeda.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org,
paul@codesourcery.com,
Mark Langsdorf <mark.langsdorf@calxeda.com>
Subject: [Qemu-devel] [PATCH v2 3/9] arm: add dummy v7 cp15 config_base_register
Date: Thu, 22 Dec 2011 12:20:08 -0600 [thread overview]
Message-ID: <1324578014-24746-4-git-send-email-mark.langsdorf@calxeda.com> (raw)
In-Reply-To: <1324578014-24746-1-git-send-email-mark.langsdorf@calxeda.com>
Add a cp15 config_base_register that currently defaults to 0.
After the QOM CPU support is added, the value will be properly
set to the periphal base value.
Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
---
Changes from v1
renamed the register
added comments about how it will change when QOM CPUs are added
target-arm/cpu.h | 1 +
target-arm/helper.c | 14 ++++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index c4d742f..449e620 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -149,6 +149,7 @@ typedef struct CPUARMState {
uint32_t c15_i_max; /* Maximum D-cache dirty line index. */
uint32_t c15_i_min; /* Minimum D-cache dirty line index. */
uint32_t c15_threadid; /* TI debugger thread-ID. */
+ uint32_t c15_config_base_address; /* SCU base address. */
} cp15;
struct {
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 65f4fbf..3899a43 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -2111,6 +2111,20 @@ uint32_t HELPER(get_cp15)(CPUState *env, uint32_t insn)
* 0x200 << ($rn & 0xfff), when MMU is off. */
goto bad_reg;
}
+ if (ARM_CPUID(env) == ARM_CPUID_CORTEXA9) {
+ switch (crm) {
+ case 0:
+ /* The config_base_address should hold the value of
+ * the peripheral base. ARM should get this from a CPU
+ * object property, but that support isn't available in
+ * December 2011. Default to 0 for now and board models
+ * that care can set it by a private hook */
+ if (op1 == 4) {
+ return env->cp15.c15_config_base_address;
+ }
+ }
+ goto bad_reg;
+ }
return 0;
}
bad_reg:
--
1.7.5.4
next prev parent reply other threads:[~2011-12-22 18:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 18:20 [Qemu-devel] [PATCH v2 0/9] various ARM fixes Mark Langsdorf
2011-12-22 18:20 ` [Qemu-devel] [PATCH v2 1/9] arm: add missing scu registers Mark Langsdorf
2011-12-24 0:23 ` Peter Maydell
2011-12-22 18:20 ` [Qemu-devel] [PATCH v2 2/9] arm: Set frequencies for arm_timer Mark Langsdorf
2011-12-24 0:26 ` Peter Maydell
2011-12-24 9:19 ` Andreas Färber
2011-12-22 18:20 ` Mark Langsdorf [this message]
2011-12-24 0:30 ` [Qemu-devel] [PATCH v2 3/9] arm: add dummy v7 cp15 config_base_register Peter Maydell
2011-12-22 18:20 ` [Qemu-devel] [PATCH v2 4/9] arm: add dummy gic security registers Mark Langsdorf
2011-12-24 0:32 ` Peter Maydell
2011-12-22 18:20 ` [Qemu-devel] [PATCH 5/9] ahci: convert ahci_reset to use AHCIState Mark Langsdorf
2011-12-24 0:35 ` Peter Maydell
2011-12-22 18:20 ` [Qemu-devel] [PATCH 6/9] ahci: add support for non-PCI based controllers Mark Langsdorf
2011-12-24 0:39 ` Peter Maydell
2011-12-22 18:20 ` [Qemu-devel] [PATCH v2 7/9] add L2x0/PL310 cache controller device Mark Langsdorf
2011-12-24 0:53 ` Peter Maydell
2011-12-22 18:20 ` [Qemu-devel] [PATCH v2 8/9] Add xgmac ethernet model Mark Langsdorf
2011-12-22 18:20 ` [Qemu-devel] [PATCH 9/9] arm: increase a9mp interrupts to 160 Mark Langsdorf
2011-12-24 0:54 ` Rob Herring
2011-12-24 1:10 ` 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=1324578014-24746-4-git-send-email-mark.langsdorf@calxeda.com \
--to=mark.langsdorf@calxeda.com \
--cc=kwolf@redhat.com \
--cc=paul@codesourcery.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).