1 | Hi; this target-arm pull request has a collection of generally | 1 | Arm patches for rc3 : just a handful of bug fixes. |
---|---|---|---|
2 | fairly minor bugs to sneak in before 3.0 rc0 tomorrow... | ||
3 | 2 | ||
4 | thanks | 3 | thanks |
5 | -- PMM | 4 | -- PMM |
6 | 5 | ||
7 | The following changes since commit a98ff0ec2ba3538dd766b349518ee18d03942ed8: | ||
8 | 6 | ||
9 | Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180709' into staging (2018-07-09 11:00:45 +0100) | 7 | The following changes since commit 4ecc984210ca1bf508a96a550ec8a93a5f833f6c: |
8 | |||
9 | Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.2-rc3' into staging (2019-11-26 12:36:40 +0000) | ||
10 | 10 | ||
11 | are available in the Git repository at: | 11 | are available in the Git repository at: |
12 | 12 | ||
13 | git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20180709 | 13 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20191126 |
14 | 14 | ||
15 | for you to fetch changes up to 8fad0a65582c0a6e324580f45516461e9b6aa439: | 15 | for you to fetch changes up to 6a4ef4e5d1084ce41fafa7d470a644b0fd3d9317: |
16 | 16 | ||
17 | hw/net/dp8393x: don't make prom region 'nomigrate' (2018-07-09 14:51:35 +0100) | 17 | target/arm: Honor HCR_EL2.TID3 trapping requirements (2019-11-26 13:55:37 +0000) |
18 | 18 | ||
19 | ---------------------------------------------------------------- | 19 | ---------------------------------------------------------------- |
20 | target-arm queue: | 20 | target-arm queue: |
21 | * hw/net/dp8393x: don't make prom region 'nomigrate' | 21 | * handle FTYPE flag correctly in v7M exception return |
22 | * boards.h: Remove doc comment reference to nonexistent function | 22 | for v7M CPUs with an FPU (v8M CPUs were already correct) |
23 | * hw/sd/omap_mmc: Split 'pseudo-reset' from 'power-on-reset' | 23 | * versal: Add the CRP as unimplemented |
24 | * target/arm: Fix do_predset for large VL | 24 | * Fix ISR_EL1 tracking when executing at EL2 |
25 | * tcg: Restrict check_size_impl to multiples of the line size | 25 | * Honor HCR_EL2.TID3 trapping requirements |
26 | * target/arm: Suppress Coverity warning for PRF | ||
27 | * hw/timer/cmsdk-apb-timer: fix minor corner-case bugs and | ||
28 | suppress spurious warnings when running Linux's timer driver | ||
29 | * hw/arm/smmu-common: Fix devfn computation in smmu_iommu_mr | ||
30 | 26 | ||
31 | ---------------------------------------------------------------- | 27 | ---------------------------------------------------------------- |
32 | Eric Auger (1): | 28 | Edgar E. Iglesias (1): |
33 | hw/arm/smmu-common: Fix devfn computation in smmu_iommu_mr | 29 | hw/arm: versal: Add the CRP as unimplemented |
34 | 30 | ||
35 | Guenter Roeck (1): | 31 | Jean-Hugues Deschênes (1): |
36 | hw/timer/cmsdk-apb-timer: Correctly identify and set one-shot mode | 32 | target/arm: Fix handling of cortex-m FTYPE flag in EXCRET |
37 | 33 | ||
38 | Peter Maydell (5): | 34 | Marc Zyngier (2): |
39 | ptimer: Add TRIGGER_ONLY_ON_DECREMENT policy option | 35 | target/arm: Fix ISR_EL1 tracking when executing at EL2 |
40 | hw/timer/cmsdk-apb-timer: Correct ptimer policy settings | 36 | target/arm: Honor HCR_EL2.TID3 trapping requirements |
41 | hw/timer/cmsdk-apb-timer: run or stop timer on writes to RELOAD and VALUE | ||
42 | boards.h: Remove doc comment reference to nonexistent function | ||
43 | hw/net/dp8393x: don't make prom region 'nomigrate' | ||
44 | 37 | ||
45 | Philippe Mathieu-Daudé (1): | 38 | include/hw/arm/xlnx-versal.h | 3 ++ |
46 | hw/sd/omap_mmc: Split 'pseudo-reset' from 'power-on-reset' | 39 | hw/arm/xlnx-versal.c | 2 ++ |
40 | target/arm/helper.c | 83 ++++++++++++++++++++++++++++++++++++++++++-- | ||
41 | target/arm/m_helper.c | 7 ++-- | ||
42 | 4 files changed, 89 insertions(+), 6 deletions(-) | ||
47 | 43 | ||
48 | Richard Henderson (3): | ||
49 | target/arm: Suppress Coverity warning for PRF | ||
50 | tcg: Restrict check_size_impl to multiples of the line size | ||
51 | target/arm: Fix do_predset for large VL | ||
52 | |||
53 | include/hw/arm/smmu-common.h | 1 + | ||
54 | include/hw/boards.h | 3 +-- | ||
55 | include/hw/ptimer.h | 9 +++++++++ | ||
56 | hw/arm/smmu-common.c | 2 +- | ||
57 | hw/core/ptimer.c | 22 +++++++++++++++++++++- | ||
58 | hw/net/dp8393x.c | 2 +- | ||
59 | hw/sd/omap_mmc.c | 14 +++++++++++--- | ||
60 | hw/timer/cmsdk-apb-timer.c | 20 ++++++++++++++++++-- | ||
61 | target/arm/translate-sve.c | 14 ++++---------- | ||
62 | tcg/tcg-op-gvec.c | 7 +++++-- | ||
63 | tests/ptimer-test.c | 25 +++++++++++++++++++------ | ||
64 | 11 files changed, 91 insertions(+), 28 deletions(-) | ||
65 | diff view generated by jsdifflib |
1 | From: Eric Auger <eric.auger@redhat.com> | 1 | From: Jean-Hugues Deschênes <Jean-Hugues.Deschenes@ossiaco.com> |
---|---|---|---|
2 | 2 | ||
3 | smmu_iommu_mr() aims at returning the IOMMUMemoryRegion corresponding | 3 | According to the PushStack() pseudocode in the armv7m RM, |
4 | to a given sid. The function extracts both the PCIe bus number and | 4 | bit 4 of the LR should be set to NOT(CONTROL.PFCA) when |
5 | the devfn to return this data. Current computation of devfn is wrong | 5 | an FPU is present. Current implementation is doing it for |
6 | as it only returns the PCIe function instead of slot | function. | 6 | armv8, but not for armv7. This patch makes the existing |
7 | logic applicable to both code paths. | ||
7 | 8 | ||
8 | Fixes 32cfd7f39e08 ("hw/arm/smmuv3: Cache/invalidate config data") | 9 | Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@ossiaco.com> |
9 | |||
10 | Signed-off-by: Eric Auger <eric.auger@redhat.com> | ||
11 | Message-id: 1530775623-32399-1-git-send-email-eric.auger@redhat.com | ||
12 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 10 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 11 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
14 | --- | 12 | --- |
15 | include/hw/arm/smmu-common.h | 1 + | 13 | target/arm/m_helper.c | 7 +++---- |
16 | hw/arm/smmu-common.c | 2 +- | 14 | 1 file changed, 3 insertions(+), 4 deletions(-) |
17 | 2 files changed, 2 insertions(+), 1 deletion(-) | ||
18 | 15 | ||
19 | diff --git a/include/hw/arm/smmu-common.h b/include/hw/arm/smmu-common.h | 16 | diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c |
20 | index XXXXXXX..XXXXXXX 100644 | 17 | index XXXXXXX..XXXXXXX 100644 |
21 | --- a/include/hw/arm/smmu-common.h | 18 | --- a/target/arm/m_helper.c |
22 | +++ b/include/hw/arm/smmu-common.h | 19 | +++ b/target/arm/m_helper.c |
23 | @@ -XXX,XX +XXX,XX @@ | 20 | @@ -XXX,XX +XXX,XX @@ void arm_v7m_cpu_do_interrupt(CPUState *cs) |
24 | 21 | if (env->v7m.secure) { | |
25 | #define SMMU_PCI_BUS_MAX 256 | 22 | lr |= R_V7M_EXCRET_S_MASK; |
26 | #define SMMU_PCI_DEVFN_MAX 256 | 23 | } |
27 | +#define SMMU_PCI_DEVFN(sid) (sid & 0xFF) | 24 | - if (!(env->v7m.control[M_REG_S] & R_V7M_CONTROL_FPCA_MASK)) { |
28 | 25 | - lr |= R_V7M_EXCRET_FTYPE_MASK; | |
29 | #define SMMU_MAX_VA_BITS 48 | 26 | - } |
30 | 27 | } else { | |
31 | diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c | 28 | lr = R_V7M_EXCRET_RES1_MASK | |
32 | index XXXXXXX..XXXXXXX 100644 | 29 | R_V7M_EXCRET_S_MASK | |
33 | --- a/hw/arm/smmu-common.c | 30 | R_V7M_EXCRET_DCRS_MASK | |
34 | +++ b/hw/arm/smmu-common.c | 31 | - R_V7M_EXCRET_FTYPE_MASK | |
35 | @@ -XXX,XX +XXX,XX @@ IOMMUMemoryRegion *smmu_iommu_mr(SMMUState *s, uint32_t sid) | 32 | R_V7M_EXCRET_ES_MASK; |
36 | bus_n = PCI_BUS_NUM(sid); | 33 | if (env->v7m.control[M_REG_NS] & R_V7M_CONTROL_SPSEL_MASK) { |
37 | smmu_bus = smmu_find_smmu_pcibus(s, bus_n); | 34 | lr |= R_V7M_EXCRET_SPSEL_MASK; |
38 | if (smmu_bus) { | 35 | } |
39 | - devfn = sid & 0x7; | 36 | } |
40 | + devfn = SMMU_PCI_DEVFN(sid); | 37 | + if (!(env->v7m.control[M_REG_S] & R_V7M_CONTROL_FPCA_MASK)) { |
41 | smmu = smmu_bus->pbdev[devfn]; | 38 | + lr |= R_V7M_EXCRET_FTYPE_MASK; |
42 | if (smmu) { | 39 | + } |
43 | return &smmu->iommu; | 40 | if (!arm_v7m_is_handler_mode(env)) { |
41 | lr |= R_V7M_EXCRET_MODE_MASK; | ||
42 | } | ||
44 | -- | 43 | -- |
45 | 2.17.1 | 44 | 2.20.1 |
46 | 45 | ||
47 | 46 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The CMSDK timer behaviour is that an interrupt is triggered when the | ||
2 | counter counts down from 1 to 0; however one is not triggered if the | ||
3 | counter is manually set to 0 by a guest write to the counter register. | ||
4 | Currently ptimer can't handle this; add a policy option to allow | ||
5 | a ptimer user to request this behaviour. | ||
6 | 1 | ||
7 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
8 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
9 | Tested-by: Guenter Roeck <linux@roeck-us.net> | ||
10 | Message-id: 20180703171044.9503-2-peter.maydell@linaro.org | ||
11 | --- | ||
12 | include/hw/ptimer.h | 9 +++++++++ | ||
13 | hw/core/ptimer.c | 22 +++++++++++++++++++++- | ||
14 | tests/ptimer-test.c | 25 +++++++++++++++++++------ | ||
15 | 3 files changed, 49 insertions(+), 7 deletions(-) | ||
16 | |||
17 | diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h | ||
18 | index XXXXXXX..XXXXXXX 100644 | ||
19 | --- a/include/hw/ptimer.h | ||
20 | +++ b/include/hw/ptimer.h | ||
21 | @@ -XXX,XX +XXX,XX @@ | ||
22 | * not the one less. */ | ||
23 | #define PTIMER_POLICY_NO_COUNTER_ROUND_DOWN (1 << 4) | ||
24 | |||
25 | +/* | ||
26 | + * Starting to run with a zero counter, or setting the counter to "0" via | ||
27 | + * ptimer_set_count() or ptimer_set_limit() will not trigger the timer | ||
28 | + * (though it will cause a reload). Only a counter decrement to "0" | ||
29 | + * will cause a trigger. Not compatible with NO_IMMEDIATE_TRIGGER; | ||
30 | + * ptimer_init() will assert() that you don't set both. | ||
31 | + */ | ||
32 | +#define PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT (1 << 5) | ||
33 | + | ||
34 | /* ptimer.c */ | ||
35 | typedef struct ptimer_state ptimer_state; | ||
36 | typedef void (*ptimer_cb)(void *opaque); | ||
37 | diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c | ||
38 | index XXXXXXX..XXXXXXX 100644 | ||
39 | --- a/hw/core/ptimer.c | ||
40 | +++ b/hw/core/ptimer.c | ||
41 | @@ -XXX,XX +XXX,XX @@ static void ptimer_reload(ptimer_state *s, int delta_adjust) | ||
42 | uint32_t period_frac = s->period_frac; | ||
43 | uint64_t period = s->period; | ||
44 | uint64_t delta = s->delta; | ||
45 | + bool suppress_trigger = false; | ||
46 | |||
47 | - if (delta == 0 && !(s->policy_mask & PTIMER_POLICY_NO_IMMEDIATE_TRIGGER)) { | ||
48 | + /* | ||
49 | + * Note that if delta_adjust is 0 then we must be here because of | ||
50 | + * a count register write or timer start, not because of timer expiry. | ||
51 | + * In that case the policy might require us to suppress the timer trigger | ||
52 | + * that we would otherwise generate for a zero delta. | ||
53 | + */ | ||
54 | + if (delta_adjust == 0 && | ||
55 | + (s->policy_mask & PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT)) { | ||
56 | + suppress_trigger = true; | ||
57 | + } | ||
58 | + if (delta == 0 && !(s->policy_mask & PTIMER_POLICY_NO_IMMEDIATE_TRIGGER) | ||
59 | + && !suppress_trigger) { | ||
60 | ptimer_trigger(s); | ||
61 | } | ||
62 | |||
63 | @@ -XXX,XX +XXX,XX @@ ptimer_state *ptimer_init(QEMUBH *bh, uint8_t policy_mask) | ||
64 | s->bh = bh; | ||
65 | s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, ptimer_tick, s); | ||
66 | s->policy_mask = policy_mask; | ||
67 | + | ||
68 | + /* | ||
69 | + * These two policies are incompatible -- trigger-on-decrement implies | ||
70 | + * a timer trigger when the count becomes 0, but no-immediate-trigger | ||
71 | + * implies a trigger when the count stops being 0. | ||
72 | + */ | ||
73 | + assert(!((policy_mask & PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT) && | ||
74 | + (policy_mask & PTIMER_POLICY_NO_IMMEDIATE_TRIGGER))); | ||
75 | return s; | ||
76 | } | ||
77 | |||
78 | diff --git a/tests/ptimer-test.c b/tests/ptimer-test.c | ||
79 | index XXXXXXX..XXXXXXX 100644 | ||
80 | --- a/tests/ptimer-test.c | ||
81 | +++ b/tests/ptimer-test.c | ||
82 | @@ -XXX,XX +XXX,XX @@ static void check_periodic(gconstpointer arg) | ||
83 | bool no_immediate_trigger = (*policy & PTIMER_POLICY_NO_IMMEDIATE_TRIGGER); | ||
84 | bool no_immediate_reload = (*policy & PTIMER_POLICY_NO_IMMEDIATE_RELOAD); | ||
85 | bool no_round_down = (*policy & PTIMER_POLICY_NO_COUNTER_ROUND_DOWN); | ||
86 | + bool trig_only_on_dec = (*policy & PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT); | ||
87 | |||
88 | triggered = false; | ||
89 | |||
90 | @@ -XXX,XX +XXX,XX @@ static void check_periodic(gconstpointer arg) | ||
91 | g_assert_cmpuint(ptimer_get_count(ptimer), ==, | ||
92 | no_immediate_reload ? 0 : 10); | ||
93 | |||
94 | - if (no_immediate_trigger) { | ||
95 | + if (no_immediate_trigger || trig_only_on_dec) { | ||
96 | g_assert_false(triggered); | ||
97 | } else { | ||
98 | g_assert_true(triggered); | ||
99 | @@ -XXX,XX +XXX,XX @@ static void check_run_with_delta_0(gconstpointer arg) | ||
100 | bool no_immediate_trigger = (*policy & PTIMER_POLICY_NO_IMMEDIATE_TRIGGER); | ||
101 | bool no_immediate_reload = (*policy & PTIMER_POLICY_NO_IMMEDIATE_RELOAD); | ||
102 | bool no_round_down = (*policy & PTIMER_POLICY_NO_COUNTER_ROUND_DOWN); | ||
103 | + bool trig_only_on_dec = (*policy & PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT); | ||
104 | |||
105 | triggered = false; | ||
106 | |||
107 | @@ -XXX,XX +XXX,XX @@ static void check_run_with_delta_0(gconstpointer arg) | ||
108 | g_assert_cmpuint(ptimer_get_count(ptimer), ==, | ||
109 | no_immediate_reload ? 0 : 99); | ||
110 | |||
111 | - if (no_immediate_trigger) { | ||
112 | + if (no_immediate_trigger || trig_only_on_dec) { | ||
113 | g_assert_false(triggered); | ||
114 | } else { | ||
115 | g_assert_true(triggered); | ||
116 | @@ -XXX,XX +XXX,XX @@ static void check_run_with_delta_0(gconstpointer arg) | ||
117 | g_assert_cmpuint(ptimer_get_count(ptimer), ==, | ||
118 | no_immediate_reload ? 0 : 99); | ||
119 | |||
120 | - if (no_immediate_trigger) { | ||
121 | + if (no_immediate_trigger || trig_only_on_dec) { | ||
122 | g_assert_false(triggered); | ||
123 | } else { | ||
124 | g_assert_true(triggered); | ||
125 | @@ -XXX,XX +XXX,XX @@ static void check_periodic_with_load_0(gconstpointer arg) | ||
126 | ptimer_state *ptimer = ptimer_init(bh, *policy); | ||
127 | bool continuous_trigger = (*policy & PTIMER_POLICY_CONTINUOUS_TRIGGER); | ||
128 | bool no_immediate_trigger = (*policy & PTIMER_POLICY_NO_IMMEDIATE_TRIGGER); | ||
129 | + bool trig_only_on_dec = (*policy & PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT); | ||
130 | |||
131 | triggered = false; | ||
132 | |||
133 | @@ -XXX,XX +XXX,XX @@ static void check_periodic_with_load_0(gconstpointer arg) | ||
134 | |||
135 | g_assert_cmpuint(ptimer_get_count(ptimer), ==, 0); | ||
136 | |||
137 | - if (no_immediate_trigger) { | ||
138 | + if (no_immediate_trigger || trig_only_on_dec) { | ||
139 | g_assert_false(triggered); | ||
140 | } else { | ||
141 | g_assert_true(triggered); | ||
142 | @@ -XXX,XX +XXX,XX @@ static void check_oneshot_with_load_0(gconstpointer arg) | ||
143 | QEMUBH *bh = qemu_bh_new(ptimer_trigger, NULL); | ||
144 | ptimer_state *ptimer = ptimer_init(bh, *policy); | ||
145 | bool no_immediate_trigger = (*policy & PTIMER_POLICY_NO_IMMEDIATE_TRIGGER); | ||
146 | + bool trig_only_on_dec = (*policy & PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT); | ||
147 | |||
148 | triggered = false; | ||
149 | |||
150 | @@ -XXX,XX +XXX,XX @@ static void check_oneshot_with_load_0(gconstpointer arg) | ||
151 | |||
152 | g_assert_cmpuint(ptimer_get_count(ptimer), ==, 0); | ||
153 | |||
154 | - if (no_immediate_trigger) { | ||
155 | + if (no_immediate_trigger || trig_only_on_dec) { | ||
156 | g_assert_false(triggered); | ||
157 | } else { | ||
158 | g_assert_true(triggered); | ||
159 | @@ -XXX,XX +XXX,XX @@ static void add_ptimer_tests(uint8_t policy) | ||
160 | g_strlcat(policy_name, "no_counter_rounddown,", 256); | ||
161 | } | ||
162 | |||
163 | + if (policy & PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT) { | ||
164 | + g_strlcat(policy_name, "trigger_only_on_decrement,", 256); | ||
165 | + } | ||
166 | + | ||
167 | g_test_add_data_func_full( | ||
168 | tmp = g_strdup_printf("/ptimer/set_count policy=%s", policy_name), | ||
169 | g_memdup(&policy, 1), check_set_count, g_free); | ||
170 | @@ -XXX,XX +XXX,XX @@ static void add_ptimer_tests(uint8_t policy) | ||
171 | |||
172 | static void add_all_ptimer_policies_comb_tests(void) | ||
173 | { | ||
174 | - int last_policy = PTIMER_POLICY_NO_COUNTER_ROUND_DOWN; | ||
175 | + int last_policy = PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT; | ||
176 | int policy = PTIMER_POLICY_DEFAULT; | ||
177 | |||
178 | for (; policy < (last_policy << 1); policy++) { | ||
179 | + if ((policy & PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT) && | ||
180 | + (policy & PTIMER_POLICY_NO_IMMEDIATE_TRIGGER)) { | ||
181 | + /* Incompatible policy flag settings -- don't try to test them */ | ||
182 | + continue; | ||
183 | + } | ||
184 | add_ptimer_tests(policy); | ||
185 | } | ||
186 | } | ||
187 | -- | ||
188 | 2.17.1 | ||
189 | |||
190 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The CMSDK timer interrupt triggers when the counter goes from 1 to 0, | ||
2 | so we want to trigger immediately, rather than waiting for a | ||
3 | clock cycle. Drop the incorrect NO_IMMEDIATE_TRIGGER setting. | ||
4 | We also do not want to get an interrupt if the guest sets the | ||
5 | counter directly to zero, so use the new TRIGGER_ONLY_ON_DECREMENT | ||
6 | policy. | ||
7 | 1 | ||
8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
9 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
10 | Tested-by: Guenter Roeck <linux@roeck-us.net> | ||
11 | Message-id: 20180703171044.9503-3-peter.maydell@linaro.org | ||
12 | --- | ||
13 | hw/timer/cmsdk-apb-timer.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/hw/timer/cmsdk-apb-timer.c b/hw/timer/cmsdk-apb-timer.c | ||
17 | index XXXXXXX..XXXXXXX 100644 | ||
18 | --- a/hw/timer/cmsdk-apb-timer.c | ||
19 | +++ b/hw/timer/cmsdk-apb-timer.c | ||
20 | @@ -XXX,XX +XXX,XX @@ static void cmsdk_apb_timer_realize(DeviceState *dev, Error **errp) | ||
21 | bh = qemu_bh_new(cmsdk_apb_timer_tick, s); | ||
22 | s->timer = ptimer_init(bh, | ||
23 | PTIMER_POLICY_WRAP_AFTER_ONE_PERIOD | | ||
24 | - PTIMER_POLICY_NO_IMMEDIATE_TRIGGER | | ||
25 | + PTIMER_POLICY_TRIGGER_ONLY_ON_DECREMENT | | ||
26 | PTIMER_POLICY_NO_IMMEDIATE_RELOAD | | ||
27 | PTIMER_POLICY_NO_COUNTER_ROUND_DOWN); | ||
28 | |||
29 | -- | ||
30 | 2.17.1 | ||
31 | |||
32 | diff view generated by jsdifflib |
1 | From: Guenter Roeck <linux@roeck-us.net> | 1 | From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com> |
---|---|---|---|
2 | 2 | ||
3 | The CMSDK APB timer is currently always configured as periodic timer. | 3 | Add the CRP as unimplemented thus avoiding bus errors when |
4 | This results in the following messages when trying to boot Linux. | 4 | guests access these registers. |
5 | 5 | ||
6 | Timer with delta zero, disabling | 6 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> |
7 | 7 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | |
8 | If the timer limit set with the RELOAD command is 0, the timer | 8 | Reviewed-by: Luc Michel <luc.michel@greensocs.com> |
9 | needs to be enabled as one-shot timer. | 9 | Message-id: 20191115154734.26449-2-edgar.iglesias@gmail.com |
10 | |||
11 | Signed-off-by: Guenter Roeck <linux@roeck-us.net> | ||
12 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
13 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
14 | Tested-by: Guenter Roeck <linux@roeck-us.net> | ||
15 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
16 | --- | 11 | --- |
17 | hw/timer/cmsdk-apb-timer.c | 2 +- | 12 | include/hw/arm/xlnx-versal.h | 3 +++ |
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | hw/arm/xlnx-versal.c | 2 ++ |
14 | 2 files changed, 5 insertions(+) | ||
19 | 15 | ||
20 | diff --git a/hw/timer/cmsdk-apb-timer.c b/hw/timer/cmsdk-apb-timer.c | 16 | diff --git a/include/hw/arm/xlnx-versal.h b/include/hw/arm/xlnx-versal.h |
21 | index XXXXXXX..XXXXXXX 100644 | 17 | index XXXXXXX..XXXXXXX 100644 |
22 | --- a/hw/timer/cmsdk-apb-timer.c | 18 | --- a/include/hw/arm/xlnx-versal.h |
23 | +++ b/hw/timer/cmsdk-apb-timer.c | 19 | +++ b/include/hw/arm/xlnx-versal.h |
24 | @@ -XXX,XX +XXX,XX @@ static void cmsdk_apb_timer_write(void *opaque, hwaddr offset, uint64_t value, | 20 | @@ -XXX,XX +XXX,XX @@ typedef struct Versal { |
25 | } | 21 | #define MM_IOU_SCNTRS_SIZE 0x10000 |
26 | s->ctrl = value & 0xf; | 22 | #define MM_FPD_CRF 0xfd1a0000U |
27 | if (s->ctrl & R_CTRL_EN_MASK) { | 23 | #define MM_FPD_CRF_SIZE 0x140000 |
28 | - ptimer_run(s->timer, 0); | 24 | + |
29 | + ptimer_run(s->timer, ptimer_get_limit(s->timer) == 0); | 25 | +#define MM_PMC_CRP 0xf1260000U |
30 | } else { | 26 | +#define MM_PMC_CRP_SIZE 0x10000 |
31 | ptimer_stop(s->timer); | 27 | #endif |
32 | } | 28 | diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c |
29 | index XXXXXXX..XXXXXXX 100644 | ||
30 | --- a/hw/arm/xlnx-versal.c | ||
31 | +++ b/hw/arm/xlnx-versal.c | ||
32 | @@ -XXX,XX +XXX,XX @@ static void versal_unimp(Versal *s) | ||
33 | MM_CRL, MM_CRL_SIZE); | ||
34 | versal_unimp_area(s, "crf", &s->mr_ps, | ||
35 | MM_FPD_CRF, MM_FPD_CRF_SIZE); | ||
36 | + versal_unimp_area(s, "crp", &s->mr_ps, | ||
37 | + MM_PMC_CRP, MM_PMC_CRP_SIZE); | ||
38 | versal_unimp_area(s, "iou-scntr", &s->mr_ps, | ||
39 | MM_IOU_SCNTR, MM_IOU_SCNTR_SIZE); | ||
40 | versal_unimp_area(s, "iou-scntr-seucre", &s->mr_ps, | ||
33 | -- | 41 | -- |
34 | 2.17.1 | 42 | 2.20.1 |
35 | 43 | ||
36 | 44 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | If the CMSDK APB timer is set up with a zero RELOAD value | ||
2 | then it will count down to zero, fire once and then stay | ||
3 | at zero. From the point of view of the ptimer system, the | ||
4 | timer is disabled; but the enable bit in the CTRL register | ||
5 | is still set and if the guest subsequently writes to the | ||
6 | RELOAD or VALUE registers this should cause the timer to | ||
7 | start counting down again. | ||
8 | 1 | ||
9 | Add code to the write paths for RELOAD and VALUE so that | ||
10 | we correctly restart the timer in this situation. | ||
11 | |||
12 | Conversely, if the new RELOAD and VALUE are both zero, | ||
13 | we should stop the ptimer. | ||
14 | |||
15 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
16 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
17 | Tested-by: Guenter Roeck <linux@roeck-us.net> | ||
18 | Message-id: 20180703171044.9503-5-peter.maydell@linaro.org | ||
19 | --- | ||
20 | hw/timer/cmsdk-apb-timer.c | 16 ++++++++++++++++ | ||
21 | 1 file changed, 16 insertions(+) | ||
22 | |||
23 | diff --git a/hw/timer/cmsdk-apb-timer.c b/hw/timer/cmsdk-apb-timer.c | ||
24 | index XXXXXXX..XXXXXXX 100644 | ||
25 | --- a/hw/timer/cmsdk-apb-timer.c | ||
26 | +++ b/hw/timer/cmsdk-apb-timer.c | ||
27 | @@ -XXX,XX +XXX,XX @@ static void cmsdk_apb_timer_write(void *opaque, hwaddr offset, uint64_t value, | ||
28 | break; | ||
29 | case A_RELOAD: | ||
30 | /* Writing to reload also sets the current timer value */ | ||
31 | + if (!value) { | ||
32 | + ptimer_stop(s->timer); | ||
33 | + } | ||
34 | ptimer_set_limit(s->timer, value, 1); | ||
35 | + if (value && (s->ctrl & R_CTRL_EN_MASK)) { | ||
36 | + /* | ||
37 | + * Make sure timer is running (it might have stopped if this | ||
38 | + * was an expired one-shot timer) | ||
39 | + */ | ||
40 | + ptimer_run(s->timer, 0); | ||
41 | + } | ||
42 | break; | ||
43 | case A_VALUE: | ||
44 | + if (!value && !ptimer_get_limit(s->timer)) { | ||
45 | + ptimer_stop(s->timer); | ||
46 | + } | ||
47 | ptimer_set_count(s->timer, value); | ||
48 | + if (value && (s->ctrl & R_CTRL_EN_MASK)) { | ||
49 | + ptimer_run(s->timer, ptimer_get_limit(s->timer) == 0); | ||
50 | + } | ||
51 | break; | ||
52 | case A_INTSTATUS: | ||
53 | /* Just one bit, which is W1C. */ | ||
54 | -- | ||
55 | 2.17.1 | ||
56 | |||
57 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Richard Henderson <richard.henderson@linaro.org> | ||
2 | 1 | ||
3 | These instructions must perform the sve_access_check, but | ||
4 | since they are implemented as NOPs there is no generated | ||
5 | code to elide when the access check fails. | ||
6 | |||
7 | Fixes: Coverity issues 1393780 & 1393779. | ||
8 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
9 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
11 | --- | ||
12 | target/arm/translate-sve.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c | ||
16 | index XXXXXXX..XXXXXXX 100644 | ||
17 | --- a/target/arm/translate-sve.c | ||
18 | +++ b/target/arm/translate-sve.c | ||
19 | @@ -XXX,XX +XXX,XX @@ static bool trans_ST1_zpiz(DisasContext *s, arg_ST1_zpiz *a, uint32_t insn) | ||
20 | static bool trans_PRF(DisasContext *s, arg_PRF *a, uint32_t insn) | ||
21 | { | ||
22 | /* Prefetch is a nop within QEMU. */ | ||
23 | - sve_access_check(s); | ||
24 | + (void)sve_access_check(s); | ||
25 | return true; | ||
26 | } | ||
27 | |||
28 | @@ -XXX,XX +XXX,XX @@ static bool trans_PRF_rr(DisasContext *s, arg_PRF_rr *a, uint32_t insn) | ||
29 | return false; | ||
30 | } | ||
31 | /* Prefetch is a nop within QEMU. */ | ||
32 | - sve_access_check(s); | ||
33 | + (void)sve_access_check(s); | ||
34 | return true; | ||
35 | } | ||
36 | |||
37 | -- | ||
38 | 2.17.1 | ||
39 | |||
40 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Richard Henderson <richard.henderson@linaro.org> | ||
2 | 1 | ||
3 | Normally this is automatic in the size restrictions that are placed | ||
4 | on vector sizes coming from the implementation. However, for the | ||
5 | legitimate size tuple [oprsz=8, maxsz=32], we need to clear the final | ||
6 | 24 bytes of the vector register. Without this check, do_dup selects | ||
7 | TCG_TYPE_V128 and clears only 16 bytes. | ||
8 | |||
9 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
10 | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> | ||
11 | Tested-by: Alex Bennée <alex.bennee@linaro.org> | ||
12 | Message-id: 20180705191929.30773-2-richard.henderson@linaro.org | ||
13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
14 | --- | ||
15 | tcg/tcg-op-gvec.c | 7 +++++-- | ||
16 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c | ||
19 | index XXXXXXX..XXXXXXX 100644 | ||
20 | --- a/tcg/tcg-op-gvec.c | ||
21 | +++ b/tcg/tcg-op-gvec.c | ||
22 | @@ -XXX,XX +XXX,XX @@ void tcg_gen_gvec_4_ptr(uint32_t dofs, uint32_t aofs, uint32_t bofs, | ||
23 | in units of LNSZ. This limits the expansion of inline code. */ | ||
24 | static inline bool check_size_impl(uint32_t oprsz, uint32_t lnsz) | ||
25 | { | ||
26 | - uint32_t lnct = oprsz / lnsz; | ||
27 | - return lnct >= 1 && lnct <= MAX_UNROLL; | ||
28 | + if (oprsz % lnsz == 0) { | ||
29 | + uint32_t lnct = oprsz / lnsz; | ||
30 | + return lnct >= 1 && lnct <= MAX_UNROLL; | ||
31 | + } | ||
32 | + return false; | ||
33 | } | ||
34 | |||
35 | static void expand_clr(uint32_t dofs, uint32_t maxsz); | ||
36 | -- | ||
37 | 2.17.1 | ||
38 | |||
39 | diff view generated by jsdifflib |
1 | From: Richard Henderson <richard.henderson@linaro.org> | 1 | From: Marc Zyngier <maz@kernel.org> |
---|---|---|---|
2 | 2 | ||
3 | Use MAKE_64BIT_MASK instead of open-coding. Remove an odd | 3 | The ARMv8 ARM states when executing at EL2, EL3 or Secure EL1, |
4 | vector size check that is unlikely to be more profitable | 4 | ISR_EL1 shows the pending status of the physical IRQ, FIQ, or |
5 | than 3 64-bit integer stores. Correct the iteration for WORD | 5 | SError interrupts. |
6 | to avoid writing too much data. | ||
7 | 6 | ||
8 | Fixes RISU tests of PTRUE for VL 256. | 7 | Unfortunately, QEMU's implementation only considers the HCR_EL2 |
8 | bits, and ignores the current exception level. This means a hypervisor | ||
9 | trying to look at its own interrupt state actually sees the guest | ||
10 | state, which is unexpected and breaks KVM as of Linux 5.3. | ||
9 | 11 | ||
10 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 12 | Instead, check for the running EL and return the physical bits |
11 | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> | 13 | if not running in a virtualized context. |
12 | Tested-by: Alex Bennée <alex.bennee@linaro.org> | 14 | |
13 | Message-id: 20180705191929.30773-3-richard.henderson@linaro.org | 15 | Fixes: 636540e9c40b |
16 | Cc: qemu-stable@nongnu.org | ||
17 | Reported-by: Quentin Perret <qperret@google.com> | ||
18 | Signed-off-by: Marc Zyngier <maz@kernel.org> | ||
19 | Message-id: 20191122135833.28953-1-maz@kernel.org | ||
20 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
21 | Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
14 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 22 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
15 | --- | 23 | --- |
16 | target/arm/translate-sve.c | 10 ++-------- | 24 | target/arm/helper.c | 7 +++++-- |
17 | 1 file changed, 2 insertions(+), 8 deletions(-) | 25 | 1 file changed, 5 insertions(+), 2 deletions(-) |
18 | 26 | ||
19 | diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c | 27 | diff --git a/target/arm/helper.c b/target/arm/helper.c |
20 | index XXXXXXX..XXXXXXX 100644 | 28 | index XXXXXXX..XXXXXXX 100644 |
21 | --- a/target/arm/translate-sve.c | 29 | --- a/target/arm/helper.c |
22 | +++ b/target/arm/translate-sve.c | 30 | +++ b/target/arm/helper.c |
23 | @@ -XXX,XX +XXX,XX @@ static bool do_predset(DisasContext *s, int esz, int rd, int pat, bool setflag) | 31 | @@ -XXX,XX +XXX,XX @@ static uint64_t isr_read(CPUARMState *env, const ARMCPRegInfo *ri) |
24 | setsz = numelem << esz; | 32 | CPUState *cs = env_cpu(env); |
25 | lastword = word = pred_esz_masks[esz]; | 33 | uint64_t hcr_el2 = arm_hcr_el2_eff(env); |
26 | if (setsz % 64) { | 34 | uint64_t ret = 0; |
27 | - lastword &= ~(-1ull << (setsz % 64)); | 35 | + bool allow_virt = (arm_current_el(env) == 1 && |
28 | + lastword &= MAKE_64BIT_MASK(0, setsz % 64); | 36 | + (!arm_is_secure_below_el3(env) || |
37 | + (env->cp15.scr_el3 & SCR_EEL2))); | ||
38 | |||
39 | - if (hcr_el2 & HCR_IMO) { | ||
40 | + if (allow_virt && (hcr_el2 & HCR_IMO)) { | ||
41 | if (cs->interrupt_request & CPU_INTERRUPT_VIRQ) { | ||
42 | ret |= CPSR_I; | ||
43 | } | ||
44 | @@ -XXX,XX +XXX,XX @@ static uint64_t isr_read(CPUARMState *env, const ARMCPRegInfo *ri) | ||
29 | } | 45 | } |
30 | } | 46 | } |
31 | 47 | ||
32 | @@ -XXX,XX +XXX,XX @@ static bool do_predset(DisasContext *s, int esz, int rd, int pat, bool setflag) | 48 | - if (hcr_el2 & HCR_FMO) { |
33 | tcg_gen_gvec_dup64i(ofs, oprsz, maxsz, word); | 49 | + if (allow_virt && (hcr_el2 & HCR_FMO)) { |
34 | goto done; | 50 | if (cs->interrupt_request & CPU_INTERRUPT_VFIQ) { |
51 | ret |= CPSR_F; | ||
35 | } | 52 | } |
36 | - if (oprsz * 8 == setsz + 8) { | ||
37 | - tcg_gen_gvec_dup64i(ofs, oprsz, maxsz, word); | ||
38 | - tcg_gen_movi_i64(t, 0); | ||
39 | - tcg_gen_st_i64(t, cpu_env, ofs + oprsz - 8); | ||
40 | - goto done; | ||
41 | - } | ||
42 | } | ||
43 | |||
44 | setsz /= 8; | ||
45 | fullsz /= 8; | ||
46 | |||
47 | tcg_gen_movi_i64(t, word); | ||
48 | - for (i = 0; i < setsz; i += 8) { | ||
49 | + for (i = 0; i < QEMU_ALIGN_DOWN(setsz, 8); i += 8) { | ||
50 | tcg_gen_st_i64(t, cpu_env, ofs + i); | ||
51 | } | ||
52 | if (lastword != word) { | ||
53 | -- | 53 | -- |
54 | 2.17.1 | 54 | 2.20.1 |
55 | 55 | ||
56 | 56 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <f4bug@amsat.org> | 1 | From: Marc Zyngier <maz@kernel.org> |
---|---|---|---|
2 | 2 | ||
3 | DeviceClass::reset models a "cold power-on" reset which can | 3 | HCR_EL2.TID3 mandates that access from EL1 to a long list of id |
4 | also be used to powercycle a device; but there is no "hot reset" | 4 | registers traps to EL2, and QEMU has so far ignored this requirement. |
5 | (a.k.a. soft-reset) method available. | 5 | |
6 | 6 | This breaks (among other things) KVM guests that have PtrAuth enabled, | |
7 | The OMAP MMC Power-Up Control bit is not designed to powercycle | 7 | while the hypervisor doesn't want to expose the feature to its guest. |
8 | a card, but to disable it without powering it off (pseudo-reset): | 8 | To achieve this, KVM traps the ID registers (ID_AA64ISAR1_EL1 in this |
9 | 9 | case), and masks out the unsupported feature. | |
10 | Multimedia Card (MMC/SD/SDIO) Interface [SPRU765A] | 10 | |
11 | 11 | QEMU not honoring the trap request means that the guest observes | |
12 | MMC_CON[11] Power-Up Control (POW) | 12 | that the feature is present in the HW, starts using it, and dies |
13 | This bit must be set to 1 before any valid transaction to either | 13 | a horrible death when KVM injects an UNDEF, because the feature |
14 | MMC/SD or SPI memory cards. | 14 | *really* isn't supported. |
15 | When 1, the card is considered powered-up and the controller core | 15 | |
16 | is enabled. | 16 | Do the right thing by trapping to EL2 if HCR_EL2.TID3 is set. |
17 | When 0, the card is considered powered-down (system dependent), | 17 | |
18 | and the controller core logic is in pseudo-reset state. This is, | 18 | Note that this change does not include trapping of the MVFR |
19 | the MMC_STAT flags and the FIFO pointers are reset, any access to | 19 | registers from AArch32 (they are accessed via the VMRS |
20 | MMC_DATA[DATA] has no effect, a write into the MMC.CMD register | 20 | instruction and need to be handled in a different way). |
21 | is ignored, and a setting of MMC_SPI[STR] to 1 is ignored. | 21 | |
22 | 22 | Reported-by: Will Deacon <will@kernel.org> | |
23 | By splitting the 'pseudo-reset' code out of the 'power-on' reset | 23 | Signed-off-by: Marc Zyngier <maz@kernel.org> |
24 | function, this patch fixes a latent bug in omap_mmc_write(MMC_CON)i | 24 | Tested-by: Will Deacon <will@kernel.org> |
25 | recently exposed by ecd219f7abb. | 25 | Message-id: 20191123115618.29230-1-maz@kernel.org |
26 | 26 | [PMM: added missing accessfn line for ID_AA4PFR2_EL1_RESERVED; | |
27 | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 27 | changed names of access functions to include _tid3] |
28 | Message-id: 20180706162155.8432-2-f4bug@amsat.org | ||
29 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 28 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
30 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 29 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
31 | --- | 30 | --- |
32 | hw/sd/omap_mmc.c | 14 +++++++++++--- | 31 | target/arm/helper.c | 76 +++++++++++++++++++++++++++++++++++++++++++++ |
33 | 1 file changed, 11 insertions(+), 3 deletions(-) | 32 | 1 file changed, 76 insertions(+) |
34 | 33 | ||
35 | diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c | 34 | diff --git a/target/arm/helper.c b/target/arm/helper.c |
36 | index XXXXXXX..XXXXXXX 100644 | 35 | index XXXXXXX..XXXXXXX 100644 |
37 | --- a/hw/sd/omap_mmc.c | 36 | --- a/target/arm/helper.c |
38 | +++ b/hw/sd/omap_mmc.c | 37 | +++ b/target/arm/helper.c |
39 | @@ -XXX,XX +XXX,XX @@ | 38 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo predinv_reginfo[] = { |
40 | /* | 39 | REGINFO_SENTINEL |
41 | * OMAP on-chip MMC/SD host emulation. | 40 | }; |
42 | * | 41 | |
43 | + * Datasheet: TI Multimedia Card (MMC/SD/SDIO) Interface (SPRU765A) | 42 | +static CPAccessResult access_aa64_tid3(CPUARMState *env, const ARMCPRegInfo *ri, |
44 | + * | 43 | + bool isread) |
45 | * Copyright (C) 2006-2007 Andrzej Zaborowski <balrog@zabor.org> | ||
46 | * | ||
47 | * This program is free software; you can redistribute it and/or | ||
48 | @@ -XXX,XX +XXX,XX @@ static void omap_mmc_update(void *opaque) | ||
49 | omap_mmc_interrupts_update(s); | ||
50 | } | ||
51 | |||
52 | +static void omap_mmc_pseudo_reset(struct omap_mmc_s *host) | ||
53 | +{ | 44 | +{ |
54 | + host->status = 0; | 45 | + if ((arm_current_el(env) < 2) && (arm_hcr_el2_eff(env) & HCR_TID3)) { |
55 | + host->fifo_len = 0; | 46 | + return CP_ACCESS_TRAP_EL2; |
47 | + } | ||
48 | + | ||
49 | + return CP_ACCESS_OK; | ||
56 | +} | 50 | +} |
57 | + | 51 | + |
58 | void omap_mmc_reset(struct omap_mmc_s *host) | 52 | +static CPAccessResult access_aa32_tid3(CPUARMState *env, const ARMCPRegInfo *ri, |
53 | + bool isread) | ||
54 | +{ | ||
55 | + if (arm_feature(env, ARM_FEATURE_V8)) { | ||
56 | + return access_aa64_tid3(env, ri, isread); | ||
57 | + } | ||
58 | + | ||
59 | + return CP_ACCESS_OK; | ||
60 | +} | ||
61 | + | ||
62 | void register_cp_regs_for_features(ARMCPU *cpu) | ||
59 | { | 63 | { |
60 | host->last_cmd = 0; | 64 | /* Register all the coprocessor registers based on feature bits */ |
61 | @@ -XXX,XX +XXX,XX @@ void omap_mmc_reset(struct omap_mmc_s *host) | 65 | @@ -XXX,XX +XXX,XX @@ void register_cp_regs_for_features(ARMCPU *cpu) |
62 | host->dw = 0; | 66 | { .name = "ID_PFR0", .state = ARM_CP_STATE_BOTH, |
63 | host->mode = 0; | 67 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 0, |
64 | host->enable = 0; | 68 | .access = PL1_R, .type = ARM_CP_CONST, |
65 | - host->status = 0; | 69 | + .accessfn = access_aa32_tid3, |
66 | host->mask = 0; | 70 | .resetvalue = cpu->id_pfr0 }, |
67 | host->cto = 0; | 71 | /* ID_PFR1 is not a plain ARM_CP_CONST because we don't know |
68 | host->dto = 0; | 72 | * the value of the GIC field until after we define these regs. |
69 | - host->fifo_len = 0; | 73 | @@ -XXX,XX +XXX,XX @@ void register_cp_regs_for_features(ARMCPU *cpu) |
70 | host->blen = 0; | 74 | { .name = "ID_PFR1", .state = ARM_CP_STATE_BOTH, |
71 | host->blen_counter = 0; | 75 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 1, |
72 | host->nblk = 0; | 76 | .access = PL1_R, .type = ARM_CP_NO_RAW, |
73 | @@ -XXX,XX +XXX,XX @@ void omap_mmc_reset(struct omap_mmc_s *host) | 77 | + .accessfn = access_aa32_tid3, |
74 | qemu_set_irq(host->coverswitch, host->cdet_state); | 78 | .readfn = id_pfr1_read, |
75 | host->clkdiv = 0; | 79 | .writefn = arm_cp_write_ignore }, |
76 | 80 | { .name = "ID_DFR0", .state = ARM_CP_STATE_BOTH, | |
77 | + omap_mmc_pseudo_reset(host); | 81 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 2, |
78 | + | 82 | .access = PL1_R, .type = ARM_CP_CONST, |
79 | /* Since we're still using the legacy SD API the card is not plugged | 83 | + .accessfn = access_aa32_tid3, |
80 | * into any bus, and we must reset it manually. When omap_mmc is | 84 | .resetvalue = cpu->id_dfr0 }, |
81 | * QOMified this must move into the QOM reset function. | 85 | { .name = "ID_AFR0", .state = ARM_CP_STATE_BOTH, |
82 | @@ -XXX,XX +XXX,XX @@ static void omap_mmc_write(void *opaque, hwaddr offset, | 86 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 3, |
83 | if (s->dw != 0 && s->lines < 4) | 87 | .access = PL1_R, .type = ARM_CP_CONST, |
84 | printf("4-bit SD bus enabled\n"); | 88 | + .accessfn = access_aa32_tid3, |
85 | if (!s->enable) | 89 | .resetvalue = cpu->id_afr0 }, |
86 | - omap_mmc_reset(s); | 90 | { .name = "ID_MMFR0", .state = ARM_CP_STATE_BOTH, |
87 | + omap_mmc_pseudo_reset(s); | 91 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 4, |
88 | break; | 92 | .access = PL1_R, .type = ARM_CP_CONST, |
89 | 93 | + .accessfn = access_aa32_tid3, | |
90 | case 0x10: /* MMC_STAT */ | 94 | .resetvalue = cpu->id_mmfr0 }, |
95 | { .name = "ID_MMFR1", .state = ARM_CP_STATE_BOTH, | ||
96 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 5, | ||
97 | .access = PL1_R, .type = ARM_CP_CONST, | ||
98 | + .accessfn = access_aa32_tid3, | ||
99 | .resetvalue = cpu->id_mmfr1 }, | ||
100 | { .name = "ID_MMFR2", .state = ARM_CP_STATE_BOTH, | ||
101 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 6, | ||
102 | .access = PL1_R, .type = ARM_CP_CONST, | ||
103 | + .accessfn = access_aa32_tid3, | ||
104 | .resetvalue = cpu->id_mmfr2 }, | ||
105 | { .name = "ID_MMFR3", .state = ARM_CP_STATE_BOTH, | ||
106 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 7, | ||
107 | .access = PL1_R, .type = ARM_CP_CONST, | ||
108 | + .accessfn = access_aa32_tid3, | ||
109 | .resetvalue = cpu->id_mmfr3 }, | ||
110 | { .name = "ID_ISAR0", .state = ARM_CP_STATE_BOTH, | ||
111 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 0, | ||
112 | .access = PL1_R, .type = ARM_CP_CONST, | ||
113 | + .accessfn = access_aa32_tid3, | ||
114 | .resetvalue = cpu->isar.id_isar0 }, | ||
115 | { .name = "ID_ISAR1", .state = ARM_CP_STATE_BOTH, | ||
116 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 1, | ||
117 | .access = PL1_R, .type = ARM_CP_CONST, | ||
118 | + .accessfn = access_aa32_tid3, | ||
119 | .resetvalue = cpu->isar.id_isar1 }, | ||
120 | { .name = "ID_ISAR2", .state = ARM_CP_STATE_BOTH, | ||
121 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 2, | ||
122 | .access = PL1_R, .type = ARM_CP_CONST, | ||
123 | + .accessfn = access_aa32_tid3, | ||
124 | .resetvalue = cpu->isar.id_isar2 }, | ||
125 | { .name = "ID_ISAR3", .state = ARM_CP_STATE_BOTH, | ||
126 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 3, | ||
127 | .access = PL1_R, .type = ARM_CP_CONST, | ||
128 | + .accessfn = access_aa32_tid3, | ||
129 | .resetvalue = cpu->isar.id_isar3 }, | ||
130 | { .name = "ID_ISAR4", .state = ARM_CP_STATE_BOTH, | ||
131 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 4, | ||
132 | .access = PL1_R, .type = ARM_CP_CONST, | ||
133 | + .accessfn = access_aa32_tid3, | ||
134 | .resetvalue = cpu->isar.id_isar4 }, | ||
135 | { .name = "ID_ISAR5", .state = ARM_CP_STATE_BOTH, | ||
136 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 5, | ||
137 | .access = PL1_R, .type = ARM_CP_CONST, | ||
138 | + .accessfn = access_aa32_tid3, | ||
139 | .resetvalue = cpu->isar.id_isar5 }, | ||
140 | { .name = "ID_MMFR4", .state = ARM_CP_STATE_BOTH, | ||
141 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 6, | ||
142 | .access = PL1_R, .type = ARM_CP_CONST, | ||
143 | + .accessfn = access_aa32_tid3, | ||
144 | .resetvalue = cpu->id_mmfr4 }, | ||
145 | { .name = "ID_ISAR6", .state = ARM_CP_STATE_BOTH, | ||
146 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 7, | ||
147 | .access = PL1_R, .type = ARM_CP_CONST, | ||
148 | + .accessfn = access_aa32_tid3, | ||
149 | .resetvalue = cpu->isar.id_isar6 }, | ||
150 | REGINFO_SENTINEL | ||
151 | }; | ||
152 | @@ -XXX,XX +XXX,XX @@ void register_cp_regs_for_features(ARMCPU *cpu) | ||
153 | { .name = "ID_AA64PFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
154 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 0, | ||
155 | .access = PL1_R, .type = ARM_CP_NO_RAW, | ||
156 | + .accessfn = access_aa64_tid3, | ||
157 | .readfn = id_aa64pfr0_read, | ||
158 | .writefn = arm_cp_write_ignore }, | ||
159 | { .name = "ID_AA64PFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
160 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 1, | ||
161 | .access = PL1_R, .type = ARM_CP_CONST, | ||
162 | + .accessfn = access_aa64_tid3, | ||
163 | .resetvalue = cpu->isar.id_aa64pfr1}, | ||
164 | { .name = "ID_AA64PFR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
165 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 2, | ||
166 | .access = PL1_R, .type = ARM_CP_CONST, | ||
167 | + .accessfn = access_aa64_tid3, | ||
168 | .resetvalue = 0 }, | ||
169 | { .name = "ID_AA64PFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
170 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 3, | ||
171 | .access = PL1_R, .type = ARM_CP_CONST, | ||
172 | + .accessfn = access_aa64_tid3, | ||
173 | .resetvalue = 0 }, | ||
174 | { .name = "ID_AA64ZFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
175 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 4, | ||
176 | .access = PL1_R, .type = ARM_CP_CONST, | ||
177 | + .accessfn = access_aa64_tid3, | ||
178 | /* At present, only SVEver == 0 is defined anyway. */ | ||
179 | .resetvalue = 0 }, | ||
180 | { .name = "ID_AA64PFR5_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
181 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 5, | ||
182 | .access = PL1_R, .type = ARM_CP_CONST, | ||
183 | + .accessfn = access_aa64_tid3, | ||
184 | .resetvalue = 0 }, | ||
185 | { .name = "ID_AA64PFR6_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
186 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 6, | ||
187 | .access = PL1_R, .type = ARM_CP_CONST, | ||
188 | + .accessfn = access_aa64_tid3, | ||
189 | .resetvalue = 0 }, | ||
190 | { .name = "ID_AA64PFR7_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
191 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 7, | ||
192 | .access = PL1_R, .type = ARM_CP_CONST, | ||
193 | + .accessfn = access_aa64_tid3, | ||
194 | .resetvalue = 0 }, | ||
195 | { .name = "ID_AA64DFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
196 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 0, | ||
197 | .access = PL1_R, .type = ARM_CP_CONST, | ||
198 | + .accessfn = access_aa64_tid3, | ||
199 | .resetvalue = cpu->id_aa64dfr0 }, | ||
200 | { .name = "ID_AA64DFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
201 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 1, | ||
202 | .access = PL1_R, .type = ARM_CP_CONST, | ||
203 | + .accessfn = access_aa64_tid3, | ||
204 | .resetvalue = cpu->id_aa64dfr1 }, | ||
205 | { .name = "ID_AA64DFR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
206 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 2, | ||
207 | .access = PL1_R, .type = ARM_CP_CONST, | ||
208 | + .accessfn = access_aa64_tid3, | ||
209 | .resetvalue = 0 }, | ||
210 | { .name = "ID_AA64DFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
211 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 3, | ||
212 | .access = PL1_R, .type = ARM_CP_CONST, | ||
213 | + .accessfn = access_aa64_tid3, | ||
214 | .resetvalue = 0 }, | ||
215 | { .name = "ID_AA64AFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
216 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 4, | ||
217 | .access = PL1_R, .type = ARM_CP_CONST, | ||
218 | + .accessfn = access_aa64_tid3, | ||
219 | .resetvalue = cpu->id_aa64afr0 }, | ||
220 | { .name = "ID_AA64AFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
221 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 5, | ||
222 | .access = PL1_R, .type = ARM_CP_CONST, | ||
223 | + .accessfn = access_aa64_tid3, | ||
224 | .resetvalue = cpu->id_aa64afr1 }, | ||
225 | { .name = "ID_AA64AFR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
226 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 6, | ||
227 | .access = PL1_R, .type = ARM_CP_CONST, | ||
228 | + .accessfn = access_aa64_tid3, | ||
229 | .resetvalue = 0 }, | ||
230 | { .name = "ID_AA64AFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
231 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 7, | ||
232 | .access = PL1_R, .type = ARM_CP_CONST, | ||
233 | + .accessfn = access_aa64_tid3, | ||
234 | .resetvalue = 0 }, | ||
235 | { .name = "ID_AA64ISAR0_EL1", .state = ARM_CP_STATE_AA64, | ||
236 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 0, | ||
237 | .access = PL1_R, .type = ARM_CP_CONST, | ||
238 | + .accessfn = access_aa64_tid3, | ||
239 | .resetvalue = cpu->isar.id_aa64isar0 }, | ||
240 | { .name = "ID_AA64ISAR1_EL1", .state = ARM_CP_STATE_AA64, | ||
241 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 1, | ||
242 | .access = PL1_R, .type = ARM_CP_CONST, | ||
243 | + .accessfn = access_aa64_tid3, | ||
244 | .resetvalue = cpu->isar.id_aa64isar1 }, | ||
245 | { .name = "ID_AA64ISAR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
246 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 2, | ||
247 | .access = PL1_R, .type = ARM_CP_CONST, | ||
248 | + .accessfn = access_aa64_tid3, | ||
249 | .resetvalue = 0 }, | ||
250 | { .name = "ID_AA64ISAR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
251 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 3, | ||
252 | .access = PL1_R, .type = ARM_CP_CONST, | ||
253 | + .accessfn = access_aa64_tid3, | ||
254 | .resetvalue = 0 }, | ||
255 | { .name = "ID_AA64ISAR4_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
256 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 4, | ||
257 | .access = PL1_R, .type = ARM_CP_CONST, | ||
258 | + .accessfn = access_aa64_tid3, | ||
259 | .resetvalue = 0 }, | ||
260 | { .name = "ID_AA64ISAR5_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
261 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 5, | ||
262 | .access = PL1_R, .type = ARM_CP_CONST, | ||
263 | + .accessfn = access_aa64_tid3, | ||
264 | .resetvalue = 0 }, | ||
265 | { .name = "ID_AA64ISAR6_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
266 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 6, | ||
267 | .access = PL1_R, .type = ARM_CP_CONST, | ||
268 | + .accessfn = access_aa64_tid3, | ||
269 | .resetvalue = 0 }, | ||
270 | { .name = "ID_AA64ISAR7_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
271 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 7, | ||
272 | .access = PL1_R, .type = ARM_CP_CONST, | ||
273 | + .accessfn = access_aa64_tid3, | ||
274 | .resetvalue = 0 }, | ||
275 | { .name = "ID_AA64MMFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
276 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 0, | ||
277 | .access = PL1_R, .type = ARM_CP_CONST, | ||
278 | + .accessfn = access_aa64_tid3, | ||
279 | .resetvalue = cpu->isar.id_aa64mmfr0 }, | ||
280 | { .name = "ID_AA64MMFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
281 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 1, | ||
282 | .access = PL1_R, .type = ARM_CP_CONST, | ||
283 | + .accessfn = access_aa64_tid3, | ||
284 | .resetvalue = cpu->isar.id_aa64mmfr1 }, | ||
285 | { .name = "ID_AA64MMFR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
286 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 2, | ||
287 | .access = PL1_R, .type = ARM_CP_CONST, | ||
288 | + .accessfn = access_aa64_tid3, | ||
289 | .resetvalue = 0 }, | ||
290 | { .name = "ID_AA64MMFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
291 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 3, | ||
292 | .access = PL1_R, .type = ARM_CP_CONST, | ||
293 | + .accessfn = access_aa64_tid3, | ||
294 | .resetvalue = 0 }, | ||
295 | { .name = "ID_AA64MMFR4_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
296 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 4, | ||
297 | .access = PL1_R, .type = ARM_CP_CONST, | ||
298 | + .accessfn = access_aa64_tid3, | ||
299 | .resetvalue = 0 }, | ||
300 | { .name = "ID_AA64MMFR5_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
301 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 5, | ||
302 | .access = PL1_R, .type = ARM_CP_CONST, | ||
303 | + .accessfn = access_aa64_tid3, | ||
304 | .resetvalue = 0 }, | ||
305 | { .name = "ID_AA64MMFR6_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
306 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 6, | ||
307 | .access = PL1_R, .type = ARM_CP_CONST, | ||
308 | + .accessfn = access_aa64_tid3, | ||
309 | .resetvalue = 0 }, | ||
310 | { .name = "ID_AA64MMFR7_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
311 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 7, | ||
312 | .access = PL1_R, .type = ARM_CP_CONST, | ||
313 | + .accessfn = access_aa64_tid3, | ||
314 | .resetvalue = 0 }, | ||
315 | { .name = "MVFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
316 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 0, | ||
317 | .access = PL1_R, .type = ARM_CP_CONST, | ||
318 | + .accessfn = access_aa64_tid3, | ||
319 | .resetvalue = cpu->isar.mvfr0 }, | ||
320 | { .name = "MVFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
321 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 1, | ||
322 | .access = PL1_R, .type = ARM_CP_CONST, | ||
323 | + .accessfn = access_aa64_tid3, | ||
324 | .resetvalue = cpu->isar.mvfr1 }, | ||
325 | { .name = "MVFR2_EL1", .state = ARM_CP_STATE_AA64, | ||
326 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 2, | ||
327 | .access = PL1_R, .type = ARM_CP_CONST, | ||
328 | + .accessfn = access_aa64_tid3, | ||
329 | .resetvalue = cpu->isar.mvfr2 }, | ||
330 | { .name = "MVFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
331 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 3, | ||
332 | .access = PL1_R, .type = ARM_CP_CONST, | ||
333 | + .accessfn = access_aa64_tid3, | ||
334 | .resetvalue = 0 }, | ||
335 | { .name = "MVFR4_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
336 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 4, | ||
337 | .access = PL1_R, .type = ARM_CP_CONST, | ||
338 | + .accessfn = access_aa64_tid3, | ||
339 | .resetvalue = 0 }, | ||
340 | { .name = "MVFR5_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
341 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 5, | ||
342 | .access = PL1_R, .type = ARM_CP_CONST, | ||
343 | + .accessfn = access_aa64_tid3, | ||
344 | .resetvalue = 0 }, | ||
345 | { .name = "MVFR6_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
346 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 6, | ||
347 | .access = PL1_R, .type = ARM_CP_CONST, | ||
348 | + .accessfn = access_aa64_tid3, | ||
349 | .resetvalue = 0 }, | ||
350 | { .name = "MVFR7_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
351 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 7, | ||
352 | .access = PL1_R, .type = ARM_CP_CONST, | ||
353 | + .accessfn = access_aa64_tid3, | ||
354 | .resetvalue = 0 }, | ||
355 | { .name = "PMCEID0", .state = ARM_CP_STATE_AA32, | ||
356 | .cp = 15, .opc1 = 0, .crn = 9, .crm = 12, .opc2 = 6, | ||
91 | -- | 357 | -- |
92 | 2.17.1 | 358 | 2.20.1 |
93 | 359 | ||
94 | 360 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | commit b08199c6fbea1 accidentally added a reference to a doc | ||
2 | comment to a nonexistent memory_region_allocate_aux_memory(). | ||
3 | This was a leftover from a previous version of the patchset | ||
4 | which defined memory_region_allocate_aux_memory() for | ||
5 | "allocate RAM MemoryRegion and register it for migration" | ||
6 | and left "memory_region_init_ram()" with its original semantics | ||
7 | of "allocate RAM MR but do not register for migration". In | ||
8 | the end we decided on the approach of "memory_region_init_ram() | ||
9 | registers the MR for migration, and memory_region_init_ram_nomigrate() | ||
10 | is a new function which does not", but this comment change | ||
11 | got left in by mistake. Revert that part of the commit. | ||
12 | 1 | ||
13 | Reported-by: Thomas Huth <huth@tuxfamily.org> | ||
14 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
15 | Message-id: 20180702130605.13611-1-peter.maydell@linaro.org | ||
16 | --- | ||
17 | include/hw/boards.h | 3 +-- | ||
18 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/include/hw/boards.h b/include/hw/boards.h | ||
21 | index XXXXXXX..XXXXXXX 100644 | ||
22 | --- a/include/hw/boards.h | ||
23 | +++ b/include/hw/boards.h | ||
24 | @@ -XXX,XX +XXX,XX @@ | ||
25 | * | ||
26 | * Smaller pieces of memory (display RAM, static RAMs, etc) don't need | ||
27 | * to be backed via the -mem-path memory backend and can simply | ||
28 | - * be created via memory_region_allocate_aux_memory() or | ||
29 | - * memory_region_init_ram(). | ||
30 | + * be created via memory_region_init_ram(). | ||
31 | */ | ||
32 | void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner, | ||
33 | const char *name, | ||
34 | -- | ||
35 | 2.17.1 | ||
36 | |||
37 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | Currently we use memory_region_init_rom_nomigrate() to create | ||
2 | the "dp3893x-prom" memory region, and we don't manually register | ||
3 | it with vmstate_register_ram(). This currently means that its | ||
4 | contents are migrated but as a ram block whose name is the empty | ||
5 | string; in future it may mean they are not migrated at all. Use | ||
6 | memory_region_init_ram() instead. | ||
7 | 1 | ||
8 | Note that this is a a cross-version migration compatibility break | ||
9 | for the MIPS "magnum" and "pica61" machines. | ||
10 | |||
11 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
12 | Reviewed-by: Aleksandar Markovic <aleksandar.markovic@wavecomp.com> | ||
13 | Message-id: 20180706174309.27110-1-peter.maydell@linaro.org | ||
14 | --- | ||
15 | hw/net/dp8393x.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c | ||
19 | index XXXXXXX..XXXXXXX 100644 | ||
20 | --- a/hw/net/dp8393x.c | ||
21 | +++ b/hw/net/dp8393x.c | ||
22 | @@ -XXX,XX +XXX,XX @@ static void dp8393x_realize(DeviceState *dev, Error **errp) | ||
23 | s->watchdog = timer_new_ns(QEMU_CLOCK_VIRTUAL, dp8393x_watchdog, s); | ||
24 | s->regs[SONIC_SR] = 0x0004; /* only revision recognized by Linux */ | ||
25 | |||
26 | - memory_region_init_ram_nomigrate(&s->prom, OBJECT(dev), | ||
27 | + memory_region_init_ram(&s->prom, OBJECT(dev), | ||
28 | "dp8393x-prom", SONIC_PROM_SIZE, &local_err); | ||
29 | if (local_err) { | ||
30 | error_propagate(errp, local_err); | ||
31 | -- | ||
32 | 2.17.1 | ||
33 | |||
34 | diff view generated by jsdifflib |