qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <andreas.faerber@web.de>
To: qemu-devel@nongnu.org
Cc: giancarlo.asnaghi@st.com,
	"Andreas Färber" <andreas.faerber@web.de>,
	"Paul Brook" <paul@codesourcery.com>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: [Qemu-devel] [RFC v2 1/2] target-arm: Prepare support for Cortex-R4
Date: Sat, 22 Sep 2012 13:45:53 +0200	[thread overview]
Message-ID: <1348314355-10992-1-git-send-email-andreas.faerber@web.de> (raw)
In-Reply-To: <505C9E59.2040308@suse.de>

Glue "cortex-r4" to r1p4, the latest available TRM.
Set MPU and Thumb division feature bit.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
 target-arm/cpu.c |   24 ++++++++++++++++++++++++
 1 Datei geändert, 24 Zeilen hinzugefügt(+)

diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index b00f5fa..6726498 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -382,6 +382,29 @@ static void cortex_m3_initfn(Object *obj)
     cpu->midr = 0x410fc231;
 }
 
+static void cortex_r4_initfn(Object *obj)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+    set_feature(&cpu->env, ARM_FEATURE_V7);
+    set_feature(&cpu->env, ARM_FEATURE_THUMB_DIV);
+    set_feature(&cpu->env, ARM_FEATURE_MPU);
+    cpu->midr = 0x411FC144; /* r1p4 */
+    cpu->id_pfr0 = 0x0131;
+    cpu->id_pfr1 = 0x001;
+    cpu->id_dfr0 = 0x010400;
+    cpu->id_afr0 = 0x0;
+    cpu->id_mmfr0 = 0x0210030;
+    cpu->id_mmfr1 = 0x00000000;
+    cpu->id_mmfr2 = 0x01200000;
+    cpu->id_mmfr3 = 0x0211;
+    cpu->id_isar0 = 0x1101111;
+    cpu->id_isar1 = 0x13112111;
+    cpu->id_isar2 = 0x21232131;
+    cpu->id_isar3 = 0x01112131;
+    cpu->id_isar4 = 0x0010142;
+    cpu->id_isar5 = 0x0;
+}
+
 static const ARMCPRegInfo cortexa8_cp_reginfo[] = {
     { .name = "L2LOCKDOWN", .cp = 15, .crn = 9, .crm = 0, .opc1 = 1, .opc2 = 0,
       .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },
@@ -737,6 +760,7 @@ static const ARMCPUInfo arm_cpus[] = {
     { .name = "arm1176",     .initfn = arm1176_initfn },
     { .name = "arm11mpcore", .initfn = arm11mpcore_initfn },
     { .name = "cortex-m3",   .initfn = cortex_m3_initfn },
+    { .name = "cortex-r4",   .initfn = cortex_r4_initfn },
     { .name = "cortex-a8",   .initfn = cortex_a8_initfn },
     { .name = "cortex-a9",   .initfn = cortex_a9_initfn },
     { .name = "cortex-a15",  .initfn = cortex_a15_initfn },
-- 
1.7.10.4

  reply	other threads:[~2012-09-22 11:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 15:15 [Qemu-devel] ARM Cortex-R4 support ? Giancarlo ASNAGHI
2012-09-21 17:05 ` Andreas Färber
2012-09-22 11:45   ` Andreas Färber [this message]
2012-09-22 11:45     ` [Qemu-devel] [RFC v2 2/2] target-arm: Add support for Cortex-R4F Andreas Färber
2012-09-22 14:43       ` Blue Swirl
2012-09-22 14:54       ` Peter Maydell
2012-09-22 13:05     ` [Qemu-devel] [RFC v2 1/2] target-arm: Prepare support for Cortex-R4 Peter Maydell
2012-09-22 13:56       ` Andreas Färber
2012-09-22 14:30         ` Peter Maydell
2012-09-24  7:48   ` [Qemu-devel] ARM Cortex-R4 support ? Giancarlo ASNAGHI
2012-09-25  9:20   ` Giancarlo ASNAGHI

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=1348314355-10992-1-git-send-email-andreas.faerber@web.de \
    --to=andreas.faerber@web.de \
    --cc=giancarlo.asnaghi@st.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).