diff options
Diffstat (limited to 'recipes-devtools/qemu/qemu-zynqmp-mainline/0001-target-arm-cpu64-Factor-out-ARM-cortex-init.patch')
-rw-r--r-- | recipes-devtools/qemu/qemu-zynqmp-mainline/0001-target-arm-cpu64-Factor-out-ARM-cortex-init.patch | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/recipes-devtools/qemu/qemu-zynqmp-mainline/0001-target-arm-cpu64-Factor-out-ARM-cortex-init.patch b/recipes-devtools/qemu/qemu-zynqmp-mainline/0001-target-arm-cpu64-Factor-out-ARM-cortex-init.patch deleted file mode 100644 index f759f27b..00000000 --- a/recipes-devtools/qemu/qemu-zynqmp-mainline/0001-target-arm-cpu64-Factor-out-ARM-cortex-init.patch +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | From 56489633015d2ac71d680bdd27accbd6f87b4fe3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Crosthwaite <peter.crosthwaite@xilinx.com> | ||
3 | Date: Mon, 23 Mar 2015 04:05:11 -0700 | ||
4 | Subject: [PATCH 01/15] target-arm: cpu64: Factor out ARM cortex init | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | In preparation for support for Cortex a53. Use "axx" to describe the | ||
10 | shareable features. Some of the CP15 registers (such as ACTLR) are | ||
11 | specific to implementation, but we currently just RAZ them so continue | ||
12 | with that as the policy for all cortex A processors under a shared | ||
13 | definition. | ||
14 | |||
15 | The cache sizes and geometeries, the L1 I-cache policy and the physical | ||
16 | address range differ between A53 and A57 so those particulars are left | ||
17 | as A57 specific. The rest are moved to the generalisation. | ||
18 | |||
19 | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> | ||
20 | Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> | ||
21 | --- | ||
22 | target-arm/cpu64.c | 34 ++++++++++++++++++++-------------- | ||
23 | 1 file changed, 20 insertions(+), 14 deletions(-) | ||
24 | |||
25 | diff --git a/target-arm/cpu64.c b/target-arm/cpu64.c | ||
26 | index 270bc2f..3eb58c6 100644 | ||
27 | --- a/target-arm/cpu64.c | ||
28 | +++ b/target-arm/cpu64.c | ||
29 | @@ -38,22 +38,22 @@ static inline void unset_feature(CPUARMState *env, int feature) | ||
30 | } | ||
31 | |||
32 | #ifndef CONFIG_USER_ONLY | ||
33 | -static uint64_t a57_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri) | ||
34 | +static uint64_t axx_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri) | ||
35 | { | ||
36 | /* Number of processors is in [25:24]; otherwise we RAZ */ | ||
37 | return (smp_cpus - 1) << 24; | ||
38 | } | ||
39 | #endif | ||
40 | |||
41 | -static const ARMCPRegInfo cortexa57_cp_reginfo[] = { | ||
42 | +static const ARMCPRegInfo cortexaxx_cp_reginfo[] = { | ||
43 | #ifndef CONFIG_USER_ONLY | ||
44 | { .name = "L2CTLR_EL1", .state = ARM_CP_STATE_AA64, | ||
45 | .opc0 = 3, .opc1 = 1, .crn = 11, .crm = 0, .opc2 = 2, | ||
46 | - .access = PL1_RW, .readfn = a57_l2ctlr_read, | ||
47 | + .access = PL1_RW, .readfn = axx_l2ctlr_read, | ||
48 | .writefn = arm_cp_write_ignore }, | ||
49 | { .name = "L2CTLR", | ||
50 | .cp = 15, .opc1 = 1, .crn = 9, .crm = 0, .opc2 = 2, | ||
51 | - .access = PL1_RW, .readfn = a57_l2ctlr_read, | ||
52 | + .access = PL1_RW, .readfn = axx_l2ctlr_read, | ||
53 | .writefn = arm_cp_write_ignore }, | ||
54 | #endif | ||
55 | { .name = "L2ECTLR_EL1", .state = ARM_CP_STATE_AA64, | ||
56 | @@ -92,11 +92,8 @@ static const ARMCPRegInfo cortexa57_cp_reginfo[] = { | ||
57 | REGINFO_SENTINEL | ||
58 | }; | ||
59 | |||
60 | -static void aarch64_a57_initfn(Object *obj) | ||
61 | +static void aarch64_axx_initfn(ARMCPU *cpu) | ||
62 | { | ||
63 | - ARMCPU *cpu = ARM_CPU(obj); | ||
64 | - | ||
65 | - cpu->dtb_compatible = "arm,cortex-a57"; | ||
66 | set_feature(&cpu->env, ARM_FEATURE_V8); | ||
67 | set_feature(&cpu->env, ARM_FEATURE_VFP4); | ||
68 | set_feature(&cpu->env, ARM_FEATURE_NEON); | ||
69 | @@ -108,13 +105,10 @@ static void aarch64_a57_initfn(Object *obj) | ||
70 | set_feature(&cpu->env, ARM_FEATURE_V8_SHA256); | ||
71 | set_feature(&cpu->env, ARM_FEATURE_V8_PMULL); | ||
72 | set_feature(&cpu->env, ARM_FEATURE_CRC); | ||
73 | - cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A57; | ||
74 | - cpu->midr = 0x411fd070; | ||
75 | cpu->reset_fpsid = 0x41034070; | ||
76 | cpu->mvfr0 = 0x10110222; | ||
77 | cpu->mvfr1 = 0x12111111; | ||
78 | cpu->mvfr2 = 0x00000043; | ||
79 | - cpu->ctr = 0x8444c004; | ||
80 | cpu->reset_sctlr = 0x00c50838; | ||
81 | cpu->id_pfr0 = 0x00000131; | ||
82 | cpu->id_pfr1 = 0x00011011; | ||
83 | @@ -133,14 +127,26 @@ static void aarch64_a57_initfn(Object *obj) | ||
84 | cpu->id_aa64pfr0 = 0x00002222; | ||
85 | cpu->id_aa64dfr0 = 0x10305106; | ||
86 | cpu->id_aa64isar0 = 0x00011120; | ||
87 | - cpu->id_aa64mmfr0 = 0x00001124; | ||
88 | cpu->dbgdidr = 0x3516d000; | ||
89 | cpu->clidr = 0x0a200023; | ||
90 | + cpu->dcz_blocksize = 4; /* 64 bytes */ | ||
91 | + define_arm_cp_regs(cpu, cortexaxx_cp_reginfo); | ||
92 | +} | ||
93 | + | ||
94 | +static void aarch64_a57_initfn(Object *obj) | ||
95 | +{ | ||
96 | + ARMCPU *cpu = ARM_CPU(obj); | ||
97 | + | ||
98 | + aarch64_axx_initfn(cpu); | ||
99 | + | ||
100 | + cpu->dtb_compatible = "arm,cortex-a57"; | ||
101 | + cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A57; | ||
102 | + cpu->midr = 0x411fd070; | ||
103 | + cpu->ctr = 0x8444c004; /* L1Ip = PIPT */ | ||
104 | + cpu->id_aa64mmfr0 = 0x00001124; /* 44 bit physical addr */ | ||
105 | cpu->ccsidr[0] = 0x701fe00a; /* 32KB L1 dcache */ | ||
106 | cpu->ccsidr[1] = 0x201fe012; /* 48KB L1 icache */ | ||
107 | cpu->ccsidr[2] = 0x70ffe07a; /* 2048KB L2 cache */ | ||
108 | - cpu->dcz_blocksize = 4; /* 64 bytes */ | ||
109 | - define_arm_cp_regs(cpu, cortexa57_cp_reginfo); | ||
110 | } | ||
111 | |||
112 | #ifdef CONFIG_USER_ONLY | ||
113 | -- | ||
114 | 1.7.10.4 | ||
115 | |||