1
First ARM pullreq of the 2.10 cycle...
1
Not very much here, but several people have fallen over
2
the vector operation segfault bug, so let's get the fix
3
into master.
2
4
3
thanks
5
thanks
4
-- PMM
6
-- PMM
5
7
6
The following changes since commit 64c8ed97cceabac4fafe17fca8d88ef08183f439:
8
The following changes since commit d418238dca7b4e0b124135827ead3076233052b1:
7
9
8
Open 2.10 development tree (2017-04-20 15:42:31 +0100)
10
Merge remote-tracking branch 'remotes/rth/tags/pull-rng-20190522' into staging (2019-05-23 12:57:17 +0100)
9
11
10
are available in the git repository at:
12
are available in the Git repository at:
11
13
12
git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20170420
14
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20190523
13
15
14
for you to fetch changes up to f4e8e4edda875cab9df91dc4ae9767f7cb1f50aa:
16
for you to fetch changes up to 98e4f4fdb8ea05d840f51f47125924c2bb9df2df:
15
17
16
arm: Remove workarounds for old M-profile exception return implementation (2017-04-20 17:39:17 +0100)
18
hw/arm/exynos4210: QOM'ify the Exynos4210 SoC (2019-05-23 14:47:44 +0100)
17
19
18
----------------------------------------------------------------
20
----------------------------------------------------------------
19
target-arm queue:
21
target-arm queue:
20
* implement M profile exception return properly
22
* exynos4210: QOM'ify the Exynos4210 SoC
21
* cadence GEM: fix multiqueue handling bugs
23
* exynos4210: Add DMA support for the Exynos4210
22
* pxa2xx.c: QOMify a device
24
* arm_gicv3: Fix writes to ICC_CTLR_EL3
23
* arm/kvm: Remove trailing newlines from error_report()
25
* arm_gicv3: Fix write of ICH_VMCR_EL2.{VBPR0, VBPR1}
24
* stellaris: Don't hw_error() on bad register accesses
26
* target/arm: Fix vector operation segfault
25
* Add assertion about FSC format for syndrome registers
27
* target/arm: Minor improvements to BFXIL, EXTR
26
* Move excnames[] array into arm_log_exceptions()
27
* exynos: minor code cleanups
28
* hw/arm/boot: take Linux/arm64 TEXT_OFFSET header field into account
29
* Fix APSR writes via M profile MSR
30
28
31
----------------------------------------------------------------
29
----------------------------------------------------------------
32
Alistair Francis (5):
30
Alistair Francis (1):
33
cadence_gem: Read the correct queue descriptor
31
target/arm: Fix vector operation segfault
34
cadence_gem: Correct the multi-queue can rx logic
35
cadence_gem: Correct the interupt logic
36
cadence_gem: Make the revision a property
37
xlnx-zynqmp: Set the Cadence GEM revision
38
32
39
Ard Biesheuvel (1):
33
Guenter Roeck (1):
40
hw/arm/boot: take Linux/arm64 TEXT_OFFSET header field into account
34
hw/arm/exynos4210: Add DMA support for the Exynos4210
41
35
42
Ishani Chugh (1):
36
Peter Maydell (5):
43
arm/kvm: Remove trailing newlines from error_report()
37
arm: Move system_clock_scale to armv7m_systick.h
38
arm: Remove unnecessary includes of hw/arm/arm.h
39
arm: Rename hw/arm/arm.h to hw/arm/boot.h
40
hw/intc/arm_gicv3: Fix write of ICH_VMCR_EL2.{VBPR0, VBPR1}
41
hw/intc/arm_gicv3: Fix writes to ICC_CTLR_EL3
44
42
45
Krzysztof Kozlowski (3):
43
Philippe Mathieu-Daudé (3):
46
hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report
44
hw/arm/exynos4: Remove unuseful debug code
47
hw/char/exynos4210_uart: Constify static array and few arguments
45
hw/arm/exynos4: Use the IEC binary prefix definitions
48
hw/misc/exynos4210_pmu: Reorder local variables for readability
46
hw/arm/exynos4210: QOM'ify the Exynos4210 SoC
49
47
50
Peter Maydell (13):
48
Richard Henderson (2):
51
target/arm: Add missing entries to excnames[] for log strings
49
target/arm: Use extract2 for EXTR
52
arm: Move excnames[] array into arm_log_exceptions()
50
target/arm: Simplify BFXIL expansion
53
target/arm: Add assertion about FSC format for syndrome registers
54
stellaris: Don't hw_error() on bad register accesses
55
arm: Don't implement BXJ on M-profile CPUs
56
arm: Thumb shift operations should not permit interworking branches
57
arm: Factor out "generate right kind of step exception"
58
arm: Move gen_set_condexec() and gen_set_pc_im() up in the file
59
arm: Move condition-failed codepath generation out of if()
60
arm: Abstract out "are we singlestepping" test to utility function
61
arm: Track M profile handler mode state in TB flags
62
arm: Implement M profile exception return properly
63
arm: Remove workarounds for old M-profile exception return implementation
64
51
65
Suramya Shah (1):
52
include/hw/arm/allwinner-a10.h | 2 +-
66
hw/arm: Qomify pxa2xx.c
53
include/hw/arm/aspeed_soc.h | 1 -
54
include/hw/arm/bcm2836.h | 1 -
55
include/hw/arm/{arm.h => boot.h} | 12 +++------
56
include/hw/arm/exynos4210.h | 9 +++++--
57
include/hw/arm/fsl-imx25.h | 2 +-
58
include/hw/arm/fsl-imx31.h | 2 +-
59
include/hw/arm/fsl-imx6.h | 2 +-
60
include/hw/arm/fsl-imx6ul.h | 2 +-
61
include/hw/arm/fsl-imx7.h | 2 +-
62
include/hw/arm/virt.h | 2 +-
63
include/hw/arm/xlnx-versal.h | 2 +-
64
include/hw/arm/xlnx-zynqmp.h | 2 +-
65
include/hw/timer/armv7m_systick.h | 22 ++++++++++++++++
66
hw/arm/armsse.c | 2 +-
67
hw/arm/armv7m.c | 2 +-
68
hw/arm/aspeed.c | 2 +-
69
hw/arm/boot.c | 2 +-
70
hw/arm/collie.c | 2 +-
71
hw/arm/exynos4210.c | 54 ++++++++++++++++++++++++++++++++++++---
72
hw/arm/exynos4_boards.c | 40 ++++++++---------------------
73
hw/arm/highbank.c | 2 +-
74
hw/arm/integratorcp.c | 2 +-
75
hw/arm/mainstone.c | 2 +-
76
hw/arm/microbit.c | 2 +-
77
hw/arm/mps2-tz.c | 2 +-
78
hw/arm/mps2.c | 2 +-
79
hw/arm/msf2-soc.c | 1 -
80
hw/arm/msf2-som.c | 2 +-
81
hw/arm/musca.c | 2 +-
82
hw/arm/musicpal.c | 2 +-
83
hw/arm/netduino2.c | 2 +-
84
hw/arm/nrf51_soc.c | 2 +-
85
hw/arm/nseries.c | 2 +-
86
hw/arm/omap1.c | 2 +-
87
hw/arm/omap2.c | 2 +-
88
hw/arm/omap_sx1.c | 2 +-
89
hw/arm/palm.c | 2 +-
90
hw/arm/raspi.c | 2 +-
91
hw/arm/realview.c | 2 +-
92
hw/arm/spitz.c | 2 +-
93
hw/arm/stellaris.c | 2 +-
94
hw/arm/stm32f205_soc.c | 2 +-
95
hw/arm/strongarm.c | 2 +-
96
hw/arm/tosa.c | 2 +-
97
hw/arm/versatilepb.c | 2 +-
98
hw/arm/vexpress.c | 2 +-
99
hw/arm/virt.c | 2 +-
100
hw/arm/xilinx_zynq.c | 2 +-
101
hw/arm/xlnx-versal.c | 2 +-
102
hw/arm/z2.c | 2 +-
103
hw/intc/arm_gicv3_cpuif.c | 6 ++---
104
hw/intc/armv7m_nvic.c | 1 -
105
target/arm/arm-semi.c | 1 -
106
target/arm/cpu.c | 1 -
107
target/arm/cpu64.c | 1 -
108
target/arm/kvm.c | 1 -
109
target/arm/kvm32.c | 1 -
110
target/arm/kvm64.c | 1 -
111
target/arm/translate-a64.c | 44 ++++++++++++++++---------------
112
target/arm/translate.c | 4 +--
113
61 files changed, 164 insertions(+), 123 deletions(-)
114
rename include/hw/arm/{arm.h => boot.h} (96%)
67
115
68
include/hw/net/cadence_gem.h | 1 +
69
target/arm/cpu.h | 10 +++
70
target/arm/internals.h | 21 -----
71
target/arm/translate.h | 5 ++
72
hw/arm/boot.c | 64 ++++++++++++---
73
hw/arm/exynos4_boards.c | 7 +-
74
hw/arm/pxa2xx.c | 14 ++--
75
hw/arm/stellaris.c | 60 ++++++++------
76
hw/arm/xlnx-zynqmp.c | 6 +-
77
hw/char/exynos4210_uart.c | 8 +-
78
hw/misc/exynos4210_pmu.c | 4 +-
79
hw/net/cadence_gem.c | 45 +++++++----
80
hw/timer/exynos4210_mct.c | 6 +-
81
hw/timer/exynos4210_pwm.c | 13 ++--
82
hw/timer/exynos4210_rtc.c | 19 ++---
83
target/arm/cpu.c | 43 +---------
84
target/arm/helper.c | 19 +++++
85
target/arm/kvm64.c | 4 +-
86
target/arm/op_helper.c | 23 ++++--
87
target/arm/translate.c | 181 +++++++++++++++++++++++++++++--------------
88
20 files changed, 341 insertions(+), 212 deletions(-)
89
diff view generated by jsdifflib
1
Move the code to generate the "condition failed" instruction
1
From: Richard Henderson <richard.henderson@linaro.org>
2
codepath out of the if (singlestepping) {} else {}. This
3
will allow adding support for handling a new is_jmp type
4
which can't be neatly split into "singlestepping case"
5
versus "not singlestepping case".
6
2
3
This is, after all, how we implement extract2 in tcg/aarch64.
4
5
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
Message-id: 20190514011129.11330-2-richard.henderson@linaro.org
7
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
9
Reviewed-by: Richard Henderson <rth@twiddle.net>
10
Message-id: 1491844419-12485-6-git-send-email-peter.maydell@linaro.org
11
---
9
---
12
target/arm/translate.c | 24 +++++++++++-------------
10
target/arm/translate-a64.c | 38 ++++++++++++++++++++------------------
13
1 file changed, 11 insertions(+), 13 deletions(-)
11
1 file changed, 20 insertions(+), 18 deletions(-)
14
12
15
diff --git a/target/arm/translate.c b/target/arm/translate.c
13
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
16
index XXXXXXX..XXXXXXX 100644
14
index XXXXXXX..XXXXXXX 100644
17
--- a/target/arm/translate.c
15
--- a/target/arm/translate-a64.c
18
+++ b/target/arm/translate.c
16
+++ b/target/arm/translate-a64.c
19
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
17
@@ -XXX,XX +XXX,XX @@ static void disas_extract(DisasContext *s, uint32_t insn)
20
/* At this stage dc->condjmp will only be set when the skipped
18
} else {
21
instruction was a conditional branch or trap, and the PC has
19
tcg_gen_ext32u_i64(tcg_rd, cpu_reg(s, rm));
22
already been written. */
20
}
23
+ gen_set_condexec(dc);
21
- } else if (rm == rn) { /* ROR */
24
if (unlikely(cs->singlestep_enabled || dc->ss_active)) {
22
- tcg_rm = cpu_reg(s, rm);
25
/* Unconditional and "condition passed" instruction codepath. */
23
- if (sf) {
26
- gen_set_condexec(dc);
24
- tcg_gen_rotri_i64(tcg_rd, tcg_rm, imm);
27
switch (dc->is_jmp) {
25
- } else {
28
case DISAS_SWI:
26
- TCGv_i32 tmp = tcg_temp_new_i32();
29
gen_ss_advance(dc);
27
- tcg_gen_extrl_i64_i32(tmp, tcg_rm);
30
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
28
- tcg_gen_rotri_i32(tmp, tmp, imm);
31
/* FIXME: Single stepping a WFI insn will not halt the CPU. */
29
- tcg_gen_extu_i32_i64(tcg_rd, tmp);
32
gen_singlestep_exception(dc);
30
- tcg_temp_free_i32(tmp);
33
}
31
- }
34
- if (dc->condjmp) {
32
} else {
35
- /* "Condition failed" instruction codepath. */
33
- tcg_rm = read_cpu_reg(s, rm, sf);
36
- gen_set_label(dc->condlabel);
34
- tcg_rn = read_cpu_reg(s, rn, sf);
37
- gen_set_condexec(dc);
35
- tcg_gen_shri_i64(tcg_rm, tcg_rm, imm);
38
- gen_set_pc_im(dc, dc->pc);
36
- tcg_gen_shli_i64(tcg_rn, tcg_rn, bitsize - imm);
39
- gen_singlestep_exception(dc);
37
- tcg_gen_or_i64(tcg_rd, tcg_rm, tcg_rn);
40
- }
38
- if (!sf) {
41
} else {
39
- tcg_gen_ext32u_i64(tcg_rd, tcg_rd);
42
/* While branches must always occur at the end of an IT block,
40
+ tcg_rm = cpu_reg(s, rm);
43
there are a few other things that can cause us to terminate
41
+ tcg_rn = cpu_reg(s, rn);
44
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
45
- Hardware watchpoints.
46
Hardware breakpoints have already been handled and skip this code.
47
*/
48
- gen_set_condexec(dc);
49
switch(dc->is_jmp) {
50
case DISAS_NEXT:
51
gen_goto_tb(dc, 1, dc->pc);
52
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
53
gen_exception(EXCP_SMC, syn_aa32_smc(), 3);
54
break;
55
}
56
- if (dc->condjmp) {
57
- gen_set_label(dc->condlabel);
58
- gen_set_condexec(dc);
59
+ }
60
+
42
+
61
+ if (dc->condjmp) {
43
+ if (sf) {
62
+ /* "Condition failed" instruction codepath for the branch/trap insn */
44
+ /* Specialization to ROR happens in EXTRACT2. */
63
+ gen_set_label(dc->condlabel);
45
+ tcg_gen_extract2_i64(tcg_rd, tcg_rm, tcg_rn, imm);
64
+ gen_set_condexec(dc);
46
+ } else {
65
+ if (unlikely(cs->singlestep_enabled || dc->ss_active)) {
47
+ TCGv_i32 t0 = tcg_temp_new_i32();
66
+ gen_set_pc_im(dc, dc->pc);
48
+
67
+ gen_singlestep_exception(dc);
49
+ tcg_gen_extrl_i64_i32(t0, tcg_rm);
68
+ } else {
50
+ if (rm == rn) {
69
gen_goto_tb(dc, 1, dc->pc);
51
+ tcg_gen_rotri_i32(t0, t0, imm);
70
- dc->condjmp = 0;
52
+ } else {
53
+ TCGv_i32 t1 = tcg_temp_new_i32();
54
+ tcg_gen_extrl_i64_i32(t1, tcg_rn);
55
+ tcg_gen_extract2_i32(t0, t0, t1, imm);
56
+ tcg_temp_free_i32(t1);
57
+ }
58
+ tcg_gen_extu_i32_i64(tcg_rd, t0);
59
+ tcg_temp_free_i32(t0);
60
}
71
}
61
}
72
}
62
}
73
74
--
63
--
75
2.7.4
64
2.20.1
76
65
77
66
diff view generated by jsdifflib
1
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
1
From: Richard Henderson <richard.henderson@linaro.org>
2
2
3
The arm64 boot protocol stipulates that the kernel must be loaded
3
The mask implied by the extract is redundant with the one
4
TEXT_OFFSET bytes beyond a 2 MB aligned base address, where TEXT_OFFSET
4
implied by the deposit. Also, fix spelling of BFXIL.
5
could be any 4 KB multiple between 0 and 2 MB, and whose value can be
6
found in the header of the Image file.
7
5
8
So after attempts to load the arm64 kernel image as an ELF file or as a
6
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
9
U-Boot image have failed (both of which have their own way of specifying
7
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10
the load offset), try to determine the TEXT_OFFSET from the image after
8
Message-id: 20190514011129.11330-3-richard.henderson@linaro.org
11
loading it but before mapping it as a ROM mapping into the guest address
12
space.
13
14
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
15
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
16
Message-id: 1489414630-21609-1-git-send-email-ard.biesheuvel@linaro.org
17
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
18
---
10
---
19
hw/arm/boot.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++----------
11
target/arm/translate-a64.c | 6 +++---
20
1 file changed, 53 insertions(+), 11 deletions(-)
12
1 file changed, 3 insertions(+), 3 deletions(-)
21
13
22
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
14
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
23
index XXXXXXX..XXXXXXX 100644
15
index XXXXXXX..XXXXXXX 100644
24
--- a/hw/arm/boot.c
16
--- a/target/arm/translate-a64.c
25
+++ b/hw/arm/boot.c
17
+++ b/target/arm/translate-a64.c
26
@@ -XXX,XX +XXX,XX @@
18
@@ -XXX,XX +XXX,XX @@ static void disas_bitfield(DisasContext *s, uint32_t insn)
27
#define KERNEL_LOAD_ADDR 0x00010000
19
tcg_gen_extract_i64(tcg_rd, tcg_tmp, ri, len);
28
#define KERNEL64_LOAD_ADDR 0x00080000
20
return;
29
21
}
30
+#define ARM64_TEXT_OFFSET_OFFSET 8
22
- /* opc == 1, BXFIL fall through to deposit */
31
+#define ARM64_MAGIC_OFFSET 56
23
- tcg_gen_extract_i64(tcg_tmp, tcg_tmp, ri, len);
32
+
24
+ /* opc == 1, BFXIL fall through to deposit */
33
typedef enum {
25
+ tcg_gen_shri_i64(tcg_tmp, tcg_tmp, ri);
34
FIXUP_NONE = 0, /* do nothing */
26
pos = 0;
35
FIXUP_TERMINATOR, /* end of insns */
36
@@ -XXX,XX +XXX,XX @@ static uint64_t arm_load_elf(struct arm_boot_info *info, uint64_t *pentry,
37
return ret;
38
}
39
40
+static uint64_t load_aarch64_image(const char *filename, hwaddr mem_base,
41
+ hwaddr *entry)
42
+{
43
+ hwaddr kernel_load_offset = KERNEL64_LOAD_ADDR;
44
+ uint8_t *buffer;
45
+ int size;
46
+
47
+ /* On aarch64, it's the bootloader's job to uncompress the kernel. */
48
+ size = load_image_gzipped_buffer(filename, LOAD_IMAGE_MAX_GUNZIP_BYTES,
49
+ &buffer);
50
+
51
+ if (size < 0) {
52
+ gsize len;
53
+
54
+ /* Load as raw file otherwise */
55
+ if (!g_file_get_contents(filename, (char **)&buffer, &len, NULL)) {
56
+ return -1;
57
+ }
58
+ size = len;
59
+ }
60
+
61
+ /* check the arm64 magic header value -- very old kernels may not have it */
62
+ if (memcmp(buffer + ARM64_MAGIC_OFFSET, "ARM\x64", 4) == 0) {
63
+ uint64_t hdrvals[2];
64
+
65
+ /* The arm64 Image header has text_offset and image_size fields at 8 and
66
+ * 16 bytes into the Image header, respectively. The text_offset field
67
+ * is only valid if the image_size is non-zero.
68
+ */
69
+ memcpy(&hdrvals, buffer + ARM64_TEXT_OFFSET_OFFSET, sizeof(hdrvals));
70
+ if (hdrvals[1] != 0) {
71
+ kernel_load_offset = le64_to_cpu(hdrvals[0]);
72
+ }
73
+ }
74
+
75
+ *entry = mem_base + kernel_load_offset;
76
+ rom_add_blob_fixed(filename, buffer, size, *entry);
77
+
78
+ g_free(buffer);
79
+
80
+ return size;
81
+}
82
+
83
static void arm_load_kernel_notify(Notifier *notifier, void *data)
84
{
85
CPUState *cs;
86
@@ -XXX,XX +XXX,XX @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
87
int is_linux = 0;
88
uint64_t elf_entry, elf_low_addr, elf_high_addr;
89
int elf_machine;
90
- hwaddr entry, kernel_load_offset;
91
+ hwaddr entry;
92
static const ARMInsnFixup *primary_loader;
93
ArmLoadKernelNotifier *n = DO_UPCAST(ArmLoadKernelNotifier,
94
notifier, notifier);
95
@@ -XXX,XX +XXX,XX @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
96
97
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
98
primary_loader = bootloader_aarch64;
99
- kernel_load_offset = KERNEL64_LOAD_ADDR;
100
elf_machine = EM_AARCH64;
101
} else {
27
} else {
102
primary_loader = bootloader;
28
/* Handle the ri > si case with a deposit
103
if (!info->write_board_setup) {
29
@@ -XXX,XX +XXX,XX @@ static void disas_bitfield(DisasContext *s, uint32_t insn)
104
primary_loader += BOOTLOADER_NO_BOARD_SETUP_OFFSET;
30
len = ri;
105
}
106
- kernel_load_offset = KERNEL_LOAD_ADDR;
107
elf_machine = EM_ARM;
108
}
31
}
109
32
110
@@ -XXX,XX +XXX,XX @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
33
- if (opc == 1) { /* BFM, BXFIL */
111
kernel_size = load_uimage(info->kernel_filename, &entry, NULL,
34
+ if (opc == 1) { /* BFM, BFXIL */
112
&is_linux, NULL, NULL);
35
tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_tmp, pos, len);
113
}
36
} else {
114
- /* On aarch64, it's the bootloader's job to uncompress the kernel. */
37
/* SBFM or UBFM: We start with zero, and we haven't modified
115
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64) && kernel_size < 0) {
116
- entry = info->loader_start + kernel_load_offset;
117
- kernel_size = load_image_gzipped(info->kernel_filename, entry,
118
- info->ram_size - kernel_load_offset);
119
+ kernel_size = load_aarch64_image(info->kernel_filename,
120
+ info->loader_start, &entry);
121
is_linux = 1;
122
- }
123
- if (kernel_size < 0) {
124
- entry = info->loader_start + kernel_load_offset;
125
+ } else if (kernel_size < 0) {
126
+ /* 32-bit ARM */
127
+ entry = info->loader_start + KERNEL_LOAD_ADDR;
128
kernel_size = load_image_targphys(info->kernel_filename, entry,
129
- info->ram_size - kernel_load_offset);
130
+ info->ram_size - KERNEL_LOAD_ADDR);
131
is_linux = 1;
132
}
133
if (kernel_size < 0) {
134
--
38
--
135
2.7.4
39
2.20.1
136
40
137
41
diff view generated by jsdifflib
1
We now test for "are we singlestepping" in several places and
1
From: Alistair Francis <alistair.francis@wdc.com>
2
it's not a trivial check because we need to care about both
3
architectural singlestep and QEMU gdbstub singlestep. We're
4
also about to add another place that needs to make this check,
5
so pull the condition out into a function.
6
2
3
Commit 89e68b575 "target/arm: Use vector operations for saturation"
4
causes this abort() when booting QEMU ARM with a Cortex-A15:
5
6
0 0x00007ffff4c2382f in raise () at /usr/lib/libc.so.6
7
1 0x00007ffff4c0e672 in abort () at /usr/lib/libc.so.6
8
2 0x00005555559c1839 in disas_neon_data_insn (insn=<optimized out>, s=<optimized out>) at ./target/arm/translate.c:6673
9
3 0x00005555559c1839 in disas_neon_data_insn (s=<optimized out>, insn=<optimized out>) at ./target/arm/translate.c:6386
10
4 0x00005555559cd8a4 in disas_arm_insn (insn=4081107068, s=0x7fffe59a9510) at ./target/arm/translate.c:9289
11
5 0x00005555559cd8a4 in arm_tr_translate_insn (dcbase=0x7fffe59a9510, cpu=<optimized out>) at ./target/arm/translate.c:13612
12
6 0x00005555558d1d39 in translator_loop (ops=0x5555561cc580 <arm_translator_ops>, db=0x7fffe59a9510, cpu=0x55555686a2f0, tb=<optimized out>, max_insns=<optimized out>) at ./accel/tcg/translator.c:96
13
7 0x00005555559d10d4 in gen_intermediate_code (cpu=cpu@entry=0x55555686a2f0, tb=tb@entry=0x7fffd7840080 <code_gen_buffer+126091347>, max_insns=max_insns@entry=512) at ./target/arm/translate.c:13901
14
8 0x00005555558d06b9 in tb_gen_code (cpu=cpu@entry=0x55555686a2f0, pc=3067096216, cs_base=0, flags=192, cflags=-16252928, cflags@entry=524288) at ./accel/tcg/translate-all.c:1736
15
9 0x00005555558ce467 in tb_find (cf_mask=524288, tb_exit=1, last_tb=0x7fffd783e640 <code_gen_buffer+126084627>, cpu=0x1) at ./accel/tcg/cpu-exec.c:407
16
10 0x00005555558ce467 in cpu_exec (cpu=cpu@entry=0x55555686a2f0) at ./accel/tcg/cpu-exec.c:728
17
11 0x000055555588b0cf in tcg_cpu_exec (cpu=0x55555686a2f0) at ./cpus.c:1431
18
12 0x000055555588d223 in qemu_tcg_cpu_thread_fn (arg=0x55555686a2f0) at ./cpus.c:1735
19
13 0x000055555588d223 in qemu_tcg_cpu_thread_fn (arg=arg@entry=0x55555686a2f0) at ./cpus.c:1709
20
14 0x0000555555d2629a in qemu_thread_start (args=<optimized out>) at ./util/qemu-thread-posix.c:502
21
15 0x00007ffff4db8a92 in start_thread () at /usr/lib/libpthread.
22
23
This patch ensures that we don't hit the abort() in the second switch
24
case in disas_neon_data_insn() as we will return from the first case.
25
26
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
27
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
28
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
29
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
30
Tested-by: Alex Bennée <alex.bennee@linaro.org>
31
Message-id: ad91b397f360b2fc7f4087e476f7df5b04d42ddb.1558021877.git.alistair.francis@wdc.com
7
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
32
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8
Reviewed-by: Richard Henderson <rth@twiddle.net>
9
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
10
Message-id: 1491844419-12485-7-git-send-email-peter.maydell@linaro.org
11
---
33
---
12
target/arm/translate.c | 20 +++++++++++++++-----
34
target/arm/translate.c | 4 ++--
13
1 file changed, 15 insertions(+), 5 deletions(-)
35
1 file changed, 2 insertions(+), 2 deletions(-)
14
36
15
diff --git a/target/arm/translate.c b/target/arm/translate.c
37
diff --git a/target/arm/translate.c b/target/arm/translate.c
16
index XXXXXXX..XXXXXXX 100644
38
index XXXXXXX..XXXXXXX 100644
17
--- a/target/arm/translate.c
39
--- a/target/arm/translate.c
18
+++ b/target/arm/translate.c
40
+++ b/target/arm/translate.c
19
@@ -XXX,XX +XXX,XX @@ static void gen_singlestep_exception(DisasContext *s)
41
@@ -XXX,XX +XXX,XX @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
20
}
42
tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc),
21
}
43
rn_ofs, rm_ofs, vec_size, vec_size,
22
44
(u ? uqadd_op : sqadd_op) + size);
23
+static inline bool is_singlestepping(DisasContext *s)
45
- break;
24
+{
46
+ return 0;
25
+ /* Return true if we are singlestepping either because of
47
26
+ * architectural singlestep or QEMU gdbstub singlestep. This does
48
case NEON_3R_VQSUB:
27
+ * not include the command line '-singlestep' mode which is rather
49
tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc),
28
+ * misnamed as it only means "one instruction per TB" and doesn't
50
rn_ofs, rm_ofs, vec_size, vec_size,
29
+ * affect the code we generate.
51
(u ? uqsub_op : sqsub_op) + size);
30
+ */
52
- break;
31
+ return s->singlestep_enabled || s->ss_active;
53
+ return 0;
32
+}
54
33
+
55
case NEON_3R_VMUL: /* VMUL */
34
static void gen_smul_dual(TCGv_i32 a, TCGv_i32 b)
56
if (u) {
35
{
36
TCGv_i32 tmp1 = tcg_temp_new_i32();
37
@@ -XXX,XX +XXX,XX @@ static inline void gen_goto_tb(DisasContext *s, int n, target_ulong dest)
38
39
static inline void gen_jmp (DisasContext *s, uint32_t dest)
40
{
41
- if (unlikely(s->singlestep_enabled || s->ss_active)) {
42
+ if (unlikely(is_singlestepping(s))) {
43
/* An indirect jump so that we still trigger the debug exception. */
44
if (s->thumb)
45
dest |= 1;
46
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
47
((dc->pc >= next_page_start - 3) && insn_crosses_page(env, dc));
48
49
} while (!dc->is_jmp && !tcg_op_buf_full() &&
50
- !cs->singlestep_enabled &&
51
+ !is_singlestepping(dc) &&
52
!singlestep &&
53
- !dc->ss_active &&
54
!end_of_page &&
55
num_insns < max_insns);
56
57
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
58
instruction was a conditional branch or trap, and the PC has
59
already been written. */
60
gen_set_condexec(dc);
61
- if (unlikely(cs->singlestep_enabled || dc->ss_active)) {
62
+ if (unlikely(is_singlestepping(dc))) {
63
/* Unconditional and "condition passed" instruction codepath. */
64
switch (dc->is_jmp) {
65
case DISAS_SWI:
66
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
67
/* "Condition failed" instruction codepath for the branch/trap insn */
68
gen_set_label(dc->condlabel);
69
gen_set_condexec(dc);
70
- if (unlikely(cs->singlestep_enabled || dc->ss_active)) {
71
+ if (unlikely(is_singlestepping(dc))) {
72
gen_set_pc_im(dc, dc->pc);
73
gen_singlestep_exception(dc);
74
} else {
75
--
57
--
76
2.7.4
58
2.20.1
77
59
78
60
diff view generated by jsdifflib
1
For M profile exception-return handling we'd like to generate different
1
The system_clock_scale global is used only by the armv7m systick
2
code for some instructions depending on whether we are in Handler
2
device; move the extern declaration to the armv7m_systick.h header,
3
mode or Thread mode. This isn't the same as "are we privileged
3
and expand the comment to explain what it is and that it should
4
or user", so we need an extra bit in the TB flags to distinguish.
4
ideally be replaced with a different approach.
5
5
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
7
Reviewed-by: Richard Henderson <rth@twiddle.net>
7
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
8
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
9
Message-id: 1491844419-12485-8-git-send-email-peter.maydell@linaro.org
9
Message-id: 20190516163857.6430-2-peter.maydell@linaro.org
10
---
10
---
11
target/arm/cpu.h | 9 +++++++++
11
include/hw/arm/arm.h | 4 ----
12
target/arm/translate.h | 1 +
12
include/hw/timer/armv7m_systick.h | 22 ++++++++++++++++++++++
13
target/arm/translate.c | 1 +
13
2 files changed, 22 insertions(+), 4 deletions(-)
14
3 files changed, 11 insertions(+)
15
14
16
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
15
diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h
17
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
18
--- a/target/arm/cpu.h
17
--- a/include/hw/arm/arm.h
19
+++ b/target/arm/cpu.h
18
+++ b/include/hw/arm/arm.h
20
@@ -XXX,XX +XXX,XX @@ static inline bool arm_cpu_data_is_big_endian(CPUARMState *env)
19
@@ -XXX,XX +XXX,XX @@ void arm_write_secure_board_setup_dummy_smc(ARMCPU *cpu,
21
#define ARM_TBFLAG_NS_MASK (1 << ARM_TBFLAG_NS_SHIFT)
20
const struct arm_boot_info *info,
22
#define ARM_TBFLAG_BE_DATA_SHIFT 20
21
hwaddr mvbar_addr);
23
#define ARM_TBFLAG_BE_DATA_MASK (1 << ARM_TBFLAG_BE_DATA_SHIFT)
22
24
+/* For M profile only, Handler (ie not Thread) mode */
23
-/* Multiplication factor to convert from system clock ticks to qemu timer
25
+#define ARM_TBFLAG_HANDLER_SHIFT 21
24
- ticks. */
26
+#define ARM_TBFLAG_HANDLER_MASK (1 << ARM_TBFLAG_HANDLER_SHIFT)
25
-extern int system_clock_scale;
27
26
-
28
/* Bit usage when in AArch64 state */
27
#endif /* HW_ARM_H */
29
#define ARM_TBFLAG_TBI0_SHIFT 0 /* TBI0 for EL0/1 or TBI for EL2/3 */
28
diff --git a/include/hw/timer/armv7m_systick.h b/include/hw/timer/armv7m_systick.h
30
@@ -XXX,XX +XXX,XX @@ static inline bool arm_cpu_data_is_big_endian(CPUARMState *env)
29
index XXXXXXX..XXXXXXX 100644
31
(((F) & ARM_TBFLAG_NS_MASK) >> ARM_TBFLAG_NS_SHIFT)
30
--- a/include/hw/timer/armv7m_systick.h
32
#define ARM_TBFLAG_BE_DATA(F) \
31
+++ b/include/hw/timer/armv7m_systick.h
33
(((F) & ARM_TBFLAG_BE_DATA_MASK) >> ARM_TBFLAG_BE_DATA_SHIFT)
32
@@ -XXX,XX +XXX,XX @@ typedef struct SysTickState {
34
+#define ARM_TBFLAG_HANDLER(F) \
33
qemu_irq irq;
35
+ (((F) & ARM_TBFLAG_HANDLER_MASK) >> ARM_TBFLAG_HANDLER_SHIFT)
34
} SysTickState;
36
#define ARM_TBFLAG_TBI0(F) \
35
37
(((F) & ARM_TBFLAG_TBI0_MASK) >> ARM_TBFLAG_TBI0_SHIFT)
36
+/*
38
#define ARM_TBFLAG_TBI1(F) \
37
+ * Multiplication factor to convert from system clock ticks to qemu timer
39
@@ -XXX,XX +XXX,XX @@ static inline void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc,
38
+ * ticks. This should be set (by board code, usually) to a value
40
}
39
+ * equal to NANOSECONDS_PER_SECOND / frq, where frq is the clock frequency
41
*flags |= fp_exception_el(env) << ARM_TBFLAG_FPEXC_EL_SHIFT;
40
+ * in Hz of the CPU.
42
41
+ *
43
+ if (env->v7m.exception != 0) {
42
+ * This value is used by the systick device when it is running in
44
+ *flags |= ARM_TBFLAG_HANDLER_MASK;
43
+ * its "use the CPU clock" mode (ie when SYST_CSR.CLKSOURCE == 1) to
45
+ }
44
+ * set how fast the timer should tick.
45
+ *
46
+ * TODO: we should refactor this so that rather than using a global
47
+ * we use a device property or something similar. This is complicated
48
+ * because (a) the property would need to be plumbed through from the
49
+ * board code down through various layers to the systick device
50
+ * and (b) the property needs to be modifiable after realize, because
51
+ * the stellaris board uses this to implement the behaviour where the
52
+ * guest can reprogram the PLL registers to downclock the CPU, and the
53
+ * systick device needs to react accordingly. Possibly this should
54
+ * be deferred until we have a good API for modelling clock trees.
55
+ */
56
+extern int system_clock_scale;
46
+
57
+
47
*cs_base = 0;
58
#endif
48
}
49
50
diff --git a/target/arm/translate.h b/target/arm/translate.h
51
index XXXXXXX..XXXXXXX 100644
52
--- a/target/arm/translate.h
53
+++ b/target/arm/translate.h
54
@@ -XXX,XX +XXX,XX @@ typedef struct DisasContext {
55
bool vfp_enabled; /* FP enabled via FPSCR.EN */
56
int vec_len;
57
int vec_stride;
58
+ bool v7m_handler_mode;
59
/* Immediate value in AArch32 SVC insn; must be set if is_jmp == DISAS_SWI
60
* so that top level loop can generate correct syndrome information.
61
*/
62
diff --git a/target/arm/translate.c b/target/arm/translate.c
63
index XXXXXXX..XXXXXXX 100644
64
--- a/target/arm/translate.c
65
+++ b/target/arm/translate.c
66
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
67
dc->vec_len = ARM_TBFLAG_VECLEN(tb->flags);
68
dc->vec_stride = ARM_TBFLAG_VECSTRIDE(tb->flags);
69
dc->c15_cpar = ARM_TBFLAG_XSCALE_CPAR(tb->flags);
70
+ dc->v7m_handler_mode = ARM_TBFLAG_HANDLER(tb->flags);
71
dc->cp_regs = cpu->cp_regs;
72
dc->features = env->features;
73
74
--
59
--
75
2.7.4
60
2.20.1
76
61
77
62
diff view generated by jsdifflib
1
Now that we've rewritten M-profile exception return so that the magic
1
The hw/arm/arm.h header now only includes declarations relating
2
PC values are not visible to other parts of QEMU, we can delete the
2
to boot.c code, so it is only needed by Arm board or SoC code.
3
special casing of them elsewhere.
3
Remove some unnecessary inclusions of it from target/arm files
4
and from hw/intc/armv7m_nvic.c.
4
5
5
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
7
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7
Reviewed-by: Richard Henderson <rth@twiddle.net>
8
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8
Message-id: 1491844419-12485-10-git-send-email-peter.maydell@linaro.org
9
Message-id: 20190516163857.6430-3-peter.maydell@linaro.org
9
---
10
---
10
target/arm/cpu.c | 43 ++-----------------------------------------
11
hw/intc/armv7m_nvic.c | 1 -
11
target/arm/translate.c | 8 --------
12
target/arm/arm-semi.c | 1 -
12
2 files changed, 2 insertions(+), 49 deletions(-)
13
target/arm/cpu.c | 1 -
14
target/arm/cpu64.c | 1 -
15
target/arm/kvm.c | 1 -
16
target/arm/kvm32.c | 1 -
17
target/arm/kvm64.c | 1 -
18
7 files changed, 7 deletions(-)
13
19
20
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
21
index XXXXXXX..XXXXXXX 100644
22
--- a/hw/intc/armv7m_nvic.c
23
+++ b/hw/intc/armv7m_nvic.c
24
@@ -XXX,XX +XXX,XX @@
25
#include "cpu.h"
26
#include "hw/sysbus.h"
27
#include "qemu/timer.h"
28
-#include "hw/arm/arm.h"
29
#include "hw/intc/armv7m_nvic.h"
30
#include "target/arm/cpu.h"
31
#include "exec/exec-all.h"
32
diff --git a/target/arm/arm-semi.c b/target/arm/arm-semi.c
33
index XXXXXXX..XXXXXXX 100644
34
--- a/target/arm/arm-semi.c
35
+++ b/target/arm/arm-semi.c
36
@@ -XXX,XX +XXX,XX @@
37
#else
38
#include "qemu-common.h"
39
#include "exec/gdbstub.h"
40
-#include "hw/arm/arm.h"
41
#include "qemu/cutils.h"
42
#endif
43
14
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
44
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
15
index XXXXXXX..XXXXXXX 100644
45
index XXXXXXX..XXXXXXX 100644
16
--- a/target/arm/cpu.c
46
--- a/target/arm/cpu.c
17
+++ b/target/arm/cpu.c
47
+++ b/target/arm/cpu.c
18
@@ -XXX,XX +XXX,XX @@ bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
48
@@ -XXX,XX +XXX,XX @@
19
}
49
#if !defined(CONFIG_USER_ONLY)
20
50
#include "hw/loader.h"
21
#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
22
-static void arm_v7m_unassigned_access(CPUState *cpu, hwaddr addr,
23
- bool is_write, bool is_exec, int opaque,
24
- unsigned size)
25
-{
26
- ARMCPU *arm = ARM_CPU(cpu);
27
- CPUARMState *env = &arm->env;
28
-
29
- /* ARMv7-M interrupt return works by loading a magic value into the PC.
30
- * On real hardware the load causes the return to occur. The qemu
31
- * implementation performs the jump normally, then does the exception
32
- * return by throwing a special exception when when the CPU tries to
33
- * execute code at the magic address.
34
- */
35
- if (env->v7m.exception != 0 && addr >= 0xfffffff0 && is_exec) {
36
- cpu->exception_index = EXCP_EXCEPTION_EXIT;
37
- cpu_loop_exit(cpu);
38
- }
39
-
40
- /* In real hardware an attempt to access parts of the address space
41
- * with nothing there will usually cause an external abort.
42
- * However our QEMU board models are often missing device models where
43
- * the guest can boot anyway with the default read-as-zero/writes-ignored
44
- * behaviour that you get without a QEMU unassigned_access hook.
45
- * So just return here to retain that default behaviour.
46
- */
47
-}
48
-
49
static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
50
{
51
CPUClass *cc = CPU_GET_CLASS(cs);
52
@@ -XXX,XX +XXX,XX @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
53
CPUARMState *env = &cpu->env;
54
bool ret = false;
55
56
- /* ARMv7-M interrupt return works by loading a magic value
57
- * into the PC. On real hardware the load causes the
58
- * return to occur. The qemu implementation performs the
59
- * jump normally, then does the exception return when the
60
- * CPU tries to execute code at the magic address.
61
- * This will cause the magic PC value to be pushed to
62
- * the stack if an interrupt occurred at the wrong time.
63
- * We avoid this by disabling interrupts when
64
- * pc contains a magic address.
65
- *
66
- * ARMv7-M interrupt masking works differently than -A or -R.
67
+ /* ARMv7-M interrupt masking works differently than -A or -R.
68
* There is no FIQ/IRQ distinction. Instead of I and F bits
69
* masking FIQ and IRQ interrupts, an exception is taken only
70
* if it is higher priority than the current execution priority
71
@@ -XXX,XX +XXX,XX @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
72
* currently active exception).
73
*/
74
if (interrupt_request & CPU_INTERRUPT_HARD
75
- && (armv7m_nvic_can_take_pending_exception(env->nvic))
76
- && (env->regs[15] < 0xfffffff0)) {
77
+ && (armv7m_nvic_can_take_pending_exception(env->nvic))) {
78
cs->exception_index = EXCP_IRQ;
79
cc->do_interrupt(cs);
80
ret = true;
81
@@ -XXX,XX +XXX,XX @@ static void arm_v7m_class_init(ObjectClass *oc, void *data)
82
cc->do_interrupt = arm_v7m_cpu_do_interrupt;
83
#endif
51
#endif
84
52
-#include "hw/arm/arm.h"
85
- cc->do_unassigned_access = arm_v7m_unassigned_access;
53
#include "sysemu/sysemu.h"
86
cc->cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt;
54
#include "sysemu/hw_accel.h"
87
}
55
#include "kvm_arm.h"
88
56
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
89
diff --git a/target/arm/translate.c b/target/arm/translate.c
90
index XXXXXXX..XXXXXXX 100644
57
index XXXXXXX..XXXXXXX 100644
91
--- a/target/arm/translate.c
58
--- a/target/arm/cpu64.c
92
+++ b/target/arm/translate.c
59
+++ b/target/arm/cpu64.c
93
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
60
@@ -XXX,XX +XXX,XX @@
94
dc->is_jmp = DISAS_EXC;
61
#if !defined(CONFIG_USER_ONLY)
95
break;
62
#include "hw/loader.h"
96
}
97
-#else
98
- if (arm_dc_feature(dc, ARM_FEATURE_M)) {
99
- /* Branches to the magic exception-return addresses should
100
- * already have been caught via the arm_v7m_unassigned_access hook,
101
- * and never get here.
102
- */
103
- assert(dc->pc < 0xfffffff0);
104
- }
105
#endif
63
#endif
106
64
-#include "hw/arm/arm.h"
107
if (unlikely(!QTAILQ_EMPTY(&cs->breakpoints))) {
65
#include "sysemu/sysemu.h"
66
#include "sysemu/kvm.h"
67
#include "kvm_arm.h"
68
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
69
index XXXXXXX..XXXXXXX 100644
70
--- a/target/arm/kvm.c
71
+++ b/target/arm/kvm.c
72
@@ -XXX,XX +XXX,XX @@
73
#include "cpu.h"
74
#include "trace.h"
75
#include "internals.h"
76
-#include "hw/arm/arm.h"
77
#include "hw/pci/pci.h"
78
#include "exec/memattrs.h"
79
#include "exec/address-spaces.h"
80
diff --git a/target/arm/kvm32.c b/target/arm/kvm32.c
81
index XXXXXXX..XXXXXXX 100644
82
--- a/target/arm/kvm32.c
83
+++ b/target/arm/kvm32.c
84
@@ -XXX,XX +XXX,XX @@
85
#include "sysemu/kvm.h"
86
#include "kvm_arm.h"
87
#include "internals.h"
88
-#include "hw/arm/arm.h"
89
#include "qemu/log.h"
90
91
static inline void set_feature(uint64_t *features, int feature)
92
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
93
index XXXXXXX..XXXXXXX 100644
94
--- a/target/arm/kvm64.c
95
+++ b/target/arm/kvm64.c
96
@@ -XXX,XX +XXX,XX @@
97
#include "sysemu/kvm.h"
98
#include "kvm_arm.h"
99
#include "internals.h"
100
-#include "hw/arm/arm.h"
101
102
static bool have_guest_debug;
103
108
--
104
--
109
2.7.4
105
2.20.1
110
106
111
107
diff view generated by jsdifflib
1
Current recommended style is to log a guest error on bad register
1
The header file hw/arm/arm.h now includes only declarations
2
accesses, not kill the whole system with hw_error(). Change the
2
relating to hw/arm/boot.c functionality. Rename it accordingly,
3
hw_error() calls to log as LOG_GUEST_ERROR or LOG_UNIMP or use
3
and adjust its header comment.
4
g_assert_not_reached() as appropriate.
4
5
The bulk of this commit was created via
6
perl -pi -e 's|hw/arm/arm.h|hw/arm/boot.h|' hw/arm/*.c include/hw/arm/*.h
7
8
In a few cases we can just delete the #include:
9
hw/arm/msf2-soc.c, include/hw/arm/aspeed_soc.h and
10
include/hw/arm/bcm2836.h did not require it.
5
11
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
7
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
13
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8
Message-id: 1491486314-25823-1-git-send-email-peter.maydell@linaro.org
14
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
15
Message-id: 20190516163857.6430-4-peter.maydell@linaro.org
9
---
16
---
10
hw/arm/stellaris.c | 60 +++++++++++++++++++++++++++++++++---------------------
17
include/hw/arm/allwinner-a10.h | 2 +-
11
1 file changed, 37 insertions(+), 23 deletions(-)
18
include/hw/arm/aspeed_soc.h | 1 -
19
include/hw/arm/bcm2836.h | 1 -
20
include/hw/arm/{arm.h => boot.h} | 8 ++++----
21
include/hw/arm/fsl-imx25.h | 2 +-
22
include/hw/arm/fsl-imx31.h | 2 +-
23
include/hw/arm/fsl-imx6.h | 2 +-
24
include/hw/arm/fsl-imx6ul.h | 2 +-
25
include/hw/arm/fsl-imx7.h | 2 +-
26
include/hw/arm/virt.h | 2 +-
27
include/hw/arm/xlnx-versal.h | 2 +-
28
include/hw/arm/xlnx-zynqmp.h | 2 +-
29
hw/arm/armsse.c | 2 +-
30
hw/arm/armv7m.c | 2 +-
31
hw/arm/aspeed.c | 2 +-
32
hw/arm/boot.c | 2 +-
33
hw/arm/collie.c | 2 +-
34
hw/arm/exynos4210.c | 2 +-
35
hw/arm/exynos4_boards.c | 2 +-
36
hw/arm/highbank.c | 2 +-
37
hw/arm/integratorcp.c | 2 +-
38
hw/arm/mainstone.c | 2 +-
39
hw/arm/microbit.c | 2 +-
40
hw/arm/mps2-tz.c | 2 +-
41
hw/arm/mps2.c | 2 +-
42
hw/arm/msf2-soc.c | 1 -
43
hw/arm/msf2-som.c | 2 +-
44
hw/arm/musca.c | 2 +-
45
hw/arm/musicpal.c | 2 +-
46
hw/arm/netduino2.c | 2 +-
47
hw/arm/nrf51_soc.c | 2 +-
48
hw/arm/nseries.c | 2 +-
49
hw/arm/omap1.c | 2 +-
50
hw/arm/omap2.c | 2 +-
51
hw/arm/omap_sx1.c | 2 +-
52
hw/arm/palm.c | 2 +-
53
hw/arm/raspi.c | 2 +-
54
hw/arm/realview.c | 2 +-
55
hw/arm/spitz.c | 2 +-
56
hw/arm/stellaris.c | 2 +-
57
hw/arm/stm32f205_soc.c | 2 +-
58
hw/arm/strongarm.c | 2 +-
59
hw/arm/tosa.c | 2 +-
60
hw/arm/versatilepb.c | 2 +-
61
hw/arm/vexpress.c | 2 +-
62
hw/arm/virt.c | 2 +-
63
hw/arm/xilinx_zynq.c | 2 +-
64
hw/arm/xlnx-versal.c | 2 +-
65
hw/arm/z2.c | 2 +-
66
49 files changed, 49 insertions(+), 52 deletions(-)
67
rename include/hw/arm/{arm.h => boot.h} (98%)
12
68
69
diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h
70
index XXXXXXX..XXXXXXX 100644
71
--- a/include/hw/arm/allwinner-a10.h
72
+++ b/include/hw/arm/allwinner-a10.h
73
@@ -XXX,XX +XXX,XX @@
74
#include "qemu-common.h"
75
#include "qemu/error-report.h"
76
#include "hw/char/serial.h"
77
-#include "hw/arm/arm.h"
78
+#include "hw/arm/boot.h"
79
#include "hw/timer/allwinner-a10-pit.h"
80
#include "hw/intc/allwinner-a10-pic.h"
81
#include "hw/net/allwinner_emac.h"
82
diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h
83
index XXXXXXX..XXXXXXX 100644
84
--- a/include/hw/arm/aspeed_soc.h
85
+++ b/include/hw/arm/aspeed_soc.h
86
@@ -XXX,XX +XXX,XX @@
87
#ifndef ASPEED_SOC_H
88
#define ASPEED_SOC_H
89
90
-#include "hw/arm/arm.h"
91
#include "hw/intc/aspeed_vic.h"
92
#include "hw/misc/aspeed_scu.h"
93
#include "hw/misc/aspeed_sdmc.h"
94
diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h
95
index XXXXXXX..XXXXXXX 100644
96
--- a/include/hw/arm/bcm2836.h
97
+++ b/include/hw/arm/bcm2836.h
98
@@ -XXX,XX +XXX,XX @@
99
#ifndef BCM2836_H
100
#define BCM2836_H
101
102
-#include "hw/arm/arm.h"
103
#include "hw/arm/bcm2835_peripherals.h"
104
#include "hw/intc/bcm2836_control.h"
105
106
diff --git a/include/hw/arm/arm.h b/include/hw/arm/boot.h
107
similarity index 98%
108
rename from include/hw/arm/arm.h
109
rename to include/hw/arm/boot.h
110
index XXXXXXX..XXXXXXX 100644
111
--- a/include/hw/arm/arm.h
112
+++ b/include/hw/arm/boot.h
113
@@ -XXX,XX +XXX,XX @@
114
/*
115
- * Misc ARM declarations
116
+ * ARM kernel loader.
117
*
118
* Copyright (c) 2006 CodeSourcery.
119
* Written by Paul Brook
120
@@ -XXX,XX +XXX,XX @@
121
*
122
*/
123
124
-#ifndef HW_ARM_H
125
-#define HW_ARM_H
126
+#ifndef HW_ARM_BOOT_H
127
+#define HW_ARM_BOOT_H
128
129
#include "exec/memory.h"
130
#include "target/arm/cpu-qom.h"
131
@@ -XXX,XX +XXX,XX @@ void arm_write_secure_board_setup_dummy_smc(ARMCPU *cpu,
132
const struct arm_boot_info *info,
133
hwaddr mvbar_addr);
134
135
-#endif /* HW_ARM_H */
136
+#endif /* HW_ARM_BOOT_H */
137
diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h
138
index XXXXXXX..XXXXXXX 100644
139
--- a/include/hw/arm/fsl-imx25.h
140
+++ b/include/hw/arm/fsl-imx25.h
141
@@ -XXX,XX +XXX,XX @@
142
#ifndef FSL_IMX25_H
143
#define FSL_IMX25_H
144
145
-#include "hw/arm/arm.h"
146
+#include "hw/arm/boot.h"
147
#include "hw/intc/imx_avic.h"
148
#include "hw/misc/imx25_ccm.h"
149
#include "hw/char/imx_serial.h"
150
diff --git a/include/hw/arm/fsl-imx31.h b/include/hw/arm/fsl-imx31.h
151
index XXXXXXX..XXXXXXX 100644
152
--- a/include/hw/arm/fsl-imx31.h
153
+++ b/include/hw/arm/fsl-imx31.h
154
@@ -XXX,XX +XXX,XX @@
155
#ifndef FSL_IMX31_H
156
#define FSL_IMX31_H
157
158
-#include "hw/arm/arm.h"
159
+#include "hw/arm/boot.h"
160
#include "hw/intc/imx_avic.h"
161
#include "hw/misc/imx31_ccm.h"
162
#include "hw/char/imx_serial.h"
163
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
164
index XXXXXXX..XXXXXXX 100644
165
--- a/include/hw/arm/fsl-imx6.h
166
+++ b/include/hw/arm/fsl-imx6.h
167
@@ -XXX,XX +XXX,XX @@
168
#ifndef FSL_IMX6_H
169
#define FSL_IMX6_H
170
171
-#include "hw/arm/arm.h"
172
+#include "hw/arm/boot.h"
173
#include "hw/cpu/a9mpcore.h"
174
#include "hw/misc/imx6_ccm.h"
175
#include "hw/misc/imx6_src.h"
176
diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h
177
index XXXXXXX..XXXXXXX 100644
178
--- a/include/hw/arm/fsl-imx6ul.h
179
+++ b/include/hw/arm/fsl-imx6ul.h
180
@@ -XXX,XX +XXX,XX @@
181
#ifndef FSL_IMX6UL_H
182
#define FSL_IMX6UL_H
183
184
-#include "hw/arm/arm.h"
185
+#include "hw/arm/boot.h"
186
#include "hw/cpu/a15mpcore.h"
187
#include "hw/misc/imx6ul_ccm.h"
188
#include "hw/misc/imx6_src.h"
189
diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h
190
index XXXXXXX..XXXXXXX 100644
191
--- a/include/hw/arm/fsl-imx7.h
192
+++ b/include/hw/arm/fsl-imx7.h
193
@@ -XXX,XX +XXX,XX @@
194
#ifndef FSL_IMX7_H
195
#define FSL_IMX7_H
196
197
-#include "hw/arm/arm.h"
198
+#include "hw/arm/boot.h"
199
#include "hw/cpu/a15mpcore.h"
200
#include "hw/intc/imx_gpcv2.h"
201
#include "hw/misc/imx7_ccm.h"
202
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
203
index XXXXXXX..XXXXXXX 100644
204
--- a/include/hw/arm/virt.h
205
+++ b/include/hw/arm/virt.h
206
@@ -XXX,XX +XXX,XX @@
207
#include "exec/hwaddr.h"
208
#include "qemu/notify.h"
209
#include "hw/boards.h"
210
-#include "hw/arm/arm.h"
211
+#include "hw/arm/boot.h"
212
#include "hw/block/flash.h"
213
#include "sysemu/kvm.h"
214
#include "hw/intc/arm_gicv3_common.h"
215
diff --git a/include/hw/arm/xlnx-versal.h b/include/hw/arm/xlnx-versal.h
216
index XXXXXXX..XXXXXXX 100644
217
--- a/include/hw/arm/xlnx-versal.h
218
+++ b/include/hw/arm/xlnx-versal.h
219
@@ -XXX,XX +XXX,XX @@
220
#define XLNX_VERSAL_H
221
222
#include "hw/sysbus.h"
223
-#include "hw/arm/arm.h"
224
+#include "hw/arm/boot.h"
225
#include "hw/intc/arm_gicv3.h"
226
227
#define TYPE_XLNX_VERSAL "xlnx-versal"
228
diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
229
index XXXXXXX..XXXXXXX 100644
230
--- a/include/hw/arm/xlnx-zynqmp.h
231
+++ b/include/hw/arm/xlnx-zynqmp.h
232
@@ -XXX,XX +XXX,XX @@
233
#ifndef XLNX_ZYNQMP_H
234
235
#include "qemu-common.h"
236
-#include "hw/arm/arm.h"
237
+#include "hw/arm/boot.h"
238
#include "hw/intc/arm_gic.h"
239
#include "hw/net/cadence_gem.h"
240
#include "hw/char/cadence_uart.h"
241
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
242
index XXXXXXX..XXXXXXX 100644
243
--- a/hw/arm/armsse.c
244
+++ b/hw/arm/armsse.c
245
@@ -XXX,XX +XXX,XX @@
246
#include "hw/sysbus.h"
247
#include "hw/registerfields.h"
248
#include "hw/arm/armsse.h"
249
-#include "hw/arm/arm.h"
250
+#include "hw/arm/boot.h"
251
252
/* Format of the System Information block SYS_CONFIG register */
253
typedef enum SysConfigFormat {
254
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
255
index XXXXXXX..XXXXXXX 100644
256
--- a/hw/arm/armv7m.c
257
+++ b/hw/arm/armv7m.c
258
@@ -XXX,XX +XXX,XX @@
259
#include "qemu-common.h"
260
#include "cpu.h"
261
#include "hw/sysbus.h"
262
-#include "hw/arm/arm.h"
263
+#include "hw/arm/boot.h"
264
#include "hw/loader.h"
265
#include "elf.h"
266
#include "sysemu/qtest.h"
267
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
268
index XXXXXXX..XXXXXXX 100644
269
--- a/hw/arm/aspeed.c
270
+++ b/hw/arm/aspeed.c
271
@@ -XXX,XX +XXX,XX @@
272
#include "qemu-common.h"
273
#include "cpu.h"
274
#include "exec/address-spaces.h"
275
-#include "hw/arm/arm.h"
276
+#include "hw/arm/boot.h"
277
#include "hw/arm/aspeed.h"
278
#include "hw/arm/aspeed_soc.h"
279
#include "hw/boards.h"
280
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
281
index XXXXXXX..XXXXXXX 100644
282
--- a/hw/arm/boot.c
283
+++ b/hw/arm/boot.c
284
@@ -XXX,XX +XXX,XX @@
285
#include "qapi/error.h"
286
#include <libfdt.h>
287
#include "hw/hw.h"
288
-#include "hw/arm/arm.h"
289
+#include "hw/arm/boot.h"
290
#include "hw/arm/linux-boot-if.h"
291
#include "sysemu/kvm.h"
292
#include "sysemu/sysemu.h"
293
diff --git a/hw/arm/collie.c b/hw/arm/collie.c
294
index XXXXXXX..XXXXXXX 100644
295
--- a/hw/arm/collie.c
296
+++ b/hw/arm/collie.c
297
@@ -XXX,XX +XXX,XX @@
298
#include "hw/sysbus.h"
299
#include "hw/boards.h"
300
#include "strongarm.h"
301
-#include "hw/arm/arm.h"
302
+#include "hw/arm/boot.h"
303
#include "hw/block/flash.h"
304
#include "exec/address-spaces.h"
305
#include "cpu.h"
306
diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
307
index XXXXXXX..XXXXXXX 100644
308
--- a/hw/arm/exynos4210.c
309
+++ b/hw/arm/exynos4210.c
310
@@ -XXX,XX +XXX,XX @@
311
#include "hw/boards.h"
312
#include "sysemu/sysemu.h"
313
#include "hw/sysbus.h"
314
-#include "hw/arm/arm.h"
315
+#include "hw/arm/boot.h"
316
#include "hw/loader.h"
317
#include "hw/arm/exynos4210.h"
318
#include "hw/sd/sdhci.h"
319
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
320
index XXXXXXX..XXXXXXX 100644
321
--- a/hw/arm/exynos4_boards.c
322
+++ b/hw/arm/exynos4_boards.c
323
@@ -XXX,XX +XXX,XX @@
324
#include "sysemu/sysemu.h"
325
#include "hw/sysbus.h"
326
#include "net/net.h"
327
-#include "hw/arm/arm.h"
328
+#include "hw/arm/boot.h"
329
#include "exec/address-spaces.h"
330
#include "hw/arm/exynos4210.h"
331
#include "hw/net/lan9118.h"
332
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
333
index XXXXXXX..XXXXXXX 100644
334
--- a/hw/arm/highbank.c
335
+++ b/hw/arm/highbank.c
336
@@ -XXX,XX +XXX,XX @@
337
#include "qemu/osdep.h"
338
#include "qapi/error.h"
339
#include "hw/sysbus.h"
340
-#include "hw/arm/arm.h"
341
+#include "hw/arm/boot.h"
342
#include "hw/loader.h"
343
#include "net/net.h"
344
#include "sysemu/kvm.h"
345
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
346
index XXXXXXX..XXXXXXX 100644
347
--- a/hw/arm/integratorcp.c
348
+++ b/hw/arm/integratorcp.c
349
@@ -XXX,XX +XXX,XX @@
350
#include "cpu.h"
351
#include "hw/sysbus.h"
352
#include "hw/boards.h"
353
-#include "hw/arm/arm.h"
354
+#include "hw/arm/boot.h"
355
#include "hw/misc/arm_integrator_debug.h"
356
#include "hw/net/smc91c111.h"
357
#include "net/net.h"
358
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
359
index XXXXXXX..XXXXXXX 100644
360
--- a/hw/arm/mainstone.c
361
+++ b/hw/arm/mainstone.c
362
@@ -XXX,XX +XXX,XX @@
363
#include "qapi/error.h"
364
#include "hw/hw.h"
365
#include "hw/arm/pxa.h"
366
-#include "hw/arm/arm.h"
367
+#include "hw/arm/boot.h"
368
#include "net/net.h"
369
#include "hw/net/smc91c111.h"
370
#include "hw/boards.h"
371
diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c
372
index XXXXXXX..XXXXXXX 100644
373
--- a/hw/arm/microbit.c
374
+++ b/hw/arm/microbit.c
375
@@ -XXX,XX +XXX,XX @@
376
#include "qemu/osdep.h"
377
#include "qapi/error.h"
378
#include "hw/boards.h"
379
-#include "hw/arm/arm.h"
380
+#include "hw/arm/boot.h"
381
#include "sysemu/sysemu.h"
382
#include "exec/address-spaces.h"
383
384
diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
385
index XXXXXXX..XXXXXXX 100644
386
--- a/hw/arm/mps2-tz.c
387
+++ b/hw/arm/mps2-tz.c
388
@@ -XXX,XX +XXX,XX @@
389
#include "qemu/osdep.h"
390
#include "qapi/error.h"
391
#include "qemu/error-report.h"
392
-#include "hw/arm/arm.h"
393
+#include "hw/arm/boot.h"
394
#include "hw/arm/armv7m.h"
395
#include "hw/or-irq.h"
396
#include "hw/boards.h"
397
diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c
398
index XXXXXXX..XXXXXXX 100644
399
--- a/hw/arm/mps2.c
400
+++ b/hw/arm/mps2.c
401
@@ -XXX,XX +XXX,XX @@
402
#include "qemu/osdep.h"
403
#include "qapi/error.h"
404
#include "qemu/error-report.h"
405
-#include "hw/arm/arm.h"
406
+#include "hw/arm/boot.h"
407
#include "hw/arm/armv7m.h"
408
#include "hw/or-irq.h"
409
#include "hw/boards.h"
410
diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c
411
index XXXXXXX..XXXXXXX 100644
412
--- a/hw/arm/msf2-soc.c
413
+++ b/hw/arm/msf2-soc.c
414
@@ -XXX,XX +XXX,XX @@
415
#include "qemu/units.h"
416
#include "qapi/error.h"
417
#include "qemu-common.h"
418
-#include "hw/arm/arm.h"
419
#include "exec/address-spaces.h"
420
#include "hw/char/serial.h"
421
#include "hw/boards.h"
422
diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c
423
index XXXXXXX..XXXXXXX 100644
424
--- a/hw/arm/msf2-som.c
425
+++ b/hw/arm/msf2-som.c
426
@@ -XXX,XX +XXX,XX @@
427
#include "qapi/error.h"
428
#include "qemu/error-report.h"
429
#include "hw/boards.h"
430
-#include "hw/arm/arm.h"
431
+#include "hw/arm/boot.h"
432
#include "exec/address-spaces.h"
433
#include "hw/arm/msf2-soc.h"
434
#include "cpu.h"
435
diff --git a/hw/arm/musca.c b/hw/arm/musca.c
436
index XXXXXXX..XXXXXXX 100644
437
--- a/hw/arm/musca.c
438
+++ b/hw/arm/musca.c
439
@@ -XXX,XX +XXX,XX @@
440
#include "qapi/error.h"
441
#include "exec/address-spaces.h"
442
#include "sysemu/sysemu.h"
443
-#include "hw/arm/arm.h"
444
+#include "hw/arm/boot.h"
445
#include "hw/arm/armsse.h"
446
#include "hw/boards.h"
447
#include "hw/char/pl011.h"
448
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
449
index XXXXXXX..XXXXXXX 100644
450
--- a/hw/arm/musicpal.c
451
+++ b/hw/arm/musicpal.c
452
@@ -XXX,XX +XXX,XX @@
453
#include "qemu-common.h"
454
#include "cpu.h"
455
#include "hw/sysbus.h"
456
-#include "hw/arm/arm.h"
457
+#include "hw/arm/boot.h"
458
#include "net/net.h"
459
#include "sysemu/sysemu.h"
460
#include "hw/boards.h"
461
diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c
462
index XXXXXXX..XXXXXXX 100644
463
--- a/hw/arm/netduino2.c
464
+++ b/hw/arm/netduino2.c
465
@@ -XXX,XX +XXX,XX @@
466
#include "hw/boards.h"
467
#include "qemu/error-report.h"
468
#include "hw/arm/stm32f205_soc.h"
469
-#include "hw/arm/arm.h"
470
+#include "hw/arm/boot.h"
471
472
static void netduino2_init(MachineState *machine)
473
{
474
diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
475
index XXXXXXX..XXXXXXX 100644
476
--- a/hw/arm/nrf51_soc.c
477
+++ b/hw/arm/nrf51_soc.c
478
@@ -XXX,XX +XXX,XX @@
479
#include "qemu/osdep.h"
480
#include "qapi/error.h"
481
#include "qemu-common.h"
482
-#include "hw/arm/arm.h"
483
+#include "hw/arm/boot.h"
484
#include "hw/sysbus.h"
485
#include "hw/boards.h"
486
#include "hw/misc/unimp.h"
487
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
488
index XXXXXXX..XXXXXXX 100644
489
--- a/hw/arm/nseries.c
490
+++ b/hw/arm/nseries.c
491
@@ -XXX,XX +XXX,XX @@
492
#include "qemu/bswap.h"
493
#include "sysemu/sysemu.h"
494
#include "hw/arm/omap.h"
495
-#include "hw/arm/arm.h"
496
+#include "hw/arm/boot.h"
497
#include "hw/irq.h"
498
#include "ui/console.h"
499
#include "hw/boards.h"
500
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
501
index XXXXXXX..XXXXXXX 100644
502
--- a/hw/arm/omap1.c
503
+++ b/hw/arm/omap1.c
504
@@ -XXX,XX +XXX,XX @@
505
#include "cpu.h"
506
#include "hw/boards.h"
507
#include "hw/hw.h"
508
-#include "hw/arm/arm.h"
509
+#include "hw/arm/boot.h"
510
#include "hw/arm/omap.h"
511
#include "sysemu/sysemu.h"
512
#include "hw/arm/soc_dma.h"
513
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
514
index XXXXXXX..XXXXXXX 100644
515
--- a/hw/arm/omap2.c
516
+++ b/hw/arm/omap2.c
517
@@ -XXX,XX +XXX,XX @@
518
#include "sysemu/qtest.h"
519
#include "hw/boards.h"
520
#include "hw/hw.h"
521
-#include "hw/arm/arm.h"
522
+#include "hw/arm/boot.h"
523
#include "hw/arm/omap.h"
524
#include "sysemu/sysemu.h"
525
#include "qemu/timer.h"
526
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
527
index XXXXXXX..XXXXXXX 100644
528
--- a/hw/arm/omap_sx1.c
529
+++ b/hw/arm/omap_sx1.c
530
@@ -XXX,XX +XXX,XX @@
531
#include "ui/console.h"
532
#include "hw/arm/omap.h"
533
#include "hw/boards.h"
534
-#include "hw/arm/arm.h"
535
+#include "hw/arm/boot.h"
536
#include "hw/block/flash.h"
537
#include "sysemu/qtest.h"
538
#include "exec/address-spaces.h"
539
diff --git a/hw/arm/palm.c b/hw/arm/palm.c
540
index XXXXXXX..XXXXXXX 100644
541
--- a/hw/arm/palm.c
542
+++ b/hw/arm/palm.c
543
@@ -XXX,XX +XXX,XX @@
544
#include "ui/console.h"
545
#include "hw/arm/omap.h"
546
#include "hw/boards.h"
547
-#include "hw/arm/arm.h"
548
+#include "hw/arm/boot.h"
549
#include "hw/input/tsc2xxx.h"
550
#include "hw/loader.h"
551
#include "exec/address-spaces.h"
552
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
553
index XXXXXXX..XXXXXXX 100644
554
--- a/hw/arm/raspi.c
555
+++ b/hw/arm/raspi.c
556
@@ -XXX,XX +XXX,XX @@
557
#include "qemu/error-report.h"
558
#include "hw/boards.h"
559
#include "hw/loader.h"
560
-#include "hw/arm/arm.h"
561
+#include "hw/arm/boot.h"
562
#include "sysemu/sysemu.h"
563
564
#define SMPBOOT_ADDR 0x300 /* this should leave enough space for ATAGS */
565
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
566
index XXXXXXX..XXXXXXX 100644
567
--- a/hw/arm/realview.c
568
+++ b/hw/arm/realview.c
569
@@ -XXX,XX +XXX,XX @@
570
#include "qemu-common.h"
571
#include "cpu.h"
572
#include "hw/sysbus.h"
573
-#include "hw/arm/arm.h"
574
+#include "hw/arm/boot.h"
575
#include "hw/arm/primecell.h"
576
#include "hw/net/lan9118.h"
577
#include "hw/net/smc91c111.h"
578
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
579
index XXXXXXX..XXXXXXX 100644
580
--- a/hw/arm/spitz.c
581
+++ b/hw/arm/spitz.c
582
@@ -XXX,XX +XXX,XX @@
583
#include "qapi/error.h"
584
#include "hw/hw.h"
585
#include "hw/arm/pxa.h"
586
-#include "hw/arm/arm.h"
587
+#include "hw/arm/boot.h"
588
#include "sysemu/sysemu.h"
589
#include "hw/pcmcia.h"
590
#include "hw/i2c/i2c.h"
13
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
591
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
14
index XXXXXXX..XXXXXXX 100644
592
index XXXXXXX..XXXXXXX 100644
15
--- a/hw/arm/stellaris.c
593
--- a/hw/arm/stellaris.c
16
+++ b/hw/arm/stellaris.c
594
+++ b/hw/arm/stellaris.c
17
@@ -XXX,XX +XXX,XX @@ static void gptm_reload(gptm_state *s, int n, int reset)
595
@@ -XXX,XX +XXX,XX @@
18
} else if (s->mode[n] == 0xa) {
596
#include "qapi/error.h"
19
/* PWM mode. Not implemented. */
597
#include "hw/sysbus.h"
20
} else {
598
#include "hw/ssi/ssi.h"
21
- hw_error("TODO: 16-bit timer mode 0x%x\n", s->mode[n]);
599
-#include "hw/arm/arm.h"
22
+ qemu_log_mask(LOG_UNIMP,
600
+#include "hw/arm/boot.h"
23
+ "GPTM: 16-bit timer mode unimplemented: 0x%x\n",
601
#include "qemu/timer.h"
24
+ s->mode[n]);
602
#include "hw/i2c/i2c.h"
25
+ return;
603
#include "net/net.h"
26
}
604
diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c
27
s->tick[n] = tick;
605
index XXXXXXX..XXXXXXX 100644
28
timer_mod(s->timer[n], tick);
606
--- a/hw/arm/stm32f205_soc.c
29
@@ -XXX,XX +XXX,XX @@ static void gptm_tick(void *opaque)
607
+++ b/hw/arm/stm32f205_soc.c
30
} else if (s->mode[n] == 0xa) {
608
@@ -XXX,XX +XXX,XX @@
31
/* PWM mode. Not implemented. */
609
#include "qemu/osdep.h"
32
} else {
610
#include "qapi/error.h"
33
- hw_error("TODO: 16-bit timer mode 0x%x\n", s->mode[n]);
611
#include "qemu-common.h"
34
+ qemu_log_mask(LOG_UNIMP,
612
-#include "hw/arm/arm.h"
35
+ "GPTM: 16-bit timer mode unimplemented: 0x%x\n",
613
+#include "hw/arm/boot.h"
36
+ s->mode[n]);
614
#include "exec/address-spaces.h"
37
}
615
#include "hw/arm/stm32f205_soc.h"
38
gptm_update_irq(s);
616
39
}
617
diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c
40
@@ -XXX,XX +XXX,XX @@ static void gptm_write(void *opaque, hwaddr offset,
618
index XXXXXXX..XXXXXXX 100644
41
s->match_prescale[0] = value;
619
--- a/hw/arm/strongarm.c
42
break;
620
+++ b/hw/arm/strongarm.c
43
default:
621
@@ -XXX,XX +XXX,XX @@
44
- hw_error("gptm_write: Bad offset 0x%x\n", (int)offset);
622
#include "hw/sysbus.h"
45
+ qemu_log_mask(LOG_GUEST_ERROR,
623
#include "strongarm.h"
46
+ "GPTM: read at bad offset 0x%x\n", (int)offset);
624
#include "qemu/error-report.h"
47
}
625
-#include "hw/arm/arm.h"
48
gptm_update_irq(s);
626
+#include "hw/arm/boot.h"
49
}
627
#include "chardev/char-fe.h"
50
@@ -XXX,XX +XXX,XX @@ static int ssys_board_class(const ssys_state *s)
628
#include "chardev/char-serial.h"
51
}
629
#include "sysemu/sysemu.h"
52
/* for unknown classes, fall through */
630
diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c
53
default:
631
index XXXXXXX..XXXXXXX 100644
54
- hw_error("ssys_board_class: Unknown class 0x%08x\n", did0);
632
--- a/hw/arm/tosa.c
55
+ /* This can only happen if the hardwired constant did0 value
633
+++ b/hw/arm/tosa.c
56
+ * in this board's stellaris_board_info struct is wrong.
634
@@ -XXX,XX +XXX,XX @@
57
+ */
635
#include "qapi/error.h"
58
+ g_assert_not_reached();
636
#include "hw/hw.h"
59
}
637
#include "hw/arm/pxa.h"
60
}
638
-#include "hw/arm/arm.h"
61
639
+#include "hw/arm/boot.h"
62
@@ -XXX,XX +XXX,XX @@ static uint64_t ssys_read(void *opaque, hwaddr offset,
640
#include "hw/arm/sharpsl.h"
63
case DID0_CLASS_SANDSTORM:
641
#include "hw/pcmcia.h"
64
return pllcfg_sandstorm[xtal];
642
#include "hw/boards.h"
65
default:
643
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
66
- hw_error("ssys_read: Unhandled class for PLLCFG read.\n");
644
index XXXXXXX..XXXXXXX 100644
67
- return 0;
645
--- a/hw/arm/versatilepb.c
68
+ g_assert_not_reached();
646
+++ b/hw/arm/versatilepb.c
69
}
647
@@ -XXX,XX +XXX,XX @@
70
}
648
#include "qemu-common.h"
71
case 0x070: /* RCC2 */
649
#include "cpu.h"
72
@@ -XXX,XX +XXX,XX @@ static uint64_t ssys_read(void *opaque, hwaddr offset,
650
#include "hw/sysbus.h"
73
case 0x1e4: /* USER1 */
651
-#include "hw/arm/arm.h"
74
return s->user1;
652
+#include "hw/arm/boot.h"
75
default:
653
#include "hw/net/smc91c111.h"
76
- hw_error("ssys_read: Bad offset 0x%x\n", (int)offset);
654
#include "net/net.h"
77
+ qemu_log_mask(LOG_GUEST_ERROR,
655
#include "sysemu/sysemu.h"
78
+ "SSYS: read at bad offset 0x%x\n", (int)offset);
656
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
79
return 0;
657
index XXXXXXX..XXXXXXX 100644
80
}
658
--- a/hw/arm/vexpress.c
81
}
659
+++ b/hw/arm/vexpress.c
82
@@ -XXX,XX +XXX,XX @@ static void ssys_write(void *opaque, hwaddr offset,
660
@@ -XXX,XX +XXX,XX @@
83
s->ldoarst = value;
661
#include "qemu-common.h"
84
break;
662
#include "cpu.h"
85
default:
663
#include "hw/sysbus.h"
86
- hw_error("ssys_write: Bad offset 0x%x\n", (int)offset);
664
-#include "hw/arm/arm.h"
87
+ qemu_log_mask(LOG_GUEST_ERROR,
665
+#include "hw/arm/boot.h"
88
+ "SSYS: write at bad offset 0x%x\n", (int)offset);
666
#include "hw/arm/primecell.h"
89
}
667
#include "hw/net/lan9118.h"
90
ssys_update(s);
668
#include "hw/i2c/i2c.h"
91
}
669
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
92
@@ -XXX,XX +XXX,XX @@ static uint64_t stellaris_i2c_read(void *opaque, hwaddr offset,
670
index XXXXXXX..XXXXXXX 100644
93
case 0x20: /* MCR */
671
--- a/hw/arm/virt.c
94
return s->mcr;
672
+++ b/hw/arm/virt.c
95
default:
673
@@ -XXX,XX +XXX,XX @@
96
- hw_error("strllaris_i2c_read: Bad offset 0x%x\n", (int)offset);
674
#include "qemu/option.h"
97
+ qemu_log_mask(LOG_GUEST_ERROR,
675
#include "qapi/error.h"
98
+ "stellaris_i2c: read at bad offset 0x%x\n", (int)offset);
676
#include "hw/sysbus.h"
99
return 0;
677
-#include "hw/arm/arm.h"
100
}
678
+#include "hw/arm/boot.h"
101
}
679
#include "hw/arm/primecell.h"
102
@@ -XXX,XX +XXX,XX @@ static void stellaris_i2c_write(void *opaque, hwaddr offset,
680
#include "hw/arm/virt.h"
103
s->mris &= ~value;
681
#include "hw/block/flash.h"
104
break;
682
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
105
case 0x20: /* MCR */
683
index XXXXXXX..XXXXXXX 100644
106
- if (value & 1)
684
--- a/hw/arm/xilinx_zynq.c
107
- hw_error(
685
+++ b/hw/arm/xilinx_zynq.c
108
- "stellaris_i2c_write: Loopback not implemented\n");
686
@@ -XXX,XX +XXX,XX @@
109
- if (value & 0x20)
687
#include "qemu-common.h"
110
- hw_error(
688
#include "cpu.h"
111
- "stellaris_i2c_write: Slave mode not implemented\n");
689
#include "hw/sysbus.h"
112
+ if (value & 1) {
690
-#include "hw/arm/arm.h"
113
+ qemu_log_mask(LOG_UNIMP, "stellaris_i2c: Loopback not implemented");
691
+#include "hw/arm/boot.h"
114
+ }
692
#include "net/net.h"
115
+ if (value & 0x20) {
693
#include "exec/address-spaces.h"
116
+ qemu_log_mask(LOG_UNIMP,
694
#include "sysemu/sysemu.h"
117
+ "stellaris_i2c: Slave mode not implemented");
695
diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c
118
+ }
696
index XXXXXXX..XXXXXXX 100644
119
s->mcr = value & 0x31;
697
--- a/hw/arm/xlnx-versal.c
120
break;
698
+++ b/hw/arm/xlnx-versal.c
121
default:
699
@@ -XXX,XX +XXX,XX @@
122
- hw_error("stellaris_i2c_write: Bad offset 0x%x\n",
700
#include "net/net.h"
123
- (int)offset);
701
#include "sysemu/sysemu.h"
124
+ qemu_log_mask(LOG_GUEST_ERROR,
702
#include "sysemu/kvm.h"
125
+ "stellaris_i2c: write at bad offset 0x%x\n", (int)offset);
703
-#include "hw/arm/arm.h"
126
}
704
+#include "hw/arm/boot.h"
127
stellaris_i2c_update(s);
705
#include "kvm_arm.h"
128
}
706
#include "hw/misc/unimp.h"
129
@@ -XXX,XX +XXX,XX @@ static uint64_t stellaris_adc_read(void *opaque, hwaddr offset,
707
#include "hw/intc/arm_gicv3_common.h"
130
case 0x30: /* SAC */
708
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
131
return s->sac;
709
index XXXXXXX..XXXXXXX 100644
132
default:
710
--- a/hw/arm/z2.c
133
- hw_error("strllaris_adc_read: Bad offset 0x%x\n",
711
+++ b/hw/arm/z2.c
134
- (int)offset);
712
@@ -XXX,XX +XXX,XX @@
135
+ qemu_log_mask(LOG_GUEST_ERROR,
713
#include "qemu/osdep.h"
136
+ "stellaris_adc: read at bad offset 0x%x\n", (int)offset);
714
#include "hw/hw.h"
137
return 0;
715
#include "hw/arm/pxa.h"
138
}
716
-#include "hw/arm/arm.h"
139
}
717
+#include "hw/arm/boot.h"
140
@@ -XXX,XX +XXX,XX @@ static void stellaris_adc_write(void *opaque, hwaddr offset,
718
#include "hw/i2c/i2c.h"
141
return;
719
#include "hw/ssi/ssi.h"
142
case 0x04: /* SSCTL */
720
#include "hw/boards.h"
143
if (value != 6) {
144
- hw_error("ADC: Unimplemented sequence %" PRIx64 "\n",
145
- value);
146
+ qemu_log_mask(LOG_UNIMP,
147
+ "ADC: Unimplemented sequence %" PRIx64 "\n",
148
+ value);
149
}
150
s->ssctl[n] = value;
151
return;
152
@@ -XXX,XX +XXX,XX @@ static void stellaris_adc_write(void *opaque, hwaddr offset,
153
s->sspri = value;
154
break;
155
case 0x28: /* PSSI */
156
- hw_error("Not implemented: ADC sample initiate\n");
157
+ qemu_log_mask(LOG_UNIMP, "ADC: sample initiate unimplemented");
158
break;
159
case 0x30: /* SAC */
160
s->sac = value;
161
break;
162
default:
163
- hw_error("stellaris_adc_write: Bad offset 0x%x\n", (int)offset);
164
+ qemu_log_mask(LOG_GUEST_ERROR,
165
+ "stellaris_adc: write at bad offset 0x%x\n", (int)offset);
166
}
167
stellaris_adc_update(s);
168
}
169
--
721
--
170
2.7.4
722
2.20.1
171
723
172
724
diff view generated by jsdifflib
1
In Thumb mode, the only instructions which can cause an interworking
1
In ich_vmcr_write() we enforce "writes of BPR fields to less than
2
branch by writing the PC are BLX, BX, BXJ, LDR, POP and LDM. Unlike
2
their minimum sets them to the minimum" by doing a "read vbpr and
3
ARM mode, data processing instructions which target the PC do not
3
write it back" operation. A typo here meant that we weren't handling
4
cause interworking branches.
4
writes to these fields correctly, because we were reading from VBPR0
5
5
but writing to VBPR1.
6
When we added support for doing interworking branches on writes to
7
PC from data processing instructions in commit 21aeb3430ce7ba, we
8
accidentally changed a Thumb instruction to have interworking
9
branch behaviour for writes to PC. (MOV, MOVS register-shifted
10
register, encoding T2; this is the standard encoding for
11
LSL/LSR/ASR/ROR (register).)
12
13
For this encoding, behaviour with Rd == R15 is specified as
14
UNPREDICTABLE, so allowing an interworking branch is within
15
spec, but it's confusing and differs from our handling of this
16
class of UNPREDICTABLE for other Thumb ALU operations. Make
17
it perform a simple (non-interworking) branch like the others.
18
6
19
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
7
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
20
Reviewed-by: Richard Henderson <rth@twiddle.net>
8
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
21
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
9
Message-id: 20190520162809.2677-4-peter.maydell@linaro.org
22
Message-id: 1491844419-12485-3-git-send-email-peter.maydell@linaro.org
23
---
10
---
24
target/arm/translate.c | 2 +-
11
hw/intc/arm_gicv3_cpuif.c | 2 +-
25
1 file changed, 1 insertion(+), 1 deletion(-)
12
1 file changed, 1 insertion(+), 1 deletion(-)
26
13
27
diff --git a/target/arm/translate.c b/target/arm/translate.c
14
diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c
28
index XXXXXXX..XXXXXXX 100644
15
index XXXXXXX..XXXXXXX 100644
29
--- a/target/arm/translate.c
16
--- a/hw/intc/arm_gicv3_cpuif.c
30
+++ b/target/arm/translate.c
17
+++ b/hw/intc/arm_gicv3_cpuif.c
31
@@ -XXX,XX +XXX,XX @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
18
@@ -XXX,XX +XXX,XX @@ static void ich_vmcr_write(CPUARMState *env, const ARMCPRegInfo *ri,
32
gen_arm_shift_reg(tmp, op, tmp2, logic_cc);
19
/* Enforce "writing BPRs to less than minimum sets them to the minimum"
33
if (logic_cc)
20
* by reading and writing back the fields.
34
gen_logic_CC(tmp);
21
*/
35
- store_reg_bx(s, rd, tmp);
22
- write_vbpr(cs, GICV3_G1, read_vbpr(cs, GICV3_G0));
36
+ store_reg(s, rd, tmp);
23
+ write_vbpr(cs, GICV3_G0, read_vbpr(cs, GICV3_G0));
37
break;
24
write_vbpr(cs, GICV3_G1, read_vbpr(cs, GICV3_G1));
38
case 1: /* Sign/zero extend. */
25
39
op = (insn >> 20) & 7;
26
gicv3_cpuif_virt_update(cs);
40
--
27
--
41
2.7.4
28
2.20.1
42
29
43
30
diff view generated by jsdifflib
1
From: Ishani Chugh <chugh.ishani@research.iiit.ac.in>
1
The ICC_CTLR_EL3 register includes some bits which are aliases
2
of bits in the ICC_CTLR_EL1(S) and (NS) registers. QEMU chooses
3
to keep those bits in the cs->icc_ctlr_el1[] struct fields.
4
Unfortunately a missing '~' in the code to update the bits
5
in those fields meant that writing to ICC_CTLR_EL3 would corrupt
6
the ICC_CLTR_EL1 register values.
2
7
3
Signed-off-by: Ishani Chugh <chugh.ishani@research.iiit.ac.in>
4
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
5
Message-id: 1491629987-6826-1-git-send-email-chugh.ishani@research.iiit.ac.in
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
10
Message-id: 20190520162809.2677-5-peter.maydell@linaro.org
7
---
11
---
8
target/arm/kvm64.c | 4 ++--
12
hw/intc/arm_gicv3_cpuif.c | 4 ++--
9
1 file changed, 2 insertions(+), 2 deletions(-)
13
1 file changed, 2 insertions(+), 2 deletions(-)
10
14
11
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
15
diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c
12
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
13
--- a/target/arm/kvm64.c
17
--- a/hw/intc/arm_gicv3_cpuif.c
14
+++ b/target/arm/kvm64.c
18
+++ b/hw/intc/arm_gicv3_cpuif.c
15
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debug_exit_arch *debug_exit)
19
@@ -XXX,XX +XXX,XX @@ static void icc_ctlr_el3_write(CPUARMState *env, const ARMCPRegInfo *ri,
16
* single step at this point so something has gone wrong.
20
trace_gicv3_icc_ctlr_el3_write(gicv3_redist_affid(cs), value);
17
*/
21
18
error_report("%s: guest single-step while debugging unsupported"
22
/* *_EL1NS and *_EL1S bits are aliases into the ICC_CTLR_EL1 bits. */
19
- " (%"PRIx64", %"PRIx32")\n",
23
- cs->icc_ctlr_el1[GICV3_NS] &= (ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE);
20
+ " (%"PRIx64", %"PRIx32")",
24
+ cs->icc_ctlr_el1[GICV3_NS] &= ~(ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE);
21
__func__, env->pc, debug_exit->hsr);
25
if (value & ICC_CTLR_EL3_EOIMODE_EL1NS) {
22
return false;
26
cs->icc_ctlr_el1[GICV3_NS] |= ICC_CTLR_EL1_EOIMODE;
23
}
24
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debug_exit_arch *debug_exit)
25
break;
26
}
27
}
27
default:
28
@@ -XXX,XX +XXX,XX @@ static void icc_ctlr_el3_write(CPUARMState *env, const ARMCPRegInfo *ri,
28
- error_report("%s: unhandled debug exit (%"PRIx32", %"PRIx64")\n",
29
cs->icc_ctlr_el1[GICV3_NS] |= ICC_CTLR_EL1_CBPR;
29
+ error_report("%s: unhandled debug exit (%"PRIx32", %"PRIx64")",
30
__func__, debug_exit->hsr, env->pc);
31
}
30
}
32
31
32
- cs->icc_ctlr_el1[GICV3_S] &= (ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE);
33
+ cs->icc_ctlr_el1[GICV3_S] &= ~(ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE);
34
if (value & ICC_CTLR_EL3_EOIMODE_EL1S) {
35
cs->icc_ctlr_el1[GICV3_S] |= ICC_CTLR_EL1_EOIMODE;
36
}
33
--
37
--
34
2.7.4
38
2.20.1
35
39
36
40
diff view generated by jsdifflib
1
From: Suramya Shah <shah.suramya@gmail.com>
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
2
3
Signed-off-by: Suramya Shah <shah.suramya@gmail.com>
3
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
4
Message-id: 20170415180316.2694-1-shah.suramya@gmail.com
4
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
5
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
5
Message-id: 20190520214342.13709-2-philmd@redhat.com
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
7
---
7
---
8
hw/arm/pxa2xx.c | 14 ++++++--------
8
hw/arm/exynos4_boards.c | 24 ------------------------
9
1 file changed, 6 insertions(+), 8 deletions(-)
9
1 file changed, 24 deletions(-)
10
10
11
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
11
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
12
index XXXXXXX..XXXXXXX 100644
12
index XXXXXXX..XXXXXXX 100644
13
--- a/hw/arm/pxa2xx.c
13
--- a/hw/arm/exynos4_boards.c
14
+++ b/hw/arm/pxa2xx.c
14
+++ b/hw/arm/exynos4_boards.c
15
@@ -XXX,XX +XXX,XX @@ static void pxa2xx_ssp_reset(DeviceState *d)
15
@@ -XXX,XX +XXX,XX @@
16
s->rx_start = s->rx_level = 0;
16
#include "hw/net/lan9118.h"
17
}
17
#include "hw/boards.h"
18
18
19
-static int pxa2xx_ssp_init(SysBusDevice *sbd)
19
-#undef DEBUG
20
+static void pxa2xx_ssp_init(Object *obj)
21
{
22
- DeviceState *dev = DEVICE(sbd);
23
- PXA2xxSSPState *s = PXA2XX_SSP(dev);
24
-
20
-
25
+ DeviceState *dev = DEVICE(obj);
21
-//#define DEBUG
26
+ PXA2xxSSPState *s = PXA2XX_SSP(obj);
22
-
27
+ SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
23
-#ifdef DEBUG
28
sysbus_init_irq(sbd, &s->irq);
24
- #undef PRINT_DEBUG
29
25
- #define PRINT_DEBUG(fmt, args...) \
30
- memory_region_init_io(&s->iomem, OBJECT(s), &pxa2xx_ssp_ops, s,
26
- do { \
31
+ memory_region_init_io(&s->iomem, obj, &pxa2xx_ssp_ops, s,
27
- fprintf(stderr, " [%s:%d] "fmt, __func__, __LINE__, ##args); \
32
"pxa2xx-ssp", 0x1000);
28
- } while (0)
33
sysbus_init_mmio(sbd, &s->iomem);
29
-#else
34
30
- #define PRINT_DEBUG(fmt, args...) do {} while (0)
35
s->bus = ssi_create_bus(dev, "ssi");
31
-#endif
36
- return 0;
32
-
37
}
33
#define SMDK_LAN9118_BASE_ADDR 0x05000000
38
34
39
/* Real-Time Clock */
35
typedef enum Exynos4BoardType {
40
@@ -XXX,XX +XXX,XX @@ PXA2xxState *pxa255_init(MemoryRegion *address_space, unsigned int sdram_size)
36
@@ -XXX,XX +XXX,XX @@ exynos4_boards_init_common(MachineState *machine,
41
37
exynos4_board_binfo.gic_cpu_if_addr =
42
static void pxa2xx_ssp_class_init(ObjectClass *klass, void *data)
38
EXYNOS4210_SMP_PRIVATE_BASE_ADDR + 0x100;
43
{
39
44
- SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
40
- PRINT_DEBUG("\n ram_size: %luMiB [0x%08lx]\n"
45
DeviceClass *dc = DEVICE_CLASS(klass);
41
- " kernel_filename: %s\n"
46
42
- " kernel_cmdline: %s\n"
47
- sdc->init = pxa2xx_ssp_init;
43
- " initrd_filename: %s\n",
48
dc->reset = pxa2xx_ssp_reset;
44
- exynos4_board_ram_size[board_type] / 1048576,
49
dc->vmsd = &vmstate_pxa2xx_ssp;
45
- exynos4_board_ram_size[board_type],
50
}
46
- machine->kernel_filename,
51
@@ -XXX,XX +XXX,XX @@ static const TypeInfo pxa2xx_ssp_info = {
47
- machine->kernel_cmdline,
52
.name = TYPE_PXA2XX_SSP,
48
- machine->initrd_filename);
53
.parent = TYPE_SYS_BUS_DEVICE,
49
-
54
.instance_size = sizeof(PXA2xxSSPState),
50
exynos4_boards_init_ram(s, get_system_memory(),
55
+ .instance_init = pxa2xx_ssp_init,
51
exynos4_board_ram_size[board_type]);
56
.class_init = pxa2xx_ssp_class_init,
57
};
58
52
59
--
53
--
60
2.7.4
54
2.20.1
61
55
62
56
diff view generated by jsdifflib
1
From: Krzysztof Kozlowski <krzk@kernel.org>
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
2
3
qemu_log_mask() and error_report() are preferred over fprintf() for
3
It eases code review, unit is explicit.
4
logging errors. Also remove square brackets [] and additional new line
5
characters in printed messages.
6
4
7
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
6
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
9
Message-id: 20170313184750.429-2-krzk@kernel.org
7
Message-id: 20190520214342.13709-3-philmd@redhat.com
10
[PMM: wrapped long line]
11
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
12
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
13
---
9
---
14
hw/arm/exynos4_boards.c | 7 ++++---
10
hw/arm/exynos4_boards.c | 5 +++--
15
hw/timer/exynos4210_mct.c | 6 ++++--
11
1 file changed, 3 insertions(+), 2 deletions(-)
16
hw/timer/exynos4210_pwm.c | 13 +++++++------
17
hw/timer/exynos4210_rtc.c | 19 ++++++++++---------
18
4 files changed, 25 insertions(+), 20 deletions(-)
19
12
20
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
13
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
21
index XXXXXXX..XXXXXXX 100644
14
index XXXXXXX..XXXXXXX 100644
22
--- a/hw/arm/exynos4_boards.c
15
--- a/hw/arm/exynos4_boards.c
23
+++ b/hw/arm/exynos4_boards.c
16
+++ b/hw/arm/exynos4_boards.c
24
@@ -XXX,XX +XXX,XX @@
17
@@ -XXX,XX +XXX,XX @@
25
*/
18
*/
26
19
27
#include "qemu/osdep.h"
20
#include "qemu/osdep.h"
28
+#include "qemu/error-report.h"
21
+#include "qemu/units.h"
22
#include "qapi/error.h"
23
#include "qemu/error-report.h"
29
#include "qemu-common.h"
24
#include "qemu-common.h"
30
#include "cpu.h"
25
@@ -XXX,XX +XXX,XX @@ static int exynos4_board_smp_bootreg_addr[EXYNOS4_NUM_OF_BOARDS] = {
31
#include "sysemu/sysemu.h"
26
};
32
@@ -XXX,XX +XXX,XX @@ static Exynos4210State *exynos4_boards_init_common(MachineState *machine,
27
33
MachineClass *mc = MACHINE_GET_CLASS(machine);
28
static unsigned long exynos4_board_ram_size[EXYNOS4_NUM_OF_BOARDS] = {
34
29
- [EXYNOS4_BOARD_NURI] = 0x40000000,
35
if (smp_cpus != EXYNOS4210_NCPUS && !qtest_enabled()) {
30
- [EXYNOS4_BOARD_SMDKC210] = 0x40000000,
36
- fprintf(stderr, "%s board supports only %d CPU cores. Ignoring smp_cpus"
31
+ [EXYNOS4_BOARD_NURI] = 1 * GiB,
37
- " value.\n",
32
+ [EXYNOS4_BOARD_SMDKC210] = 1 * GiB,
38
- mc->name, EXYNOS4210_NCPUS);
33
};
39
+ error_report("%s board supports only %d CPU cores, ignoring smp_cpus"
34
40
+ " value",
35
static struct arm_boot_info exynos4_board_binfo = {
41
+ mc->name, EXYNOS4210_NCPUS);
42
}
43
44
exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type];
45
diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
46
index XXXXXXX..XXXXXXX 100644
47
--- a/hw/timer/exynos4210_mct.c
48
+++ b/hw/timer/exynos4210_mct.c
49
@@ -XXX,XX +XXX,XX @@
50
*/
51
52
#include "qemu/osdep.h"
53
+#include "qemu/log.h"
54
#include "hw/sysbus.h"
55
#include "qemu/timer.h"
56
#include "qemu/main-loop.h"
57
@@ -XXX,XX +XXX,XX @@ break;
58
case L0_TCNTO: case L1_TCNTO:
59
case L0_ICNTO: case L1_ICNTO:
60
case L0_FRCNTO: case L1_FRCNTO:
61
- fprintf(stderr, "\n[exynos4210.mct: write to RO register "
62
- TARGET_FMT_plx "]\n\n", offset);
63
+ qemu_log_mask(LOG_GUEST_ERROR,
64
+ "exynos4210.mct: write to RO register " TARGET_FMT_plx,
65
+ offset);
66
break;
67
68
case L0_INT_CSTAT: case L1_INT_CSTAT:
69
diff --git a/hw/timer/exynos4210_pwm.c b/hw/timer/exynos4210_pwm.c
70
index XXXXXXX..XXXXXXX 100644
71
--- a/hw/timer/exynos4210_pwm.c
72
+++ b/hw/timer/exynos4210_pwm.c
73
@@ -XXX,XX +XXX,XX @@
74
*/
75
76
#include "qemu/osdep.h"
77
+#include "qemu/log.h"
78
#include "hw/sysbus.h"
79
#include "qemu/timer.h"
80
#include "qemu-common.h"
81
@@ -XXX,XX +XXX,XX @@ static uint64_t exynos4210_pwm_read(void *opaque, hwaddr offset,
82
break;
83
84
default:
85
- fprintf(stderr,
86
- "[exynos4210.pwm: bad read offset " TARGET_FMT_plx "]\n",
87
- offset);
88
+ qemu_log_mask(LOG_GUEST_ERROR,
89
+ "exynos4210.pwm: bad read offset " TARGET_FMT_plx,
90
+ offset);
91
break;
92
}
93
return value;
94
@@ -XXX,XX +XXX,XX @@ static void exynos4210_pwm_write(void *opaque, hwaddr offset,
95
break;
96
97
default:
98
- fprintf(stderr,
99
- "[exynos4210.pwm: bad write offset " TARGET_FMT_plx "]\n",
100
- offset);
101
+ qemu_log_mask(LOG_GUEST_ERROR,
102
+ "exynos4210.pwm: bad write offset " TARGET_FMT_plx,
103
+ offset);
104
break;
105
106
}
107
diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c
108
index XXXXXXX..XXXXXXX 100644
109
--- a/hw/timer/exynos4210_rtc.c
110
+++ b/hw/timer/exynos4210_rtc.c
111
@@ -XXX,XX +XXX,XX @@
112
*/
113
114
#include "qemu/osdep.h"
115
+#include "qemu/log.h"
116
#include "hw/sysbus.h"
117
#include "qemu/timer.h"
118
#include "qemu-common.h"
119
@@ -XXX,XX +XXX,XX @@ static uint64_t exynos4210_rtc_read(void *opaque, hwaddr offset,
120
break;
121
122
default:
123
- fprintf(stderr,
124
- "[exynos4210.rtc: bad read offset " TARGET_FMT_plx "]\n",
125
- offset);
126
+ qemu_log_mask(LOG_GUEST_ERROR,
127
+ "exynos4210.rtc: bad read offset " TARGET_FMT_plx,
128
+ offset);
129
break;
130
}
131
return value;
132
@@ -XXX,XX +XXX,XX @@ static void exynos4210_rtc_write(void *opaque, hwaddr offset,
133
if (value > TICNT_THRESHOLD) {
134
s->reg_ticcnt = value;
135
} else {
136
- fprintf(stderr,
137
- "[exynos4210.rtc: bad TICNT value %u ]\n",
138
- (uint32_t)value);
139
+ qemu_log_mask(LOG_GUEST_ERROR,
140
+ "exynos4210.rtc: bad TICNT value %u",
141
+ (uint32_t)value);
142
}
143
break;
144
145
@@ -XXX,XX +XXX,XX @@ static void exynos4210_rtc_write(void *opaque, hwaddr offset,
146
break;
147
148
default:
149
- fprintf(stderr,
150
- "[exynos4210.rtc: bad write offset " TARGET_FMT_plx "]\n",
151
- offset);
152
+ qemu_log_mask(LOG_GUEST_ERROR,
153
+ "exynos4210.rtc: bad write offset " TARGET_FMT_plx,
154
+ offset);
155
break;
156
157
}
158
--
36
--
159
2.7.4
37
2.20.1
160
38
161
39
diff view generated by jsdifflib
1
From: Krzysztof Kozlowski <krzk@kernel.org>
1
From: Guenter Roeck <linux@roeck-us.net>
2
2
3
The static array exynos4210_uart_regs with register values is not
3
QEMU already supports pl330. Instantiate it for Exynos4210.
4
modified so it can be made const.
5
4
6
Few other functions accept driver or uart state as an argument but they
5
Relevant part of Linux arch/arm/boot/dts/exynos4.dtsi:
7
do not change it and do not cast it so this can be made const for code
8
safeness.
9
6
10
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
7
/ {
11
Message-id: 20170313184750.429-3-krzk@kernel.org
8
soc: soc {
9
amba {
10
pdma0: pdma@12680000 {
11
compatible = "arm,pl330", "arm,primecell";
12
reg = <0x12680000 0x1000>;
13
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
14
clocks = <&clock CLK_PDMA0>;
15
clock-names = "apb_pclk";
16
#dma-cells = <1>;
17
#dma-channels = <8>;
18
#dma-requests = <32>;
19
};
20
pdma1: pdma@12690000 {
21
compatible = "arm,pl330", "arm,primecell";
22
reg = <0x12690000 0x1000>;
23
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
24
clocks = <&clock CLK_PDMA1>;
25
clock-names = "apb_pclk";
26
#dma-cells = <1>;
27
#dma-channels = <8>;
28
#dma-requests = <32>;
29
};
30
mdma1: mdma@12850000 {
31
compatible = "arm,pl330", "arm,primecell";
32
reg = <0x12850000 0x1000>;
33
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
34
clocks = <&clock CLK_MDMA>;
35
clock-names = "apb_pclk";
36
#dma-cells = <1>;
37
#dma-channels = <8>;
38
#dma-requests = <1>;
39
};
40
};
41
};
42
};
43
44
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
45
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
46
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
47
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
48
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
49
Message-id: 20190520214342.13709-4-philmd@redhat.com
50
[PMD: Do not set default qdev properties, create the controllers in the SoC
51
rather than the board (Peter Maydell), add dtsi in commit message]
52
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
12
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
53
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
13
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
54
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14
---
55
---
15
hw/char/exynos4210_uart.c | 8 ++++----
56
hw/arm/exynos4210.c | 26 ++++++++++++++++++++++++++
16
1 file changed, 4 insertions(+), 4 deletions(-)
57
1 file changed, 26 insertions(+)
17
58
18
diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
59
diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
19
index XXXXXXX..XXXXXXX 100644
60
index XXXXXXX..XXXXXXX 100644
20
--- a/hw/char/exynos4210_uart.c
61
--- a/hw/arm/exynos4210.c
21
+++ b/hw/char/exynos4210_uart.c
62
+++ b/hw/arm/exynos4210.c
22
@@ -XXX,XX +XXX,XX @@ typedef struct Exynos4210UartReg {
63
@@ -XXX,XX +XXX,XX @@
23
uint32_t reset_value;
64
/* EHCI */
24
} Exynos4210UartReg;
65
#define EXYNOS4210_EHCI_BASE_ADDR 0x12580000
25
66
26
-static Exynos4210UartReg exynos4210_uart_regs[] = {
67
+/* DMA */
27
+static const Exynos4210UartReg exynos4210_uart_regs[] = {
68
+#define EXYNOS4210_PL330_BASE0_ADDR 0x12680000
28
{"ULCON", ULCON, 0x00000000},
69
+#define EXYNOS4210_PL330_BASE1_ADDR 0x12690000
29
{"UCON", UCON, 0x00003000},
70
+#define EXYNOS4210_PL330_BASE2_ADDR 0x12850000
30
{"UFCON", UFCON, 0x00000000},
71
+
31
@@ -XXX,XX +XXX,XX @@ static uint8_t fifo_retrieve(Exynos4210UartFIFO *q)
72
static uint8_t chipid_and_omr[] = { 0x11, 0x02, 0x21, 0x43,
32
return ret;
73
0x09, 0x00, 0x00, 0x00 };
74
75
@@ -XXX,XX +XXX,XX @@ static uint64_t exynos4210_calc_affinity(int cpu)
76
return (0x9 << ARM_AFF1_SHIFT) | cpu;
33
}
77
}
34
78
35
-static int fifo_elements_number(Exynos4210UartFIFO *q)
79
+static void pl330_create(uint32_t base, qemu_irq irq, int nreq)
36
+static int fifo_elements_number(const Exynos4210UartFIFO *q)
80
+{
81
+ SysBusDevice *busdev;
82
+ DeviceState *dev;
83
+
84
+ dev = qdev_create(NULL, "pl330");
85
+ qdev_prop_set_uint8(dev, "num_periph_req", nreq);
86
+ qdev_init_nofail(dev);
87
+ busdev = SYS_BUS_DEVICE(dev);
88
+ sysbus_mmio_map(busdev, 0, base);
89
+ sysbus_connect_irq(busdev, 0, irq);
90
+}
91
+
92
Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
37
{
93
{
38
if (q->sp < q->rp) {
94
Exynos4210State *s = g_new0(Exynos4210State, 1);
39
return q->size - q->rp + q->sp;
95
@@ -XXX,XX +XXX,XX @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
40
@@ -XXX,XX +XXX,XX @@ static int fifo_elements_number(Exynos4210UartFIFO *q)
96
sysbus_create_simple(TYPE_EXYNOS4210_EHCI, EXYNOS4210_EHCI_BASE_ADDR,
41
return q->sp - q->rp;
97
s->irq_table[exynos4210_get_irq(28, 3)]);
98
99
+ /*** DMA controllers ***/
100
+ pl330_create(EXYNOS4210_PL330_BASE0_ADDR,
101
+ qemu_irq_invert(s->irq_table[exynos4210_get_irq(35, 1)]), 32);
102
+ pl330_create(EXYNOS4210_PL330_BASE1_ADDR,
103
+ qemu_irq_invert(s->irq_table[exynos4210_get_irq(36, 1)]), 32);
104
+ pl330_create(EXYNOS4210_PL330_BASE2_ADDR,
105
+ qemu_irq_invert(s->irq_table[exynos4210_get_irq(34, 1)]), 1);
106
+
107
return s;
42
}
108
}
43
44
-static int fifo_empty_elements_number(Exynos4210UartFIFO *q)
45
+static int fifo_empty_elements_number(const Exynos4210UartFIFO *q)
46
{
47
return q->size - fifo_elements_number(q);
48
}
49
@@ -XXX,XX +XXX,XX @@ static void fifo_reset(Exynos4210UartFIFO *q)
50
q->rp = 0;
51
}
52
53
-static uint32_t exynos4210_uart_Tx_FIFO_trigger_level(Exynos4210UartState *s)
54
+static uint32_t exynos4210_uart_Tx_FIFO_trigger_level(const Exynos4210UartState *s)
55
{
56
uint32_t level = 0;
57
uint32_t reg;
58
--
109
--
59
2.7.4
110
2.20.1
60
111
61
112
diff view generated by jsdifflib
Deleted patch
1
From: Krzysztof Kozlowski <krzk@kernel.org>
2
1
3
Short declaration of 'i' was in the middle of declarations with
4
assignments. Make it a little bit more readable. Additionally switch
5
from "unsigned" to "unsigned int" as this pattern is more widely used.
6
No functional change.
7
8
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
9
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
10
Message-id: 20170313184750.429-4-krzk@kernel.org
11
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
12
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
13
---
14
hw/misc/exynos4210_pmu.c | 4 ++--
15
1 file changed, 2 insertions(+), 2 deletions(-)
16
17
diff --git a/hw/misc/exynos4210_pmu.c b/hw/misc/exynos4210_pmu.c
18
index XXXXXXX..XXXXXXX 100644
19
--- a/hw/misc/exynos4210_pmu.c
20
+++ b/hw/misc/exynos4210_pmu.c
21
@@ -XXX,XX +XXX,XX @@ static uint64_t exynos4210_pmu_read(void *opaque, hwaddr offset,
22
unsigned size)
23
{
24
Exynos4210PmuState *s = (Exynos4210PmuState *)opaque;
25
- unsigned i;
26
const Exynos4210PmuReg *reg_p = exynos4210_pmu_regs;
27
+ unsigned int i;
28
29
for (i = 0; i < PMU_NUM_OF_REGISTERS; i++) {
30
if (reg_p->offset == offset) {
31
@@ -XXX,XX +XXX,XX @@ static void exynos4210_pmu_write(void *opaque, hwaddr offset,
32
uint64_t val, unsigned size)
33
{
34
Exynos4210PmuState *s = (Exynos4210PmuState *)opaque;
35
- unsigned i;
36
const Exynos4210PmuReg *reg_p = exynos4210_pmu_regs;
37
+ unsigned int i;
38
39
for (i = 0; i < PMU_NUM_OF_REGISTERS; i++) {
40
if (reg_p->offset == offset) {
41
--
42
2.7.4
43
44
diff view generated by jsdifflib
Deleted patch
1
Recent changes have added new EXCP_ values to ARM but forgot
2
to update the excnames[] array which is used to provide
3
human-readable strings when printing information about the
4
exception for debug logging. Add the missing entries, and
5
add a comment to the list of #defines to help avoid the mistake
6
being repeated in future.
7
1
8
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
10
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
11
Message-id: 1491486340-25988-1-git-send-email-peter.maydell@linaro.org
12
---
13
target/arm/cpu.h | 1 +
14
target/arm/internals.h | 2 ++
15
2 files changed, 3 insertions(+)
16
17
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
18
index XXXXXXX..XXXXXXX 100644
19
--- a/target/arm/cpu.h
20
+++ b/target/arm/cpu.h
21
@@ -XXX,XX +XXX,XX @@
22
#define EXCP_SEMIHOST 16 /* semihosting call */
23
#define EXCP_NOCP 17 /* v7M NOCP UsageFault */
24
#define EXCP_INVSTATE 18 /* v7M INVSTATE UsageFault */
25
+/* NB: new EXCP_ defines should be added to the excnames[] array too */
26
27
#define ARMV7M_EXCP_RESET 1
28
#define ARMV7M_EXCP_NMI 2
29
diff --git a/target/arm/internals.h b/target/arm/internals.h
30
index XXXXXXX..XXXXXXX 100644
31
--- a/target/arm/internals.h
32
+++ b/target/arm/internals.h
33
@@ -XXX,XX +XXX,XX @@ static const char * const excnames[] = {
34
[EXCP_VIRQ] = "Virtual IRQ",
35
[EXCP_VFIQ] = "Virtual FIQ",
36
[EXCP_SEMIHOST] = "Semihosting call",
37
+ [EXCP_NOCP] = "v7M NOCP UsageFault",
38
+ [EXCP_INVSTATE] = "v7M INVSTATE UsageFault",
39
};
40
41
/* Scale factor for generic timers, ie number of ns per tick.
42
--
43
2.7.4
44
45
diff view generated by jsdifflib
Deleted patch
1
The excnames[] array is defined in internals.h because we used
2
to use it from two different source files for handling logging
3
of AArch32 and AArch64 exception entry. Refactoring means that
4
it's now used only in arm_log_exception() in helper.c, so move
5
the array into that function.
6
1
7
Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
8
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
10
Message-id: 1491821097-5647-1-git-send-email-peter.maydell@linaro.org
11
---
12
target/arm/cpu.h | 2 +-
13
target/arm/internals.h | 23 -----------------------
14
target/arm/helper.c | 19 +++++++++++++++++++
15
3 files changed, 20 insertions(+), 24 deletions(-)
16
17
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
18
index XXXXXXX..XXXXXXX 100644
19
--- a/target/arm/cpu.h
20
+++ b/target/arm/cpu.h
21
@@ -XXX,XX +XXX,XX @@
22
#define EXCP_SEMIHOST 16 /* semihosting call */
23
#define EXCP_NOCP 17 /* v7M NOCP UsageFault */
24
#define EXCP_INVSTATE 18 /* v7M INVSTATE UsageFault */
25
-/* NB: new EXCP_ defines should be added to the excnames[] array too */
26
+/* NB: add new EXCP_ defines to the array in arm_log_exception() too */
27
28
#define ARMV7M_EXCP_RESET 1
29
#define ARMV7M_EXCP_NMI 2
30
diff --git a/target/arm/internals.h b/target/arm/internals.h
31
index XXXXXXX..XXXXXXX 100644
32
--- a/target/arm/internals.h
33
+++ b/target/arm/internals.h
34
@@ -XXX,XX +XXX,XX @@ static inline bool excp_is_internal(int excp)
35
|| excp == EXCP_SEMIHOST;
36
}
37
38
-/* Exception names for debug logging; note that not all of these
39
- * precisely correspond to architectural exceptions.
40
- */
41
-static const char * const excnames[] = {
42
- [EXCP_UDEF] = "Undefined Instruction",
43
- [EXCP_SWI] = "SVC",
44
- [EXCP_PREFETCH_ABORT] = "Prefetch Abort",
45
- [EXCP_DATA_ABORT] = "Data Abort",
46
- [EXCP_IRQ] = "IRQ",
47
- [EXCP_FIQ] = "FIQ",
48
- [EXCP_BKPT] = "Breakpoint",
49
- [EXCP_EXCEPTION_EXIT] = "QEMU v7M exception exit",
50
- [EXCP_KERNEL_TRAP] = "QEMU intercept of kernel commpage",
51
- [EXCP_HVC] = "Hypervisor Call",
52
- [EXCP_HYP_TRAP] = "Hypervisor Trap",
53
- [EXCP_SMC] = "Secure Monitor Call",
54
- [EXCP_VIRQ] = "Virtual IRQ",
55
- [EXCP_VFIQ] = "Virtual FIQ",
56
- [EXCP_SEMIHOST] = "Semihosting call",
57
- [EXCP_NOCP] = "v7M NOCP UsageFault",
58
- [EXCP_INVSTATE] = "v7M INVSTATE UsageFault",
59
-};
60
-
61
/* Scale factor for generic timers, ie number of ns per tick.
62
* This gives a 62.5MHz timer.
63
*/
64
diff --git a/target/arm/helper.c b/target/arm/helper.c
65
index XXXXXXX..XXXXXXX 100644
66
--- a/target/arm/helper.c
67
+++ b/target/arm/helper.c
68
@@ -XXX,XX +XXX,XX @@ static void arm_log_exception(int idx)
69
{
70
if (qemu_loglevel_mask(CPU_LOG_INT)) {
71
const char *exc = NULL;
72
+ static const char * const excnames[] = {
73
+ [EXCP_UDEF] = "Undefined Instruction",
74
+ [EXCP_SWI] = "SVC",
75
+ [EXCP_PREFETCH_ABORT] = "Prefetch Abort",
76
+ [EXCP_DATA_ABORT] = "Data Abort",
77
+ [EXCP_IRQ] = "IRQ",
78
+ [EXCP_FIQ] = "FIQ",
79
+ [EXCP_BKPT] = "Breakpoint",
80
+ [EXCP_EXCEPTION_EXIT] = "QEMU v7M exception exit",
81
+ [EXCP_KERNEL_TRAP] = "QEMU intercept of kernel commpage",
82
+ [EXCP_HVC] = "Hypervisor Call",
83
+ [EXCP_HYP_TRAP] = "Hypervisor Trap",
84
+ [EXCP_SMC] = "Secure Monitor Call",
85
+ [EXCP_VIRQ] = "Virtual IRQ",
86
+ [EXCP_VFIQ] = "Virtual FIQ",
87
+ [EXCP_SEMIHOST] = "Semihosting call",
88
+ [EXCP_NOCP] = "v7M NOCP UsageFault",
89
+ [EXCP_INVSTATE] = "v7M INVSTATE UsageFault",
90
+ };
91
92
if (idx >= 0 && idx < ARRAY_SIZE(excnames)) {
93
exc = excnames[idx];
94
--
95
2.7.4
96
97
diff view generated by jsdifflib
Deleted patch
1
In tlb_fill() we construct a syndrome register value from a
2
fault status register value which is filled in by arm_tlb_fill().
3
arm_tlb_fill() returns FSR values which might be in the format
4
used with short-format page descriptors, or the format used
5
with long-format (LPAE) descriptors. The syndrome register
6
always uses LPAE-format FSR status codes.
7
1
8
It isn't actually possible to end up delivering a syndrome
9
register value to the guest for a fault which is reported
10
with a short-format FSR (that kind of stage 1 fault will only
11
happen for an AArch32 translation regime which doesn't have
12
a syndrome register, and can never be redirected to an AArch64
13
or Hyp exception level). Add an assertion which checks this,
14
and adjust the code so that we construct a syndrome with
15
an invalid status code, rather than allowing set bits in
16
the FSR input to randomly corrupt other fields in the syndrome.
17
18
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
19
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
20
Message-id: 1491486152-24304-1-git-send-email-peter.maydell@linaro.org
21
---
22
target/arm/op_helper.c | 23 ++++++++++++++++++-----
23
1 file changed, 18 insertions(+), 5 deletions(-)
24
25
diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c
26
index XXXXXXX..XXXXXXX 100644
27
--- a/target/arm/op_helper.c
28
+++ b/target/arm/op_helper.c
29
@@ -XXX,XX +XXX,XX @@ void tlb_fill(CPUState *cs, target_ulong addr, MMUAccessType access_type,
30
if (unlikely(ret)) {
31
ARMCPU *cpu = ARM_CPU(cs);
32
CPUARMState *env = &cpu->env;
33
- uint32_t syn, exc;
34
+ uint32_t syn, exc, fsc;
35
unsigned int target_el;
36
bool same_el;
37
38
@@ -XXX,XX +XXX,XX @@ void tlb_fill(CPUState *cs, target_ulong addr, MMUAccessType access_type,
39
env->cp15.hpfar_el2 = extract64(fi.s2addr, 12, 47) << 4;
40
}
41
same_el = arm_current_el(env) == target_el;
42
- /* AArch64 syndrome does not have an LPAE bit */
43
- syn = fsr & ~(1 << 9);
44
+
45
+ if (fsr & (1 << 9)) {
46
+ /* LPAE format fault status register : bottom 6 bits are
47
+ * status code in the same form as needed for syndrome
48
+ */
49
+ fsc = extract32(fsr, 0, 6);
50
+ } else {
51
+ /* Short format FSR : this fault will never actually be reported
52
+ * to an EL that uses a syndrome register. Check that here,
53
+ * and use a (currently) reserved FSR code in case the constructed
54
+ * syndrome does leak into the guest somehow.
55
+ */
56
+ assert(target_el != 2 && !arm_el_is_aa64(env, target_el));
57
+ fsc = 0x3f;
58
+ }
59
60
/* For insn and data aborts we assume there is no instruction syndrome
61
* information; this is always true for exceptions reported to EL1.
62
*/
63
if (access_type == MMU_INST_FETCH) {
64
- syn = syn_insn_abort(same_el, 0, fi.s1ptw, syn);
65
+ syn = syn_insn_abort(same_el, 0, fi.s1ptw, fsc);
66
exc = EXCP_PREFETCH_ABORT;
67
} else {
68
syn = merge_syn_data_abort(env->exception.syndrome, target_el,
69
same_el, fi.s1ptw,
70
- access_type == MMU_DATA_STORE, syn);
71
+ access_type == MMU_DATA_STORE, fsc);
72
if (access_type == MMU_DATA_STORE
73
&& arm_feature(env, ARM_FEATURE_V6)) {
74
fsr |= (1 << 11);
75
--
76
2.7.4
77
78
diff view generated by jsdifflib
Deleted patch
1
From: Alistair Francis <alistair.francis@xilinx.com>
2
1
3
Read the correct descriptor instead of hardcoding the first (q=0).
4
5
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
6
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
7
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
8
Message-id: 988b183dcf951856d8b3379f7e911ec95233bbf4.1491947224.git.alistair.francis@xilinx.com
9
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10
---
11
hw/net/cadence_gem.c | 4 ++--
12
1 file changed, 2 insertions(+), 2 deletions(-)
13
14
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
15
index XXXXXXX..XXXXXXX 100644
16
--- a/hw/net/cadence_gem.c
17
+++ b/hw/net/cadence_gem.c
18
@@ -XXX,XX +XXX,XX @@ static void gem_get_rx_desc(CadenceGEMState *s, int q)
19
{
20
DB_PRINT("read descriptor 0x%x\n", (unsigned)s->rx_desc_addr[q]);
21
/* read current descriptor */
22
- cpu_physical_memory_read(s->rx_desc_addr[0],
23
- (uint8_t *)s->rx_desc[0], sizeof(s->rx_desc[0]));
24
+ cpu_physical_memory_read(s->rx_desc_addr[q],
25
+ (uint8_t *)s->rx_desc[q], sizeof(s->rx_desc[q]));
26
27
/* Descriptor owned by software ? */
28
if (rx_desc_get_ownership(s->rx_desc[q]) == 1) {
29
--
30
2.7.4
31
32
diff view generated by jsdifflib
Deleted patch
1
From: Alistair Francis <alistair.francis@xilinx.com>
2
1
3
Correct the buffer descriptor busy logic to work correctly when using
4
multiple queues.
5
6
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
7
Message-id: 8a7e8059984e27d46a276a66299d035a0afd280f.1491947224.git.alistair.francis@xilinx.com
8
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
10
---
11
hw/net/cadence_gem.c | 17 ++++++++++-------
12
1 file changed, 10 insertions(+), 7 deletions(-)
13
14
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
15
index XXXXXXX..XXXXXXX 100644
16
--- a/hw/net/cadence_gem.c
17
+++ b/hw/net/cadence_gem.c
18
@@ -XXX,XX +XXX,XX @@ static int gem_can_receive(NetClientState *nc)
19
}
20
21
for (i = 0; i < s->num_priority_queues; i++) {
22
- if (rx_desc_get_ownership(s->rx_desc[i]) == 1) {
23
- if (s->can_rx_state != 2) {
24
- s->can_rx_state = 2;
25
- DB_PRINT("can't receive - busy buffer descriptor (q%d) 0x%x\n",
26
- i, s->rx_desc_addr[i]);
27
- }
28
- return 0;
29
+ if (rx_desc_get_ownership(s->rx_desc[i]) != 1) {
30
+ break;
31
+ }
32
+ };
33
+
34
+ if (i == s->num_priority_queues) {
35
+ if (s->can_rx_state != 2) {
36
+ s->can_rx_state = 2;
37
+ DB_PRINT("can't receive - all the buffer descriptors are busy\n");
38
}
39
+ return 0;
40
}
41
42
if (s->can_rx_state != 0) {
43
--
44
2.7.4
45
46
diff view generated by jsdifflib
Deleted patch
1
From: Alistair Francis <alistair.francis@xilinx.com>
2
1
3
This patch fixes two mistakes in the interrupt logic.
4
5
First we only trigger single-queue or multi-queue interrupts if the status
6
register is set. This logic was already used for non multi-queue interrupts
7
but it also applies to multi-queue interrupts.
8
9
Secondly we need to lower the interrupts if the ISR isn't set. As part
10
of this we can remove the other interrupt lowering logic and consolidate
11
it inside gem_update_int_status().
12
13
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
14
Message-id: 438bcc014f8f8a2f8f68f322cb6a53f4c04688c2.1491947224.git.alistair.francis@xilinx.com
15
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
17
---
18
hw/net/cadence_gem.c | 18 +++++++++++++-----
19
1 file changed, 13 insertions(+), 5 deletions(-)
20
21
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
22
index XXXXXXX..XXXXXXX 100644
23
--- a/hw/net/cadence_gem.c
24
+++ b/hw/net/cadence_gem.c
25
@@ -XXX,XX +XXX,XX @@ static void gem_update_int_status(CadenceGEMState *s)
26
{
27
int i;
28
29
- if ((s->num_priority_queues == 1) && s->regs[GEM_ISR]) {
30
+ if (!s->regs[GEM_ISR]) {
31
+ /* ISR isn't set, clear all the interrupts */
32
+ for (i = 0; i < s->num_priority_queues; ++i) {
33
+ qemu_set_irq(s->irq[i], 0);
34
+ }
35
+ return;
36
+ }
37
+
38
+ /* If we get here we know s->regs[GEM_ISR] is set, so we don't need to
39
+ * check it again.
40
+ */
41
+ if (s->num_priority_queues == 1) {
42
/* No priority queues, just trigger the interrupt */
43
DB_PRINT("asserting int.\n");
44
qemu_set_irq(s->irq[0], 1);
45
@@ -XXX,XX +XXX,XX @@ static uint64_t gem_read(void *opaque, hwaddr offset, unsigned size)
46
{
47
CadenceGEMState *s;
48
uint32_t retval;
49
- int i;
50
s = (CadenceGEMState *)opaque;
51
52
offset >>= 2;
53
@@ -XXX,XX +XXX,XX @@ static uint64_t gem_read(void *opaque, hwaddr offset, unsigned size)
54
switch (offset) {
55
case GEM_ISR:
56
DB_PRINT("lowering irqs on ISR read\n");
57
- for (i = 0; i < s->num_priority_queues; ++i) {
58
- qemu_set_irq(s->irq[i], 0);
59
- }
60
+ /* The interrupts get updated at the end of the function. */
61
break;
62
case GEM_PHYMNTNC:
63
if (retval & GEM_PHYMNTNC_OP_R) {
64
--
65
2.7.4
66
67
diff view generated by jsdifflib
Deleted patch
1
From: Alistair Francis <alistair.francis@xilinx.com>
2
1
3
Expose the Cadence GEM revision as a property.
4
5
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
6
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
7
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
8
Message-id: 541324373cf87b50f8be0439a0cb89f5028b016f.1491947224.git.alistair.francis@xilinx.com
9
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10
---
11
include/hw/net/cadence_gem.h | 1 +
12
hw/net/cadence_gem.c | 6 +++++-
13
2 files changed, 6 insertions(+), 1 deletion(-)
14
15
diff --git a/include/hw/net/cadence_gem.h b/include/hw/net/cadence_gem.h
16
index XXXXXXX..XXXXXXX 100644
17
--- a/include/hw/net/cadence_gem.h
18
+++ b/include/hw/net/cadence_gem.h
19
@@ -XXX,XX +XXX,XX @@ typedef struct CadenceGEMState {
20
uint8_t num_priority_queues;
21
uint8_t num_type1_screeners;
22
uint8_t num_type2_screeners;
23
+ uint32_t revision;
24
25
/* GEM registers backing store */
26
uint32_t regs[CADENCE_GEM_MAXREG];
27
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
28
index XXXXXXX..XXXXXXX 100644
29
--- a/hw/net/cadence_gem.c
30
+++ b/hw/net/cadence_gem.c
31
@@ -XXX,XX +XXX,XX @@
32
#define DESC_1_RX_SOF 0x00004000
33
#define DESC_1_RX_EOF 0x00008000
34
35
+#define GEM_MODID_VALUE 0x00020118
36
+
37
static inline unsigned tx_desc_get_buffer(unsigned *desc)
38
{
39
return desc[0];
40
@@ -XXX,XX +XXX,XX @@ static void gem_reset(DeviceState *d)
41
s->regs[GEM_TXPAUSE] = 0x0000ffff;
42
s->regs[GEM_TXPARTIALSF] = 0x000003ff;
43
s->regs[GEM_RXPARTIALSF] = 0x000003ff;
44
- s->regs[GEM_MODID] = 0x00020118;
45
+ s->regs[GEM_MODID] = s->revision;
46
s->regs[GEM_DESCONF] = 0x02500111;
47
s->regs[GEM_DESCONF2] = 0x2ab13fff;
48
s->regs[GEM_DESCONF5] = 0x002f2145;
49
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_cadence_gem = {
50
51
static Property gem_properties[] = {
52
DEFINE_NIC_PROPERTIES(CadenceGEMState, conf),
53
+ DEFINE_PROP_UINT32("revision", CadenceGEMState, revision,
54
+ GEM_MODID_VALUE),
55
DEFINE_PROP_UINT8("num-priority-queues", CadenceGEMState,
56
num_priority_queues, 1),
57
DEFINE_PROP_UINT8("num-type1-screeners", CadenceGEMState,
58
--
59
2.7.4
60
61
diff view generated by jsdifflib
Deleted patch
1
From: Alistair Francis <alistair.francis@xilinx.com>
2
1
3
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
4
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
5
Message-id: 026dbe01a1d42619eee30ce3f2079741bf04bc73.1491947224.git.alistair.francis@xilinx.com
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
7
---
8
hw/arm/xlnx-zynqmp.c | 6 +++++-
9
1 file changed, 5 insertions(+), 1 deletion(-)
10
11
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
12
index XXXXXXX..XXXXXXX 100644
13
--- a/hw/arm/xlnx-zynqmp.c
14
+++ b/hw/arm/xlnx-zynqmp.c
15
@@ -XXX,XX +XXX,XX @@
16
#define ARM_PHYS_TIMER_PPI 30
17
#define ARM_VIRT_TIMER_PPI 27
18
19
+#define GEM_REVISION 0x40070106
20
+
21
#define GIC_BASE_ADDR 0xf9000000
22
#define GIC_DIST_ADDR 0xf9010000
23
#define GIC_CPU_ADDR 0xf9020000
24
@@ -XXX,XX +XXX,XX @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
25
qemu_check_nic_model(nd, TYPE_CADENCE_GEM);
26
qdev_set_nic_properties(DEVICE(&s->gem[i]), nd);
27
}
28
+ object_property_set_int(OBJECT(&s->gem[i]), GEM_REVISION, "revision",
29
+ &error_abort);
30
object_property_set_int(OBJECT(&s->gem[i]), 2, "num-priority-queues",
31
- &error_abort);
32
+ &error_abort);
33
object_property_set_bool(OBJECT(&s->gem[i]), true, "realized", &err);
34
if (err) {
35
error_propagate(errp, err);
36
--
37
2.7.4
38
39
diff view generated by jsdifflib
Deleted patch
1
For M-profile CPUs, the BXJ instruction does not exist at all, and
2
the encoding should always UNDEF. We were accidentally implementing
3
it to behave like A-profile BXJ; correct the error.
4
1
5
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
7
Reviewed-by: Richard Henderson <rth@twiddle.net>
8
Message-id: 1491844419-12485-2-git-send-email-peter.maydell@linaro.org
9
---
10
target/arm/translate.c | 7 ++++++-
11
1 file changed, 6 insertions(+), 1 deletion(-)
12
13
diff --git a/target/arm/translate.c b/target/arm/translate.c
14
index XXXXXXX..XXXXXXX 100644
15
--- a/target/arm/translate.c
16
+++ b/target/arm/translate.c
17
@@ -XXX,XX +XXX,XX @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
18
}
19
break;
20
case 4: /* bxj */
21
- /* Trivial implementation equivalent to bx. */
22
+ /* Trivial implementation equivalent to bx.
23
+ * This instruction doesn't exist at all for M-profile.
24
+ */
25
+ if (arm_dc_feature(s, ARM_FEATURE_M)) {
26
+ goto illegal_op;
27
+ }
28
tmp = load_reg(s, rn);
29
gen_bx(s, tmp);
30
break;
31
--
32
2.7.4
33
34
diff view generated by jsdifflib
Deleted patch
1
We currently have two places that do:
2
if (dc->ss_active) {
3
gen_step_complete_exception(dc);
4
} else {
5
gen_exception_internal(EXCP_DEBUG);
6
}
7
1
8
Factor this out into its own function, as we're about to add
9
a third place that needs the same logic.
10
11
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
13
Reviewed-by: Richard Henderson <rth@twiddle.net>
14
Message-id: 1491844419-12485-4-git-send-email-peter.maydell@linaro.org
15
---
16
target/arm/translate.c | 28 ++++++++++++++++------------
17
1 file changed, 16 insertions(+), 12 deletions(-)
18
19
diff --git a/target/arm/translate.c b/target/arm/translate.c
20
index XXXXXXX..XXXXXXX 100644
21
--- a/target/arm/translate.c
22
+++ b/target/arm/translate.c
23
@@ -XXX,XX +XXX,XX @@ static void gen_step_complete_exception(DisasContext *s)
24
s->is_jmp = DISAS_EXC;
25
}
26
27
+static void gen_singlestep_exception(DisasContext *s)
28
+{
29
+ /* Generate the right kind of exception for singlestep, which is
30
+ * either the architectural singlestep or EXCP_DEBUG for QEMU's
31
+ * gdb singlestepping.
32
+ */
33
+ if (s->ss_active) {
34
+ gen_step_complete_exception(s);
35
+ } else {
36
+ gen_exception_internal(EXCP_DEBUG);
37
+ }
38
+}
39
+
40
static void gen_smul_dual(TCGv_i32 a, TCGv_i32 b)
41
{
42
TCGv_i32 tmp1 = tcg_temp_new_i32();
43
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
44
gen_set_pc_im(dc, dc->pc);
45
/* fall through */
46
default:
47
- if (dc->ss_active) {
48
- gen_step_complete_exception(dc);
49
- } else {
50
- /* FIXME: Single stepping a WFI insn will not halt
51
- the CPU. */
52
- gen_exception_internal(EXCP_DEBUG);
53
- }
54
+ /* FIXME: Single stepping a WFI insn will not halt the CPU. */
55
+ gen_singlestep_exception(dc);
56
}
57
if (dc->condjmp) {
58
/* "Condition failed" instruction codepath. */
59
gen_set_label(dc->condlabel);
60
gen_set_condexec(dc);
61
gen_set_pc_im(dc, dc->pc);
62
- if (dc->ss_active) {
63
- gen_step_complete_exception(dc);
64
- } else {
65
- gen_exception_internal(EXCP_DEBUG);
66
- }
67
+ gen_singlestep_exception(dc);
68
}
69
} else {
70
/* While branches must always occur at the end of an IT block,
71
--
72
2.7.4
73
74
diff view generated by jsdifflib
Deleted patch
1
Move the utility routines gen_set_condexec() and gen_set_pc_im()
2
up in the file, as we will want to use them from a function
3
placed earlier in the file than their current location.
4
1
5
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
7
Reviewed-by: Richard Henderson <rth@twiddle.net>
8
Message-id: 1491844419-12485-5-git-send-email-peter.maydell@linaro.org
9
---
10
target/arm/translate.c | 31 +++++++++++++++----------------
11
1 file changed, 15 insertions(+), 16 deletions(-)
12
13
diff --git a/target/arm/translate.c b/target/arm/translate.c
14
index XXXXXXX..XXXXXXX 100644
15
--- a/target/arm/translate.c
16
+++ b/target/arm/translate.c
17
@@ -XXX,XX +XXX,XX @@ static const uint8_t table_logic_cc[16] = {
18
1, /* mvn */
19
};
20
21
+static inline void gen_set_condexec(DisasContext *s)
22
+{
23
+ if (s->condexec_mask) {
24
+ uint32_t val = (s->condexec_cond << 4) | (s->condexec_mask >> 1);
25
+ TCGv_i32 tmp = tcg_temp_new_i32();
26
+ tcg_gen_movi_i32(tmp, val);
27
+ store_cpu_field(tmp, condexec_bits);
28
+ }
29
+}
30
+
31
+static inline void gen_set_pc_im(DisasContext *s, target_ulong val)
32
+{
33
+ tcg_gen_movi_i32(cpu_R[15], val);
34
+}
35
+
36
/* Set PC and Thumb state from an immediate address. */
37
static inline void gen_bx_im(DisasContext *s, uint32_t addr)
38
{
39
@@ -XXX,XX +XXX,XX @@ DO_GEN_ST(8, MO_UB)
40
DO_GEN_ST(16, MO_UW)
41
DO_GEN_ST(32, MO_UL)
42
43
-static inline void gen_set_pc_im(DisasContext *s, target_ulong val)
44
-{
45
- tcg_gen_movi_i32(cpu_R[15], val);
46
-}
47
-
48
static inline void gen_hvc(DisasContext *s, int imm16)
49
{
50
/* The pre HVC helper handles cases when HVC gets trapped
51
@@ -XXX,XX +XXX,XX @@ static inline void gen_smc(DisasContext *s)
52
s->is_jmp = DISAS_SMC;
53
}
54
55
-static inline void
56
-gen_set_condexec (DisasContext *s)
57
-{
58
- if (s->condexec_mask) {
59
- uint32_t val = (s->condexec_cond << 4) | (s->condexec_mask >> 1);
60
- TCGv_i32 tmp = tcg_temp_new_i32();
61
- tcg_gen_movi_i32(tmp, val);
62
- store_cpu_field(tmp, condexec_bits);
63
- }
64
-}
65
-
66
static void gen_exception_internal_insn(DisasContext *s, int offset, int excp)
67
{
68
gen_set_condexec(s);
69
--
70
2.7.4
71
72
diff view generated by jsdifflib
1
On M profile, return from exceptions happen when code in Handler mode
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
executes one of the following function call return instructions:
3
* POP or LDM which loads the PC
4
* LDR to PC
5
* BX register
6
and the new PC value is 0xFFxxxxxx.
7
2
8
QEMU tries to implement this by not treating the instruction
3
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
9
specially but then catching the attempt to execute from the magic
4
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
10
address value. This is not ideal, because:
5
Message-id: 20190520214342.13709-5-philmd@redhat.com
11
* there are guest visible differences from the architecturally
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12
specified behaviour (for instance jumping to 0xFFxxxxxx via a
7
---
13
different instruction should not cause an exception return but it
8
include/hw/arm/exynos4210.h | 9 +++++++--
14
will in the QEMU implementation)
9
hw/arm/exynos4210.c | 28 ++++++++++++++++++++++++----
15
* we have to account for it in various places (like refusing to take
10
hw/arm/exynos4_boards.c | 9 ++++++---
16
an interrupt if the PC is at a magic value, and making sure that
11
3 files changed, 37 insertions(+), 9 deletions(-)
17
the MPU doesn't deny execution at the magic value addresses)
18
12
19
Drop these hacks, and instead implement exception return the way the
13
diff --git a/include/hw/arm/exynos4210.h b/include/hw/arm/exynos4210.h
20
architecture specifies -- by having the relevant instructions check
21
for the magic value and raise the 'do an exception return' QEMU
22
internal exception immediately.
23
24
The effect on the generated code is minor:
25
26
bx lr, old code (and new code for Thread mode):
27
TCG:
28
mov_i32 tmp5,r14
29
movi_i32 tmp6,$0xfffffffffffffffe
30
and_i32 pc,tmp5,tmp6
31
movi_i32 tmp6,$0x1
32
and_i32 tmp5,tmp5,tmp6
33
st_i32 tmp5,env,$0x218
34
exit_tb $0x0
35
set_label $L0
36
exit_tb $0x7f2aabd61993
37
x86_64 generated code:
38
0x7f2aabe87019: mov %ebx,%ebp
39
0x7f2aabe8701b: and $0xfffffffffffffffe,%ebp
40
0x7f2aabe8701e: mov %ebp,0x3c(%r14)
41
0x7f2aabe87022: and $0x1,%ebx
42
0x7f2aabe87025: mov %ebx,0x218(%r14)
43
0x7f2aabe8702c: xor %eax,%eax
44
0x7f2aabe8702e: jmpq 0x7f2aabe7c016
45
46
bx lr, new code when in Handler mode:
47
TCG:
48
mov_i32 tmp5,r14
49
movi_i32 tmp6,$0xfffffffffffffffe
50
and_i32 pc,tmp5,tmp6
51
movi_i32 tmp6,$0x1
52
and_i32 tmp5,tmp5,tmp6
53
st_i32 tmp5,env,$0x218
54
movi_i32 tmp5,$0xffffffffff000000
55
brcond_i32 pc,tmp5,geu,$L1
56
exit_tb $0x0
57
set_label $L1
58
movi_i32 tmp5,$0x8
59
call exception_internal,$0x0,$0,env,tmp5
60
x86_64 generated code:
61
0x7fe8fa1264e3: mov %ebp,%ebx
62
0x7fe8fa1264e5: and $0xfffffffffffffffe,%ebx
63
0x7fe8fa1264e8: mov %ebx,0x3c(%r14)
64
0x7fe8fa1264ec: and $0x1,%ebp
65
0x7fe8fa1264ef: mov %ebp,0x218(%r14)
66
0x7fe8fa1264f6: cmp $0xff000000,%ebx
67
0x7fe8fa1264fc: jae 0x7fe8fa126509
68
0x7fe8fa126502: xor %eax,%eax
69
0x7fe8fa126504: jmpq 0x7fe8fa122016
70
0x7fe8fa126509: mov %r14,%rdi
71
0x7fe8fa12650c: mov $0x8,%esi
72
0x7fe8fa126511: mov $0x56095dbeccf5,%r10
73
0x7fe8fa12651b: callq *%r10
74
75
which is a difference of one cmp/branch-not-taken. This will
76
be lost in the noise of having to exit generated code and
77
look up the next TB anyway.
78
79
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
80
Reviewed-by: Richard Henderson <rth@twiddle.net>
81
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
82
Message-id: 1491844419-12485-9-git-send-email-peter.maydell@linaro.org
83
---
84
target/arm/translate.h | 4 +++
85
target/arm/translate.c | 66 +++++++++++++++++++++++++++++++++++++++++++++-----
86
2 files changed, 64 insertions(+), 6 deletions(-)
87
88
diff --git a/target/arm/translate.h b/target/arm/translate.h
89
index XXXXXXX..XXXXXXX 100644
14
index XXXXXXX..XXXXXXX 100644
90
--- a/target/arm/translate.h
15
--- a/include/hw/arm/exynos4210.h
91
+++ b/target/arm/translate.h
16
+++ b/include/hw/arm/exynos4210.h
92
@@ -XXX,XX +XXX,XX @@ static void disas_set_insn_syndrome(DisasContext *s, uint32_t syn)
17
@@ -XXX,XX +XXX,XX @@ typedef struct Exynos4210Irq {
93
#define DISAS_HVC 8
18
} Exynos4210Irq;
94
#define DISAS_SMC 9
19
95
#define DISAS_YIELD 10
20
typedef struct Exynos4210State {
96
+/* M profile branch which might be an exception return (and so needs
21
+ /*< private >*/
97
+ * custom end-of-TB code)
22
+ SysBusDevice parent_obj;
98
+ */
23
+ /*< public >*/
99
+#define DISAS_BX_EXCRET 11
24
ARMCPU *cpu[EXYNOS4210_NCPUS];
100
25
Exynos4210Irq irqs;
101
#ifdef TARGET_AARCH64
26
qemu_irq *irq_table;
102
void a64_translate_init(void);
27
@@ -XXX,XX +XXX,XX @@ typedef struct Exynos4210State {
103
diff --git a/target/arm/translate.c b/target/arm/translate.c
28
I2CBus *i2c_if[EXYNOS4210_I2C_NUMBER];
29
} Exynos4210State;
30
31
+#define TYPE_EXYNOS4210_SOC "exynos4210"
32
+#define EXYNOS4210_SOC(obj) \
33
+ OBJECT_CHECK(Exynos4210State, obj, TYPE_EXYNOS4210_SOC)
34
+
35
void exynos4210_write_secondary(ARMCPU *cpu,
36
const struct arm_boot_info *info);
37
38
-Exynos4210State *exynos4210_init(MemoryRegion *system_mem);
39
-
40
/* Initialize exynos4210 IRQ subsystem stub */
41
qemu_irq *exynos4210_init_irq(Exynos4210Irq *env);
42
43
diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
104
index XXXXXXX..XXXXXXX 100644
44
index XXXXXXX..XXXXXXX 100644
105
--- a/target/arm/translate.c
45
--- a/hw/arm/exynos4210.c
106
+++ b/target/arm/translate.c
46
+++ b/hw/arm/exynos4210.c
107
@@ -XXX,XX +XXX,XX @@ static inline void gen_bx(DisasContext *s, TCGv_i32 var)
47
@@ -XXX,XX +XXX,XX @@ static void pl330_create(uint32_t base, qemu_irq irq, int nreq)
108
store_cpu_field(var, thumb);
48
sysbus_connect_irq(busdev, 0, irq);
109
}
49
}
110
50
111
+/* Set PC and Thumb state from var. var is marked as dead.
51
-Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
112
+ * For M-profile CPUs, include logic to detect exception-return
52
+static void exynos4210_realize(DeviceState *socdev, Error **errp)
113
+ * branches and handle them. This is needed for Thumb POP/LDM to PC, LDR to PC,
53
{
114
+ * and BX reg, and no others, and happens only for code in Handler mode.
54
- Exynos4210State *s = g_new0(Exynos4210State, 1);
115
+ */
55
+ Exynos4210State *s = EXYNOS4210_SOC(socdev);
116
+static inline void gen_bx_excret(DisasContext *s, TCGv_i32 var)
56
+ MemoryRegion *system_mem = get_system_memory();
57
qemu_irq gate_irq[EXYNOS4210_NCPUS][EXYNOS4210_IRQ_GATE_NINPUTS];
58
SysBusDevice *busdev;
59
DeviceState *dev;
60
@@ -XXX,XX +XXX,XX @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
61
qemu_irq_invert(s->irq_table[exynos4210_get_irq(36, 1)]), 32);
62
pl330_create(EXYNOS4210_PL330_BASE2_ADDR,
63
qemu_irq_invert(s->irq_table[exynos4210_get_irq(34, 1)]), 1);
64
-
65
- return s;
66
}
67
+
68
+static void exynos4210_class_init(ObjectClass *klass, void *data)
117
+{
69
+{
118
+ /* Generate the same code here as for a simple bx, but flag via
70
+ DeviceClass *dc = DEVICE_CLASS(klass);
119
+ * s->is_jmp that we need to do the rest of the work later.
71
+
120
+ */
72
+ dc->realize = exynos4210_realize;
121
+ gen_bx(s, var);
122
+ if (s->v7m_handler_mode && arm_dc_feature(s, ARM_FEATURE_M)) {
123
+ s->is_jmp = DISAS_BX_EXCRET;
124
+ }
125
+}
73
+}
126
+
74
+
127
+static inline void gen_bx_excret_final_code(DisasContext *s)
75
+static const TypeInfo exynos4210_info = {
76
+ .name = TYPE_EXYNOS4210_SOC,
77
+ .parent = TYPE_SYS_BUS_DEVICE,
78
+ .instance_size = sizeof(Exynos4210State),
79
+ .class_init = exynos4210_class_init,
80
+};
81
+
82
+static void exynos4210_register_types(void)
128
+{
83
+{
129
+ /* Generate the code to finish possible exception return and end the TB */
84
+ type_register_static(&exynos4210_info);
130
+ TCGLabel *excret_label = gen_new_label();
131
+
132
+ /* Is the new PC value in the magic range indicating exception return? */
133
+ tcg_gen_brcondi_i32(TCG_COND_GEU, cpu_R[15], 0xff000000, excret_label);
134
+ /* No: end the TB as we would for a DISAS_JMP */
135
+ if (is_singlestepping(s)) {
136
+ gen_singlestep_exception(s);
137
+ } else {
138
+ tcg_gen_exit_tb(0);
139
+ }
140
+ gen_set_label(excret_label);
141
+ /* Yes: this is an exception return.
142
+ * At this point in runtime env->regs[15] and env->thumb will hold
143
+ * the exception-return magic number, which do_v7m_exception_exit()
144
+ * will read. Nothing else will be able to see those values because
145
+ * the cpu-exec main loop guarantees that we will always go straight
146
+ * from raising the exception to the exception-handling code.
147
+ *
148
+ * gen_ss_advance(s) does nothing on M profile currently but
149
+ * calling it is conceptually the right thing as we have executed
150
+ * this instruction (compare SWI, HVC, SMC handling).
151
+ */
152
+ gen_ss_advance(s);
153
+ gen_exception_internal(EXCP_EXCEPTION_EXIT);
154
+}
85
+}
155
+
86
+
156
/* Variant of store_reg which uses branch&exchange logic when storing
87
+type_init(exynos4210_register_types)
157
to r15 in ARM architecture v7 and above. The source must be a temporary
88
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
158
and will be marked as dead. */
89
index XXXXXXX..XXXXXXX 100644
159
@@ -XXX,XX +XXX,XX @@ static inline void store_reg_bx(DisasContext *s, int reg, TCGv_i32 var)
90
--- a/hw/arm/exynos4_boards.c
160
static inline void store_reg_from_load(DisasContext *s, int reg, TCGv_i32 var)
91
+++ b/hw/arm/exynos4_boards.c
161
{
92
@@ -XXX,XX +XXX,XX @@ typedef enum Exynos4BoardType {
162
if (reg == 15 && ENABLE_ARCH_5) {
93
} Exynos4BoardType;
163
- gen_bx(s, var);
94
164
+ gen_bx_excret(s, var);
95
typedef struct Exynos4BoardState {
165
} else {
96
- Exynos4210State *soc;
166
store_reg(s, reg, var);
97
+ Exynos4210State soc;
167
}
98
MemoryRegion dram0_mem;
168
@@ -XXX,XX +XXX,XX @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
99
MemoryRegion dram1_mem;
169
tmp = tcg_temp_new_i32();
100
} Exynos4BoardState;
170
gen_aa32_ld32u(s, tmp, addr, get_mem_index(s));
101
@@ -XXX,XX +XXX,XX @@ exynos4_boards_init_common(MachineState *machine,
171
if (i == 15) {
102
exynos4_boards_init_ram(s, get_system_memory(),
172
- gen_bx(s, tmp);
103
exynos4_board_ram_size[board_type]);
173
+ gen_bx_excret(s, tmp);
104
174
} else if (i == rn) {
105
- s->soc = exynos4210_init(get_system_memory());
175
loaded_var = tmp;
106
+ object_initialize(&s->soc, sizeof(s->soc), TYPE_EXYNOS4210_SOC);
176
loaded_base = 1;
107
+ qdev_set_parent_bus(DEVICE(&s->soc), sysbus_get_default());
177
@@ -XXX,XX +XXX,XX @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
108
+ object_property_set_bool(OBJECT(&s->soc), true, "realized",
178
goto illegal_op;
109
+ &error_fatal);
179
}
110
180
if (rs == 15) {
111
return s;
181
- gen_bx(s, tmp);
112
}
182
+ gen_bx_excret(s, tmp);
113
@@ -XXX,XX +XXX,XX @@ static void smdkc210_init(MachineState *machine)
183
} else {
114
EXYNOS4_BOARD_SMDKC210);
184
store_reg(s, rs, tmp);
115
185
}
116
lan9215_init(SMDK_LAN9118_BASE_ADDR,
186
@@ -XXX,XX +XXX,XX @@ static void disas_thumb_insn(CPUARMState *env, DisasContext *s)
117
- qemu_irq_invert(s->soc->irq_table[exynos4210_get_irq(37, 1)]));
187
tmp2 = tcg_temp_new_i32();
118
+ qemu_irq_invert(s->soc.irq_table[exynos4210_get_irq(37, 1)]));
188
tcg_gen_movi_i32(tmp2, val);
119
arm_load_kernel(ARM_CPU(first_cpu), &exynos4_board_binfo);
189
store_reg(s, 14, tmp2);
120
}
190
+ gen_bx(s, tmp);
121
191
+ } else {
192
+ /* Only BX works as exception-return, not BLX */
193
+ gen_bx_excret(s, tmp);
194
}
195
- /* already thumb, no need to check */
196
- gen_bx(s, tmp);
197
break;
198
}
199
break;
200
@@ -XXX,XX +XXX,XX @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
201
instruction was a conditional branch or trap, and the PC has
202
already been written. */
203
gen_set_condexec(dc);
204
- if (unlikely(is_singlestepping(dc))) {
205
+ if (dc->is_jmp == DISAS_BX_EXCRET) {
206
+ /* Exception return branches need some special case code at the
207
+ * end of the TB, which is complex enough that it has to
208
+ * handle the single-step vs not and the condition-failed
209
+ * insn codepath itself.
210
+ */
211
+ gen_bx_excret_final_code(dc);
212
+ } else if (unlikely(is_singlestepping(dc))) {
213
/* Unconditional and "condition passed" instruction codepath. */
214
switch (dc->is_jmp) {
215
case DISAS_SWI:
216
--
122
--
217
2.7.4
123
2.20.1
218
124
219
125
diff view generated by jsdifflib