1 | ARM queue: nothing particularly exciting, but 18 patches | 1 | Not very much here, but several people have fallen over |
---|---|---|---|
2 | is enough to send out. | 2 | the vector operation segfault bug, so let's get the fix |
3 | into master. | ||
3 | 4 | ||
4 | thanks | 5 | thanks |
5 | -- PMM | 6 | -- PMM |
6 | 7 | ||
7 | The following changes since commit 3dabde1128b671f36ac6cb36b97b273139964420: | 8 | The following changes since commit d418238dca7b4e0b124135827ead3076233052b1: |
8 | 9 | ||
9 | Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170914' into staging (2017-09-14 16:33:02 +0100) | 10 | Merge remote-tracking branch 'remotes/rth/tags/pull-rng-20190522' into staging (2019-05-23 12:57:17 +0100) |
10 | 11 | ||
11 | are available in the git repository at: | 12 | are available in the Git repository at: |
12 | 13 | ||
13 | git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20170914 | 14 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20190523 |
14 | 15 | ||
15 | for you to fetch changes up to ce3bc112cdb1d462e2d52eaa17a7314e7f3af504: | 16 | for you to fetch changes up to 98e4f4fdb8ea05d840f51f47125924c2bb9df2df: |
16 | 17 | ||
17 | mps2-an511: Fix wiring of UART overflow interrupt lines (2017-09-14 18:43:19 +0100) | 18 | hw/arm/exynos4210: QOM'ify the Exynos4210 SoC (2019-05-23 14:47:44 +0100) |
18 | 19 | ||
19 | ---------------------------------------------------------------- | 20 | ---------------------------------------------------------------- |
20 | target-arm queue: | 21 | target-arm queue: |
21 | * v7M: various code cleanups | 22 | * exynos4210: QOM'ify the Exynos4210 SoC |
22 | * v7M: set correct BFSR bits on bus fault | 23 | * exynos4210: Add DMA support for the Exynos4210 |
23 | * v7M: clear exclusive monitor on reset and exception entry/exit | 24 | * arm_gicv3: Fix writes to ICC_CTLR_EL3 |
24 | * v7M: don't apply priority mask to negative priorities | 25 | * arm_gicv3: Fix write of ICH_VMCR_EL2.{VBPR0, VBPR1} |
25 | * zcu102: support 'secure' and 'virtualization' machine properties | 26 | * target/arm: Fix vector operation segfault |
26 | * aarch64: fix ERET single stepping | 27 | * target/arm: Minor improvements to BFXIL, EXTR |
27 | * gpex: implement PCI INTx routing | ||
28 | * mps2-an511: fix UART overflow interrupt line wiring | ||
29 | 28 | ||
30 | ---------------------------------------------------------------- | 29 | ---------------------------------------------------------------- |
31 | Alistair Francis (5): | 30 | Alistair Francis (1): |
32 | xlnx-ep108: Rename to ZCU102 | 31 | target/arm: Fix vector operation segfault |
33 | xlnx-zcu102: Manually create the machines | ||
34 | xlnx-zcu102: Add a machine level secure property | ||
35 | xlnx-zcu102: Add a machine level virtualization property | ||
36 | xlnx-zcu102: Mark the EP108 machine as deprecated | ||
37 | 32 | ||
38 | Jaroslaw Pelczar (1): | 33 | Guenter Roeck (1): |
39 | AArch64: Fix single stepping of ERET instruction | 34 | hw/arm/exynos4210: Add DMA support for the Exynos4210 |
40 | 35 | ||
41 | Peter Maydell (8): | 36 | Peter Maydell (5): |
42 | target/arm: Use M_REG_NUM_BANKS rather than hardcoding 2 | 37 | arm: Move system_clock_scale to armv7m_systick.h |
43 | target/arm: Clear exclusive monitor on v7M reset, exception entry/exit | 38 | arm: Remove unnecessary includes of hw/arm/arm.h |
44 | target/arm: Get PRECISERR and IBUSERR the right way round | 39 | arm: Rename hw/arm/arm.h to hw/arm/boot.h |
45 | nvic: Don't apply group priority mask to negative priorities | 40 | hw/intc/arm_gicv3: Fix write of ICH_VMCR_EL2.{VBPR0, VBPR1} |
46 | target/arm: Remove unnecessary '| 0xf0000000' from do_v7m_exception_exit() | 41 | hw/intc/arm_gicv3: Fix writes to ICC_CTLR_EL3 |
47 | target/arm: Add and use defines for EXCRET constants | ||
48 | target/arm: Rename 'type' to 'excret' in do_v7m_exception_exit() | ||
49 | mps2-an511: Fix wiring of UART overflow interrupt lines | ||
50 | 42 | ||
51 | Pranavkumar Sawargaonkar (3): | 43 | Philippe Mathieu-Daudé (3): |
52 | hw/pci-host/gpex: Set INTx index/gsi mapping | 44 | hw/arm/exynos4: Remove unuseful debug code |
53 | hw/arm/virt: Set INTx/gsi mapping | 45 | hw/arm/exynos4: Use the IEC binary prefix definitions |
54 | hw/pci-host/gpex: Implement PCI INTx routing | 46 | hw/arm/exynos4210: QOM'ify the Exynos4210 SoC |
55 | 47 | ||
56 | Richard Henderson (1): | 48 | Richard Henderson (2): |
57 | target/arm: Avoid an extra temporary for store_exclusive | 49 | target/arm: Use extract2 for EXTR |
50 | target/arm: Simplify BFXIL expansion | ||
58 | 51 | ||
59 | hw/arm/Makefile.objs | 2 +- | 52 | include/hw/arm/allwinner-a10.h | 2 +- |
60 | include/hw/arm/xlnx-zynqmp.h | 2 + | 53 | include/hw/arm/aspeed_soc.h | 1 - |
61 | include/hw/pci-host/gpex.h | 3 + | 54 | include/hw/arm/bcm2836.h | 1 - |
62 | target/arm/cpu.h | 35 +++--- | 55 | include/hw/arm/{arm.h => boot.h} | 12 +++------ |
63 | target/arm/internals.h | 20 ++++ | 56 | include/hw/arm/exynos4210.h | 9 +++++-- |
64 | hw/arm/mps2.c | 4 +- | 57 | include/hw/arm/fsl-imx25.h | 2 +- |
65 | hw/arm/virt.c | 1 + | 58 | include/hw/arm/fsl-imx31.h | 2 +- |
66 | hw/arm/xlnx-ep108.c | 139 ----------------------- | 59 | include/hw/arm/fsl-imx6.h | 2 +- |
67 | hw/arm/xlnx-zcu102.c | 259 +++++++++++++++++++++++++++++++++++++++++++ | 60 | include/hw/arm/fsl-imx6ul.h | 2 +- |
68 | hw/arm/xlnx-zynqmp.c | 3 +- | 61 | include/hw/arm/fsl-imx7.h | 2 +- |
69 | hw/intc/armv7m_nvic.c | 11 +- | 62 | include/hw/arm/virt.h | 2 +- |
70 | hw/pci-host/gpex.c | 22 ++++ | 63 | include/hw/arm/xlnx-versal.h | 2 +- |
71 | target/arm/cpu.c | 6 + | 64 | include/hw/arm/xlnx-zynqmp.h | 2 +- |
72 | target/arm/helper.c | 43 ++++--- | 65 | include/hw/timer/armv7m_systick.h | 22 ++++++++++++++++ |
73 | target/arm/op_helper.c | 2 +- | 66 | hw/arm/armsse.c | 2 +- |
74 | target/arm/translate-a64.c | 27 ++--- | 67 | hw/arm/armv7m.c | 2 +- |
75 | 16 files changed, 382 insertions(+), 197 deletions(-) | 68 | hw/arm/aspeed.c | 2 +- |
76 | delete mode 100644 hw/arm/xlnx-ep108.c | 69 | hw/arm/boot.c | 2 +- |
77 | create mode 100644 hw/arm/xlnx-zcu102.c | 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%) | ||
78 | 115 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | Use a symbolic constant M_REG_NUM_BANKS for the array size for | ||
2 | registers which are banked by M profile security state, rather | ||
3 | than hardcoding lots of 2s. | ||
4 | 1 | ||
5 | Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
7 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
8 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | ||
9 | Message-id: 1505137930-13255-2-git-send-email-peter.maydell@linaro.org | ||
10 | --- | ||
11 | target/arm/cpu.h | 35 +++++++++++++++++++---------------- | ||
12 | 1 file changed, 19 insertions(+), 16 deletions(-) | ||
13 | |||
14 | diff --git a/target/arm/cpu.h b/target/arm/cpu.h | ||
15 | index XXXXXXX..XXXXXXX 100644 | ||
16 | --- a/target/arm/cpu.h | ||
17 | +++ b/target/arm/cpu.h | ||
18 | @@ -XXX,XX +XXX,XX @@ | ||
19 | * accessed via env->registerfield[env->v7m.secure] (whether the security | ||
20 | * extension is implemented or not). | ||
21 | */ | ||
22 | -#define M_REG_NS 0 | ||
23 | -#define M_REG_S 1 | ||
24 | +enum { | ||
25 | + M_REG_NS = 0, | ||
26 | + M_REG_S = 1, | ||
27 | + M_REG_NUM_BANKS = 2, | ||
28 | +}; | ||
29 | |||
30 | /* ARM-specific interrupt pending bits. */ | ||
31 | #define CPU_INTERRUPT_FIQ CPU_INTERRUPT_TGT_EXT_1 | ||
32 | @@ -XXX,XX +XXX,XX @@ typedef struct CPUARMState { | ||
33 | uint32_t other_sp; | ||
34 | uint32_t other_ss_msp; | ||
35 | uint32_t other_ss_psp; | ||
36 | - uint32_t vecbase[2]; | ||
37 | - uint32_t basepri[2]; | ||
38 | - uint32_t control[2]; | ||
39 | - uint32_t ccr[2]; /* Configuration and Control */ | ||
40 | - uint32_t cfsr[2]; /* Configurable Fault Status */ | ||
41 | + uint32_t vecbase[M_REG_NUM_BANKS]; | ||
42 | + uint32_t basepri[M_REG_NUM_BANKS]; | ||
43 | + uint32_t control[M_REG_NUM_BANKS]; | ||
44 | + uint32_t ccr[M_REG_NUM_BANKS]; /* Configuration and Control */ | ||
45 | + uint32_t cfsr[M_REG_NUM_BANKS]; /* Configurable Fault Status */ | ||
46 | uint32_t hfsr; /* HardFault Status */ | ||
47 | uint32_t dfsr; /* Debug Fault Status Register */ | ||
48 | - uint32_t mmfar[2]; /* MemManage Fault Address */ | ||
49 | + uint32_t mmfar[M_REG_NUM_BANKS]; /* MemManage Fault Address */ | ||
50 | uint32_t bfar; /* BusFault Address */ | ||
51 | - unsigned mpu_ctrl[2]; /* MPU_CTRL */ | ||
52 | + unsigned mpu_ctrl[M_REG_NUM_BANKS]; /* MPU_CTRL */ | ||
53 | int exception; | ||
54 | - uint32_t primask[2]; | ||
55 | - uint32_t faultmask[2]; | ||
56 | + uint32_t primask[M_REG_NUM_BANKS]; | ||
57 | + uint32_t faultmask[M_REG_NUM_BANKS]; | ||
58 | uint32_t secure; /* Is CPU in Secure state? (not guest visible) */ | ||
59 | } v7m; | ||
60 | |||
61 | @@ -XXX,XX +XXX,XX @@ typedef struct CPUARMState { | ||
62 | uint32_t *drbar; | ||
63 | uint32_t *drsr; | ||
64 | uint32_t *dracr; | ||
65 | - uint32_t rnr[2]; | ||
66 | + uint32_t rnr[M_REG_NUM_BANKS]; | ||
67 | } pmsav7; | ||
68 | |||
69 | /* PMSAv8 MPU */ | ||
70 | @@ -XXX,XX +XXX,XX @@ typedef struct CPUARMState { | ||
71 | * pmsav7.rnr (region number register) | ||
72 | * pmsav7_dregion (number of configured regions) | ||
73 | */ | ||
74 | - uint32_t *rbar[2]; | ||
75 | - uint32_t *rlar[2]; | ||
76 | - uint32_t mair0[2]; | ||
77 | - uint32_t mair1[2]; | ||
78 | + uint32_t *rbar[M_REG_NUM_BANKS]; | ||
79 | + uint32_t *rlar[M_REG_NUM_BANKS]; | ||
80 | + uint32_t mair0[M_REG_NUM_BANKS]; | ||
81 | + uint32_t mair1[M_REG_NUM_BANKS]; | ||
82 | } pmsav8; | ||
83 | |||
84 | void *nvic; | ||
85 | -- | ||
86 | 2.7.4 | ||
87 | |||
88 | diff view generated by jsdifflib |
1 | From: Jaroslaw Pelczar <j.pelczar@samsung.com> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | Previously when single stepping through ERET instruction via GDB | 3 | This is, after all, how we implement extract2 in tcg/aarch64. |
4 | would result in debugger entering the "next" PC after ERET instruction. | ||
5 | When debugging in kernel mode, this will also cause unintended behavior, | ||
6 | because debugger will try to access memory from EL0 point of view. | ||
7 | 4 | ||
8 | Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com> | 5 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
9 | Message-id: 001c01d32895$483027f0$d89077d0$@samsung.com | 6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
10 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 7 | Message-id: 20190514011129.11330-2-richard.henderson@linaro.org |
11 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
12 | --- | 9 | --- |
13 | target/arm/translate-a64.c | 1 + | 10 | target/arm/translate-a64.c | 38 ++++++++++++++++++++------------------ |
14 | 1 file changed, 1 insertion(+) | 11 | 1 file changed, 20 insertions(+), 18 deletions(-) |
15 | 12 | ||
16 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c | 13 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c |
17 | index XXXXXXX..XXXXXXX 100644 | 14 | index XXXXXXX..XXXXXXX 100644 |
18 | --- a/target/arm/translate-a64.c | 15 | --- a/target/arm/translate-a64.c |
19 | +++ b/target/arm/translate-a64.c | 16 | +++ b/target/arm/translate-a64.c |
20 | @@ -XXX,XX +XXX,XX @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) | 17 | @@ -XXX,XX +XXX,XX @@ static void disas_extract(DisasContext *s, uint32_t insn) |
21 | default: | 18 | } else { |
22 | gen_a64_set_pc_im(dc->pc); | 19 | tcg_gen_ext32u_i64(tcg_rd, cpu_reg(s, rm)); |
23 | /* fall through */ | 20 | } |
24 | + case DISAS_EXIT: | 21 | - } else if (rm == rn) { /* ROR */ |
25 | case DISAS_JUMP: | 22 | - tcg_rm = cpu_reg(s, rm); |
26 | if (dc->base.singlestep_enabled) { | 23 | - if (sf) { |
27 | gen_exception_internal(EXCP_DEBUG); | 24 | - tcg_gen_rotri_i64(tcg_rd, tcg_rm, imm); |
25 | - } else { | ||
26 | - TCGv_i32 tmp = tcg_temp_new_i32(); | ||
27 | - tcg_gen_extrl_i64_i32(tmp, tcg_rm); | ||
28 | - tcg_gen_rotri_i32(tmp, tmp, imm); | ||
29 | - tcg_gen_extu_i32_i64(tcg_rd, tmp); | ||
30 | - tcg_temp_free_i32(tmp); | ||
31 | - } | ||
32 | } else { | ||
33 | - tcg_rm = read_cpu_reg(s, rm, sf); | ||
34 | - tcg_rn = read_cpu_reg(s, rn, sf); | ||
35 | - tcg_gen_shri_i64(tcg_rm, tcg_rm, imm); | ||
36 | - tcg_gen_shli_i64(tcg_rn, tcg_rn, bitsize - imm); | ||
37 | - tcg_gen_or_i64(tcg_rd, tcg_rm, tcg_rn); | ||
38 | - if (!sf) { | ||
39 | - tcg_gen_ext32u_i64(tcg_rd, tcg_rd); | ||
40 | + tcg_rm = cpu_reg(s, rm); | ||
41 | + tcg_rn = cpu_reg(s, rn); | ||
42 | + | ||
43 | + if (sf) { | ||
44 | + /* Specialization to ROR happens in EXTRACT2. */ | ||
45 | + tcg_gen_extract2_i64(tcg_rd, tcg_rm, tcg_rn, imm); | ||
46 | + } else { | ||
47 | + TCGv_i32 t0 = tcg_temp_new_i32(); | ||
48 | + | ||
49 | + tcg_gen_extrl_i64_i32(t0, tcg_rm); | ||
50 | + if (rm == rn) { | ||
51 | + tcg_gen_rotri_i32(t0, t0, imm); | ||
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 | } | ||
61 | } | ||
62 | } | ||
28 | -- | 63 | -- |
29 | 2.7.4 | 64 | 2.20.1 |
30 | 65 | ||
31 | 66 | diff view generated by jsdifflib |
1 | From: Richard Henderson <richard.henderson@linaro.org> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | Instead of copying addr to a local temp, reuse the value (which we | 3 | The mask implied by the extract is redundant with the one |
4 | have just compared as equal) already saved in cpu_exclusive_addr. | 4 | implied by the deposit. Also, fix spelling of BFXIL. |
5 | 5 | ||
6 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 7 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
7 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | 8 | Message-id: 20190514011129.11330-3-richard.henderson@linaro.org |
8 | Message-id: 20170908163859.29820-1-richard.henderson@linaro.org | ||
9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
10 | --- | 10 | --- |
11 | target/arm/translate-a64.c | 26 +++++++++----------------- | 11 | target/arm/translate-a64.c | 6 +++--- |
12 | 1 file changed, 9 insertions(+), 17 deletions(-) | 12 | 1 file changed, 3 insertions(+), 3 deletions(-) |
13 | 13 | ||
14 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c | 14 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c |
15 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/target/arm/translate-a64.c | 16 | --- a/target/arm/translate-a64.c |
17 | +++ b/target/arm/translate-a64.c | 17 | +++ b/target/arm/translate-a64.c |
18 | @@ -XXX,XX +XXX,XX @@ static void gen_load_exclusive(DisasContext *s, int rt, int rt2, | 18 | @@ -XXX,XX +XXX,XX @@ static void disas_bitfield(DisasContext *s, uint32_t insn) |
19 | } | 19 | tcg_gen_extract_i64(tcg_rd, tcg_tmp, ri, len); |
20 | 20 | return; | |
21 | static void gen_store_exclusive(DisasContext *s, int rd, int rt, int rt2, | ||
22 | - TCGv_i64 inaddr, int size, int is_pair) | ||
23 | + TCGv_i64 addr, int size, int is_pair) | ||
24 | { | ||
25 | /* if (env->exclusive_addr == addr && env->exclusive_val == [addr] | ||
26 | * && (!is_pair || env->exclusive_high == [addr + datasize])) { | ||
27 | @@ -XXX,XX +XXX,XX @@ static void gen_store_exclusive(DisasContext *s, int rd, int rt, int rt2, | ||
28 | */ | ||
29 | TCGLabel *fail_label = gen_new_label(); | ||
30 | TCGLabel *done_label = gen_new_label(); | ||
31 | - TCGv_i64 addr = tcg_temp_local_new_i64(); | ||
32 | TCGv_i64 tmp; | ||
33 | |||
34 | - /* Copy input into a local temp so it is not trashed when the | ||
35 | - * basic block ends at the branch insn. | ||
36 | - */ | ||
37 | - tcg_gen_mov_i64(addr, inaddr); | ||
38 | tcg_gen_brcond_i64(TCG_COND_NE, addr, cpu_exclusive_addr, fail_label); | ||
39 | |||
40 | tmp = tcg_temp_new_i64(); | ||
41 | @@ -XXX,XX +XXX,XX @@ static void gen_store_exclusive(DisasContext *s, int rd, int rt, int rt2, | ||
42 | } else { | ||
43 | tcg_gen_concat32_i64(tmp, cpu_reg(s, rt2), cpu_reg(s, rt)); | ||
44 | } | ||
45 | - tcg_gen_atomic_cmpxchg_i64(tmp, addr, cpu_exclusive_val, tmp, | ||
46 | + tcg_gen_atomic_cmpxchg_i64(tmp, cpu_exclusive_addr, | ||
47 | + cpu_exclusive_val, tmp, | ||
48 | get_mem_index(s), | ||
49 | MO_64 | MO_ALIGN | s->be_data); | ||
50 | tcg_gen_setcond_i64(TCG_COND_NE, tmp, tmp, cpu_exclusive_val); | ||
51 | } else if (s->be_data == MO_LE) { | ||
52 | - gen_helper_paired_cmpxchg64_le(tmp, cpu_env, addr, cpu_reg(s, rt), | ||
53 | - cpu_reg(s, rt2)); | ||
54 | + gen_helper_paired_cmpxchg64_le(tmp, cpu_env, cpu_exclusive_addr, | ||
55 | + cpu_reg(s, rt), cpu_reg(s, rt2)); | ||
56 | } else { | ||
57 | - gen_helper_paired_cmpxchg64_be(tmp, cpu_env, addr, cpu_reg(s, rt), | ||
58 | - cpu_reg(s, rt2)); | ||
59 | + gen_helper_paired_cmpxchg64_be(tmp, cpu_env, cpu_exclusive_addr, | ||
60 | + cpu_reg(s, rt), cpu_reg(s, rt2)); | ||
61 | } | 21 | } |
22 | - /* opc == 1, BXFIL fall through to deposit */ | ||
23 | - tcg_gen_extract_i64(tcg_tmp, tcg_tmp, ri, len); | ||
24 | + /* opc == 1, BFXIL fall through to deposit */ | ||
25 | + tcg_gen_shri_i64(tcg_tmp, tcg_tmp, ri); | ||
26 | pos = 0; | ||
62 | } else { | 27 | } else { |
63 | - TCGv_i64 val = cpu_reg(s, rt); | 28 | /* Handle the ri > si case with a deposit |
64 | - tcg_gen_atomic_cmpxchg_i64(tmp, addr, cpu_exclusive_val, val, | 29 | @@ -XXX,XX +XXX,XX @@ static void disas_bitfield(DisasContext *s, uint32_t insn) |
65 | - get_mem_index(s), | 30 | len = ri; |
66 | + tcg_gen_atomic_cmpxchg_i64(tmp, cpu_exclusive_addr, cpu_exclusive_val, | ||
67 | + cpu_reg(s, rt), get_mem_index(s), | ||
68 | size | MO_ALIGN | s->be_data); | ||
69 | tcg_gen_setcond_i64(TCG_COND_NE, tmp, tmp, cpu_exclusive_val); | ||
70 | } | 31 | } |
71 | - | 32 | |
72 | - tcg_temp_free_i64(addr); | 33 | - if (opc == 1) { /* BFM, BXFIL */ |
73 | - | 34 | + if (opc == 1) { /* BFM, BFXIL */ |
74 | tcg_gen_mov_i64(cpu_reg(s, rd), tmp); | 35 | tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_tmp, pos, len); |
75 | tcg_temp_free_i64(tmp); | 36 | } else { |
76 | tcg_gen_br(done_label); | 37 | /* SBFM or UBFM: We start with zero, and we haven't modified |
77 | -- | 38 | -- |
78 | 2.7.4 | 39 | 2.20.1 |
79 | 40 | ||
80 | 41 | diff view generated by jsdifflib |
1 | Fix an error that meant we were wiring every UART's overflow | 1 | From: Alistair Francis <alistair.francis@wdc.com> |
---|---|---|---|
2 | interrupts into the same inputs 0 and 1 of the OR gate, | ||
3 | rather than giving each its own input. | ||
4 | 2 | ||
5 | Cc: qemu-stable@nongnu.org | 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 | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 32 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
7 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
8 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | ||
9 | Message-id: 1505232834-20890-1-git-send-email-peter.maydell@linaro.org | ||
10 | --- | 33 | --- |
11 | hw/arm/mps2.c | 4 ++-- | 34 | target/arm/translate.c | 4 ++-- |
12 | 1 file changed, 2 insertions(+), 2 deletions(-) | 35 | 1 file changed, 2 insertions(+), 2 deletions(-) |
13 | 36 | ||
14 | diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c | 37 | diff --git a/target/arm/translate.c b/target/arm/translate.c |
15 | index XXXXXXX..XXXXXXX 100644 | 38 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/hw/arm/mps2.c | 39 | --- a/target/arm/translate.c |
17 | +++ b/hw/arm/mps2.c | 40 | +++ b/target/arm/translate.c |
18 | @@ -XXX,XX +XXX,XX @@ static void mps2_common_init(MachineState *machine) | 41 | @@ -XXX,XX +XXX,XX @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) |
19 | cmsdk_apb_uart_create(uartbase[i], | 42 | tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc), |
20 | qdev_get_gpio_in(txrx_orgate_dev, 0), | 43 | rn_ofs, rm_ofs, vec_size, vec_size, |
21 | qdev_get_gpio_in(txrx_orgate_dev, 1), | 44 | (u ? uqadd_op : sqadd_op) + size); |
22 | - qdev_get_gpio_in(orgate_dev, 0), | 45 | - break; |
23 | - qdev_get_gpio_in(orgate_dev, 1), | 46 | + return 0; |
24 | + qdev_get_gpio_in(orgate_dev, i * 2), | 47 | |
25 | + qdev_get_gpio_in(orgate_dev, i * 2 + 1), | 48 | case NEON_3R_VQSUB: |
26 | NULL, | 49 | tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc), |
27 | uartchr, SYSCLK_FRQ); | 50 | rn_ofs, rm_ofs, vec_size, vec_size, |
28 | } | 51 | (u ? uqsub_op : sqsub_op) + size); |
52 | - break; | ||
53 | + return 0; | ||
54 | |||
55 | case NEON_3R_VMUL: /* VMUL */ | ||
56 | if (u) { | ||
29 | -- | 57 | -- |
30 | 2.7.4 | 58 | 2.20.1 |
31 | 59 | ||
32 | 60 | diff view generated by jsdifflib |
1 | In the v7M and v8M ARM ARM, the magic exception return values are | 1 | The system_clock_scale global is used only by the armv7m systick |
---|---|---|---|
2 | referred to as EXC_RETURN values, and in QEMU we use V7M_EXCRET_* | 2 | device; move the extern declaration to the armv7m_systick.h header, |
3 | constants to define bits within them. Rename the 'type' variable | 3 | and expand the comment to explain what it is and that it should |
4 | which holds the exception return value in do_v7m_exception_exit() | 4 | ideally be replaced with a different approach. |
5 | to excret, making it clearer that it does hold an EXC_RETURN value. | ||
6 | 5 | ||
7 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
8 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 7 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
9 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | 8 | Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
10 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 9 | Message-id: 20190516163857.6430-2-peter.maydell@linaro.org |
11 | Message-id: 1505137930-13255-8-git-send-email-peter.maydell@linaro.org | ||
12 | --- | 10 | --- |
13 | target/arm/helper.c | 23 ++++++++++++----------- | 11 | include/hw/arm/arm.h | 4 ---- |
14 | 1 file changed, 12 insertions(+), 11 deletions(-) | 12 | include/hw/timer/armv7m_systick.h | 22 ++++++++++++++++++++++ |
13 | 2 files changed, 22 insertions(+), 4 deletions(-) | ||
15 | 14 | ||
16 | diff --git a/target/arm/helper.c b/target/arm/helper.c | 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/helper.c | 17 | --- a/include/hw/arm/arm.h |
19 | +++ b/target/arm/helper.c | 18 | +++ b/include/hw/arm/arm.h |
20 | @@ -XXX,XX +XXX,XX @@ static void v7m_push_stack(ARMCPU *cpu) | 19 | @@ -XXX,XX +XXX,XX @@ void arm_write_secure_board_setup_dummy_smc(ARMCPU *cpu, |
21 | static void do_v7m_exception_exit(ARMCPU *cpu) | 20 | const struct arm_boot_info *info, |
22 | { | 21 | hwaddr mvbar_addr); |
23 | CPUARMState *env = &cpu->env; | 22 | |
24 | - uint32_t type; | 23 | -/* Multiplication factor to convert from system clock ticks to qemu timer |
25 | + uint32_t excret; | 24 | - ticks. */ |
26 | uint32_t xpsr; | 25 | -extern int system_clock_scale; |
27 | bool ufault = false; | 26 | - |
28 | bool return_to_sp_process = false; | 27 | #endif /* HW_ARM_H */ |
29 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | 28 | diff --git a/include/hw/timer/armv7m_systick.h b/include/hw/timer/armv7m_systick.h |
30 | * the target value up between env->regs[15] and env->thumb in | 29 | index XXXXXXX..XXXXXXX 100644 |
31 | * gen_bx(). Reconstitute it. | 30 | --- a/include/hw/timer/armv7m_systick.h |
32 | */ | 31 | +++ b/include/hw/timer/armv7m_systick.h |
33 | - type = env->regs[15]; | 32 | @@ -XXX,XX +XXX,XX @@ typedef struct SysTickState { |
34 | + excret = env->regs[15]; | 33 | qemu_irq irq; |
35 | if (env->thumb) { | 34 | } SysTickState; |
36 | - type |= 1; | 35 | |
37 | + excret |= 1; | 36 | +/* |
38 | } | 37 | + * Multiplication factor to convert from system clock ticks to qemu timer |
39 | 38 | + * ticks. This should be set (by board code, usually) to a value | |
40 | qemu_log_mask(CPU_LOG_INT, "Exception return: magic PC %" PRIx32 | 39 | + * equal to NANOSECONDS_PER_SECOND / frq, where frq is the clock frequency |
41 | " previous exception %d\n", | 40 | + * in Hz of the CPU. |
42 | - type, env->v7m.exception); | 41 | + * |
43 | + excret, env->v7m.exception); | 42 | + * This value is used by the systick device when it is running in |
44 | 43 | + * its "use the CPU clock" mode (ie when SYST_CSR.CLKSOURCE == 1) to | |
45 | - if ((type & R_V7M_EXCRET_RES1_MASK) != R_V7M_EXCRET_RES1_MASK) { | 44 | + * set how fast the timer should tick. |
46 | + if ((excret & R_V7M_EXCRET_RES1_MASK) != R_V7M_EXCRET_RES1_MASK) { | 45 | + * |
47 | qemu_log_mask(LOG_GUEST_ERROR, "M profile: zero high bits in exception " | 46 | + * TODO: we should refactor this so that rather than using a global |
48 | - "exit PC value 0x%" PRIx32 " are UNPREDICTABLE\n", type); | 47 | + * we use a device property or something similar. This is complicated |
49 | + "exit PC value 0x%" PRIx32 " are UNPREDICTABLE\n", | 48 | + * because (a) the property would need to be plumbed through from the |
50 | + excret); | 49 | + * board code down through various layers to the systick device |
51 | } | 50 | + * and (b) the property needs to be modifiable after realize, because |
52 | 51 | + * the stellaris board uses this to implement the behaviour where the | |
53 | if (env->v7m.exception != ARMV7M_EXCP_NMI) { | 52 | + * guest can reprogram the PLL registers to downclock the CPU, and the |
54 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | 53 | + * systick device needs to react accordingly. Possibly this should |
55 | * which security state's faultmask to clear. (v8M ARM ARM R_KBNF.) | 54 | + * be deferred until we have a good API for modelling clock trees. |
56 | */ | 55 | + */ |
57 | if (arm_feature(env, ARM_FEATURE_M_SECURITY)) { | 56 | +extern int system_clock_scale; |
58 | - int es = type & R_V7M_EXCRET_ES_MASK; | 57 | + |
59 | + int es = excret & R_V7M_EXCRET_ES_MASK; | 58 | #endif |
60 | if (armv7m_nvic_raw_execution_priority(env->nvic) >= 0) { | ||
61 | env->v7m.faultmask[es] = 0; | ||
62 | } | ||
63 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | ||
64 | g_assert_not_reached(); | ||
65 | } | ||
66 | |||
67 | - switch (type & 0xf) { | ||
68 | + switch (excret & 0xf) { | ||
69 | case 1: /* Return to Handler */ | ||
70 | return_to_handler = true; | ||
71 | break; | ||
72 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | ||
73 | */ | ||
74 | env->v7m.cfsr[env->v7m.secure] |= R_V7M_CFSR_INVPC_MASK; | ||
75 | armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE); | ||
76 | - v7m_exception_taken(cpu, type); | ||
77 | + v7m_exception_taken(cpu, excret); | ||
78 | qemu_log_mask(CPU_LOG_INT, "...taking UsageFault on existing " | ||
79 | "stackframe: failed exception return integrity check\n"); | ||
80 | return; | ||
81 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | ||
82 | |||
83 | /* The restored xPSR exception field will be zero if we're | ||
84 | * resuming in Thread mode. If that doesn't match what the | ||
85 | - * exception return type specified then this is a UsageFault. | ||
86 | + * exception return excret specified then this is a UsageFault. | ||
87 | */ | ||
88 | if (return_to_handler != arm_v7m_is_handler_mode(env)) { | ||
89 | /* Take an INVPC UsageFault by pushing the stack again. */ | ||
90 | armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE); | ||
91 | env->v7m.cfsr[env->v7m.secure] |= R_V7M_CFSR_INVPC_MASK; | ||
92 | v7m_push_stack(cpu); | ||
93 | - v7m_exception_taken(cpu, type); | ||
94 | + v7m_exception_taken(cpu, excret); | ||
95 | qemu_log_mask(CPU_LOG_INT, "...taking UsageFault on new stackframe: " | ||
96 | "failed exception return integrity check\n"); | ||
97 | return; | ||
98 | -- | 59 | -- |
99 | 2.7.4 | 60 | 2.20.1 |
100 | 61 | ||
101 | 62 | diff view generated by jsdifflib |
1 | In several places we were unconditionally applying the | 1 | The hw/arm/arm.h header now only includes declarations relating |
---|---|---|---|
2 | nvic_gprio_mask() to a priority value. This is incorrect | 2 | to boot.c code, so it is only needed by Arm board or SoC code. |
3 | if the priority is one of the fixed negative priority | 3 | Remove some unnecessary inclusions of it from target/arm files |
4 | values (for NMI and HardFault), so don't do it. | 4 | and from hw/intc/armv7m_nvic.c. |
5 | |||
6 | This bug would have caused both NMI and HardFault to be | ||
7 | considered as the same priority and so NMI wouldn't | ||
8 | correctly preempt HardFault. | ||
9 | 5 | ||
10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
11 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 7 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
12 | Message-id: 1505137930-13255-5-git-send-email-peter.maydell@linaro.org | 8 | Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
9 | Message-id: 20190516163857.6430-3-peter.maydell@linaro.org | ||
13 | --- | 10 | --- |
14 | hw/intc/armv7m_nvic.c | 11 +++++++++-- | 11 | hw/intc/armv7m_nvic.c | 1 - |
15 | 1 file changed, 9 insertions(+), 2 deletions(-) | 12 | target/arm/arm-semi.c | 1 - |
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(-) | ||
16 | 19 | ||
17 | diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c | 20 | diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c |
18 | index XXXXXXX..XXXXXXX 100644 | 21 | index XXXXXXX..XXXXXXX 100644 |
19 | --- a/hw/intc/armv7m_nvic.c | 22 | --- a/hw/intc/armv7m_nvic.c |
20 | +++ b/hw/intc/armv7m_nvic.c | 23 | +++ b/hw/intc/armv7m_nvic.c |
21 | @@ -XXX,XX +XXX,XX @@ static void nvic_recompute_state(NVICState *s) | 24 | @@ -XXX,XX +XXX,XX @@ |
22 | } | 25 | #include "cpu.h" |
23 | } | 26 | #include "hw/sysbus.h" |
24 | 27 | #include "qemu/timer.h" | |
25 | + if (active_prio > 0) { | 28 | -#include "hw/arm/arm.h" |
26 | + active_prio &= nvic_gprio_mask(s); | 29 | #include "hw/intc/armv7m_nvic.h" |
27 | + } | 30 | #include "target/arm/cpu.h" |
28 | + | 31 | #include "exec/exec-all.h" |
29 | s->vectpending = pend_irq; | 32 | diff --git a/target/arm/arm-semi.c b/target/arm/arm-semi.c |
30 | - s->exception_prio = active_prio & nvic_gprio_mask(s); | 33 | index XXXXXXX..XXXXXXX 100644 |
31 | + s->exception_prio = active_prio; | 34 | --- a/target/arm/arm-semi.c |
32 | 35 | +++ b/target/arm/arm-semi.c | |
33 | trace_nvic_recompute_state(s->vectpending, s->exception_prio); | 36 | @@ -XXX,XX +XXX,XX @@ |
34 | } | 37 | #else |
35 | @@ -XXX,XX +XXX,XX @@ void armv7m_nvic_acknowledge_irq(void *opaque) | 38 | #include "qemu-common.h" |
36 | assert(vec->enabled); | 39 | #include "exec/gdbstub.h" |
37 | assert(vec->pending); | 40 | -#include "hw/arm/arm.h" |
38 | 41 | #include "qemu/cutils.h" | |
39 | - pendgroupprio = vec->prio & nvic_gprio_mask(s); | 42 | #endif |
40 | + pendgroupprio = vec->prio; | 43 | |
41 | + if (pendgroupprio > 0) { | 44 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c |
42 | + pendgroupprio &= nvic_gprio_mask(s); | 45 | index XXXXXXX..XXXXXXX 100644 |
43 | + } | 46 | --- a/target/arm/cpu.c |
44 | assert(pendgroupprio < running); | 47 | +++ b/target/arm/cpu.c |
45 | 48 | @@ -XXX,XX +XXX,XX @@ | |
46 | trace_nvic_acknowledge_irq(pending, vec->prio); | 49 | #if !defined(CONFIG_USER_ONLY) |
50 | #include "hw/loader.h" | ||
51 | #endif | ||
52 | -#include "hw/arm/arm.h" | ||
53 | #include "sysemu/sysemu.h" | ||
54 | #include "sysemu/hw_accel.h" | ||
55 | #include "kvm_arm.h" | ||
56 | diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c | ||
57 | index XXXXXXX..XXXXXXX 100644 | ||
58 | --- a/target/arm/cpu64.c | ||
59 | +++ b/target/arm/cpu64.c | ||
60 | @@ -XXX,XX +XXX,XX @@ | ||
61 | #if !defined(CONFIG_USER_ONLY) | ||
62 | #include "hw/loader.h" | ||
63 | #endif | ||
64 | -#include "hw/arm/arm.h" | ||
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 | |||
47 | -- | 104 | -- |
48 | 2.7.4 | 105 | 2.20.1 |
49 | 106 | ||
50 | 107 | diff view generated by jsdifflib |
1 | From: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> | 1 | The header file hw/arm/arm.h now includes only declarations |
---|---|---|---|
2 | relating to hw/arm/boot.c functionality. Rename it accordingly, | ||
3 | and adjust its header comment. | ||
2 | 4 | ||
3 | Let's provide the GPEX host bridge with the INTx/gsi mapping. This is | 5 | The bulk of this commit was created via |
4 | needed for INTx/gsi routing. | 6 | perl -pi -e 's|hw/arm/arm.h|hw/arm/boot.h|' hw/arm/*.c include/hw/arm/*.h |
5 | 7 | ||
6 | Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> | 8 | In a few cases we can just delete the #include: |
7 | Signed-off-by: Tushar Jagad <tushar.jagad@linaro.org> | 9 | hw/arm/msf2-soc.c, include/hw/arm/aspeed_soc.h and |
8 | Signed-off-by: Eric Auger <eric.auger@redhat.com> | 10 | include/hw/arm/bcm2836.h did not require it. |
9 | Reviewed-by: Andrew Jones <drjones@redhat.com> | 11 | |
10 | Tested-by: Feng Kan <fkan@apm.com> | ||
11 | Message-id: 1505296004-6798-3-git-send-email-eric.auger@redhat.com | ||
12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
13 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
14 | Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
15 | Message-id: 20190516163857.6430-4-peter.maydell@linaro.org | ||
13 | --- | 16 | --- |
14 | hw/arm/virt.c | 1 + | 17 | include/hw/arm/allwinner-a10.h | 2 +- |
15 | 1 file changed, 1 insertion(+) | 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%) | ||
16 | 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" | ||
591 | diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c | ||
592 | index XXXXXXX..XXXXXXX 100644 | ||
593 | --- a/hw/arm/stellaris.c | ||
594 | +++ b/hw/arm/stellaris.c | ||
595 | @@ -XXX,XX +XXX,XX @@ | ||
596 | #include "qapi/error.h" | ||
597 | #include "hw/sysbus.h" | ||
598 | #include "hw/ssi/ssi.h" | ||
599 | -#include "hw/arm/arm.h" | ||
600 | +#include "hw/arm/boot.h" | ||
601 | #include "qemu/timer.h" | ||
602 | #include "hw/i2c/i2c.h" | ||
603 | #include "net/net.h" | ||
604 | diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c | ||
605 | index XXXXXXX..XXXXXXX 100644 | ||
606 | --- a/hw/arm/stm32f205_soc.c | ||
607 | +++ b/hw/arm/stm32f205_soc.c | ||
608 | @@ -XXX,XX +XXX,XX @@ | ||
609 | #include "qemu/osdep.h" | ||
610 | #include "qapi/error.h" | ||
611 | #include "qemu-common.h" | ||
612 | -#include "hw/arm/arm.h" | ||
613 | +#include "hw/arm/boot.h" | ||
614 | #include "exec/address-spaces.h" | ||
615 | #include "hw/arm/stm32f205_soc.h" | ||
616 | |||
617 | diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c | ||
618 | index XXXXXXX..XXXXXXX 100644 | ||
619 | --- a/hw/arm/strongarm.c | ||
620 | +++ b/hw/arm/strongarm.c | ||
621 | @@ -XXX,XX +XXX,XX @@ | ||
622 | #include "hw/sysbus.h" | ||
623 | #include "strongarm.h" | ||
624 | #include "qemu/error-report.h" | ||
625 | -#include "hw/arm/arm.h" | ||
626 | +#include "hw/arm/boot.h" | ||
627 | #include "chardev/char-fe.h" | ||
628 | #include "chardev/char-serial.h" | ||
629 | #include "sysemu/sysemu.h" | ||
630 | diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c | ||
631 | index XXXXXXX..XXXXXXX 100644 | ||
632 | --- a/hw/arm/tosa.c | ||
633 | +++ b/hw/arm/tosa.c | ||
634 | @@ -XXX,XX +XXX,XX @@ | ||
635 | #include "qapi/error.h" | ||
636 | #include "hw/hw.h" | ||
637 | #include "hw/arm/pxa.h" | ||
638 | -#include "hw/arm/arm.h" | ||
639 | +#include "hw/arm/boot.h" | ||
640 | #include "hw/arm/sharpsl.h" | ||
641 | #include "hw/pcmcia.h" | ||
642 | #include "hw/boards.h" | ||
643 | diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c | ||
644 | index XXXXXXX..XXXXXXX 100644 | ||
645 | --- a/hw/arm/versatilepb.c | ||
646 | +++ b/hw/arm/versatilepb.c | ||
647 | @@ -XXX,XX +XXX,XX @@ | ||
648 | #include "qemu-common.h" | ||
649 | #include "cpu.h" | ||
650 | #include "hw/sysbus.h" | ||
651 | -#include "hw/arm/arm.h" | ||
652 | +#include "hw/arm/boot.h" | ||
653 | #include "hw/net/smc91c111.h" | ||
654 | #include "net/net.h" | ||
655 | #include "sysemu/sysemu.h" | ||
656 | diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c | ||
657 | index XXXXXXX..XXXXXXX 100644 | ||
658 | --- a/hw/arm/vexpress.c | ||
659 | +++ b/hw/arm/vexpress.c | ||
660 | @@ -XXX,XX +XXX,XX @@ | ||
661 | #include "qemu-common.h" | ||
662 | #include "cpu.h" | ||
663 | #include "hw/sysbus.h" | ||
664 | -#include "hw/arm/arm.h" | ||
665 | +#include "hw/arm/boot.h" | ||
666 | #include "hw/arm/primecell.h" | ||
667 | #include "hw/net/lan9118.h" | ||
668 | #include "hw/i2c/i2c.h" | ||
17 | diff --git a/hw/arm/virt.c b/hw/arm/virt.c | 669 | diff --git a/hw/arm/virt.c b/hw/arm/virt.c |
18 | index XXXXXXX..XXXXXXX 100644 | 670 | index XXXXXXX..XXXXXXX 100644 |
19 | --- a/hw/arm/virt.c | 671 | --- a/hw/arm/virt.c |
20 | +++ b/hw/arm/virt.c | 672 | +++ b/hw/arm/virt.c |
21 | @@ -XXX,XX +XXX,XX @@ static void create_pcie(const VirtMachineState *vms, qemu_irq *pic) | 673 | @@ -XXX,XX +XXX,XX @@ |
22 | 674 | #include "qemu/option.h" | |
23 | for (i = 0; i < GPEX_NUM_IRQS; i++) { | 675 | #include "qapi/error.h" |
24 | sysbus_connect_irq(SYS_BUS_DEVICE(dev), i, pic[irq + i]); | 676 | #include "hw/sysbus.h" |
25 | + gpex_set_irq_num(GPEX_HOST(dev), i, irq + i); | 677 | -#include "hw/arm/arm.h" |
26 | } | 678 | +#include "hw/arm/boot.h" |
27 | 679 | #include "hw/arm/primecell.h" | |
28 | pci = PCI_HOST_BRIDGE(dev); | 680 | #include "hw/arm/virt.h" |
681 | #include "hw/block/flash.h" | ||
682 | diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c | ||
683 | index XXXXXXX..XXXXXXX 100644 | ||
684 | --- a/hw/arm/xilinx_zynq.c | ||
685 | +++ b/hw/arm/xilinx_zynq.c | ||
686 | @@ -XXX,XX +XXX,XX @@ | ||
687 | #include "qemu-common.h" | ||
688 | #include "cpu.h" | ||
689 | #include "hw/sysbus.h" | ||
690 | -#include "hw/arm/arm.h" | ||
691 | +#include "hw/arm/boot.h" | ||
692 | #include "net/net.h" | ||
693 | #include "exec/address-spaces.h" | ||
694 | #include "sysemu/sysemu.h" | ||
695 | diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c | ||
696 | index XXXXXXX..XXXXXXX 100644 | ||
697 | --- a/hw/arm/xlnx-versal.c | ||
698 | +++ b/hw/arm/xlnx-versal.c | ||
699 | @@ -XXX,XX +XXX,XX @@ | ||
700 | #include "net/net.h" | ||
701 | #include "sysemu/sysemu.h" | ||
702 | #include "sysemu/kvm.h" | ||
703 | -#include "hw/arm/arm.h" | ||
704 | +#include "hw/arm/boot.h" | ||
705 | #include "kvm_arm.h" | ||
706 | #include "hw/misc/unimp.h" | ||
707 | #include "hw/intc/arm_gicv3_common.h" | ||
708 | diff --git a/hw/arm/z2.c b/hw/arm/z2.c | ||
709 | index XXXXXXX..XXXXXXX 100644 | ||
710 | --- a/hw/arm/z2.c | ||
711 | +++ b/hw/arm/z2.c | ||
712 | @@ -XXX,XX +XXX,XX @@ | ||
713 | #include "qemu/osdep.h" | ||
714 | #include "hw/hw.h" | ||
715 | #include "hw/arm/pxa.h" | ||
716 | -#include "hw/arm/arm.h" | ||
717 | +#include "hw/arm/boot.h" | ||
718 | #include "hw/i2c/i2c.h" | ||
719 | #include "hw/ssi/ssi.h" | ||
720 | #include "hw/boards.h" | ||
29 | -- | 721 | -- |
30 | 2.7.4 | 722 | 2.20.1 |
31 | 723 | ||
32 | 724 | diff view generated by jsdifflib |
1 | From: Alistair Francis <alistair.francis@xilinx.com> | 1 | In ich_vmcr_write() we enforce "writes of BPR fields to less than |
---|---|---|---|
2 | their minimum sets them to the minimum" by doing a "read vbpr and | ||
3 | write it back" operation. A typo here meant that we weren't handling | ||
4 | writes to these fields correctly, because we were reading from VBPR0 | ||
5 | but writing to VBPR1. | ||
2 | 6 | ||
3 | The EP108 is the same as the ZCU102, mark it as deprecated as we don't | ||
4 | need two machines. | ||
5 | |||
6 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | ||
7 | Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 7 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
8 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
9 | Message-id: 20190520162809.2677-4-peter.maydell@linaro.org | ||
9 | --- | 10 | --- |
10 | hw/arm/xlnx-zcu102.c | 2 +- | 11 | hw/intc/arm_gicv3_cpuif.c | 2 +- |
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 12 | 1 file changed, 1 insertion(+), 1 deletion(-) |
12 | 13 | ||
13 | diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c | 14 | diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c |
14 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
15 | --- a/hw/arm/xlnx-zcu102.c | 16 | --- a/hw/intc/arm_gicv3_cpuif.c |
16 | +++ b/hw/arm/xlnx-zcu102.c | 17 | +++ b/hw/intc/arm_gicv3_cpuif.c |
17 | @@ -XXX,XX +XXX,XX @@ static void xlnx_ep108_machine_class_init(ObjectClass *oc, void *data) | 18 | @@ -XXX,XX +XXX,XX @@ static void ich_vmcr_write(CPUARMState *env, const ARMCPRegInfo *ri, |
18 | { | 19 | /* Enforce "writing BPRs to less than minimum sets them to the minimum" |
19 | MachineClass *mc = MACHINE_CLASS(oc); | 20 | * by reading and writing back the fields. |
20 | 21 | */ | |
21 | - mc->desc = "Xilinx ZynqMP EP108 board"; | 22 | - write_vbpr(cs, GICV3_G1, read_vbpr(cs, GICV3_G0)); |
22 | + mc->desc = "Xilinx ZynqMP EP108 board (Deprecated, please use xlnx-zcu102)"; | 23 | + write_vbpr(cs, GICV3_G0, read_vbpr(cs, GICV3_G0)); |
23 | mc->init = xlnx_ep108_init; | 24 | write_vbpr(cs, GICV3_G1, read_vbpr(cs, GICV3_G1)); |
24 | mc->block_default_type = IF_IDE; | 25 | |
25 | mc->units_per_default_bus = 1; | 26 | gicv3_cpuif_virt_update(cs); |
26 | -- | 27 | -- |
27 | 2.7.4 | 28 | 2.20.1 |
28 | 29 | ||
29 | 30 | diff view generated by jsdifflib |
1 | For M profile we must clear the exclusive monitor on reset, exception | 1 | The ICC_CTLR_EL3 register includes some bits which are aliases |
---|---|---|---|
2 | entry and exception exit. We weren't doing any of these things; fix | 2 | of bits in the ICC_CTLR_EL1(S) and (NS) registers. QEMU chooses |
3 | this bug. | 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. | ||
4 | 7 | ||
5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
6 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | 9 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
7 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 10 | Message-id: 20190520162809.2677-5-peter.maydell@linaro.org |
8 | Message-id: 1505137930-13255-3-git-send-email-peter.maydell@linaro.org | ||
9 | --- | 11 | --- |
10 | target/arm/internals.h | 10 ++++++++++ | 12 | hw/intc/arm_gicv3_cpuif.c | 4 ++-- |
11 | target/arm/cpu.c | 6 ++++++ | 13 | 1 file changed, 2 insertions(+), 2 deletions(-) |
12 | target/arm/helper.c | 2 ++ | ||
13 | target/arm/op_helper.c | 2 +- | ||
14 | 4 files changed, 19 insertions(+), 1 deletion(-) | ||
15 | 14 | ||
16 | diff --git a/target/arm/internals.h b/target/arm/internals.h | 15 | diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c |
17 | index XXXXXXX..XXXXXXX 100644 | 16 | index XXXXXXX..XXXXXXX 100644 |
18 | --- a/target/arm/internals.h | 17 | --- a/hw/intc/arm_gicv3_cpuif.c |
19 | +++ b/target/arm/internals.h | 18 | +++ b/hw/intc/arm_gicv3_cpuif.c |
20 | @@ -XXX,XX +XXX,XX @@ void arm_handle_psci_call(ARMCPU *cpu); | 19 | @@ -XXX,XX +XXX,XX @@ static void icc_ctlr_el3_write(CPUARMState *env, const ARMCPRegInfo *ri, |
21 | #endif | 20 | trace_gicv3_icc_ctlr_el3_write(gicv3_redist_affid(cs), value); |
22 | 21 | ||
23 | /** | 22 | /* *_EL1NS and *_EL1S bits are aliases into the ICC_CTLR_EL1 bits. */ |
24 | + * arm_clear_exclusive: clear the exclusive monitor | 23 | - cs->icc_ctlr_el1[GICV3_NS] &= (ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE); |
25 | + * @env: CPU env | 24 | + cs->icc_ctlr_el1[GICV3_NS] &= ~(ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE); |
26 | + * Clear the CPU's exclusive monitor, like the guest CLREX instruction. | 25 | if (value & ICC_CTLR_EL3_EOIMODE_EL1NS) { |
27 | + */ | 26 | cs->icc_ctlr_el1[GICV3_NS] |= ICC_CTLR_EL1_EOIMODE; |
28 | +static inline void arm_clear_exclusive(CPUARMState *env) | ||
29 | +{ | ||
30 | + env->exclusive_addr = -1; | ||
31 | +} | ||
32 | + | ||
33 | +/** | ||
34 | * ARMMMUFaultInfo: Information describing an ARM MMU Fault | ||
35 | * @s2addr: Address that caused a fault at stage 2 | ||
36 | * @stage2: True if we faulted at stage 2 | ||
37 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c | ||
38 | index XXXXXXX..XXXXXXX 100644 | ||
39 | --- a/target/arm/cpu.c | ||
40 | +++ b/target/arm/cpu.c | ||
41 | @@ -XXX,XX +XXX,XX @@ static void arm_cpu_reset(CPUState *s) | ||
42 | env->regs[15] = 0xFFFF0000; | ||
43 | } | 27 | } |
44 | 28 | @@ -XXX,XX +XXX,XX @@ static void icc_ctlr_el3_write(CPUARMState *env, const ARMCPRegInfo *ri, | |
45 | + /* M profile requires that reset clears the exclusive monitor; | 29 | cs->icc_ctlr_el1[GICV3_NS] |= ICC_CTLR_EL1_CBPR; |
46 | + * A profile does not, but clearing it makes more sense than having it | ||
47 | + * set with an exclusive access on address zero. | ||
48 | + */ | ||
49 | + arm_clear_exclusive(env); | ||
50 | + | ||
51 | env->vfp.xregs[ARM_VFP_FPEXC] = 0; | ||
52 | #endif | ||
53 | |||
54 | diff --git a/target/arm/helper.c b/target/arm/helper.c | ||
55 | index XXXXXXX..XXXXXXX 100644 | ||
56 | --- a/target/arm/helper.c | ||
57 | +++ b/target/arm/helper.c | ||
58 | @@ -XXX,XX +XXX,XX @@ static void v7m_exception_taken(ARMCPU *cpu, uint32_t lr) | ||
59 | |||
60 | armv7m_nvic_acknowledge_irq(env->nvic); | ||
61 | switch_v7m_sp(env, 0); | ||
62 | + arm_clear_exclusive(env); | ||
63 | /* Clear IT bits */ | ||
64 | env->condexec_bits = 0; | ||
65 | env->regs[14] = lr; | ||
66 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | ||
67 | } | 30 | } |
68 | 31 | ||
69 | /* Otherwise, we have a successful exception exit. */ | 32 | - cs->icc_ctlr_el1[GICV3_S] &= (ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE); |
70 | + arm_clear_exclusive(env); | 33 | + cs->icc_ctlr_el1[GICV3_S] &= ~(ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE); |
71 | qemu_log_mask(CPU_LOG_INT, "...successful exception return\n"); | 34 | if (value & ICC_CTLR_EL3_EOIMODE_EL1S) { |
72 | } | 35 | cs->icc_ctlr_el1[GICV3_S] |= ICC_CTLR_EL1_EOIMODE; |
73 | 36 | } | |
74 | diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c | ||
75 | index XXXXXXX..XXXXXXX 100644 | ||
76 | --- a/target/arm/op_helper.c | ||
77 | +++ b/target/arm/op_helper.c | ||
78 | @@ -XXX,XX +XXX,XX @@ void HELPER(exception_return)(CPUARMState *env) | ||
79 | |||
80 | aarch64_save_sp(env, cur_el); | ||
81 | |||
82 | - env->exclusive_addr = -1; | ||
83 | + arm_clear_exclusive(env); | ||
84 | |||
85 | /* We must squash the PSTATE.SS bit to zero unless both of the | ||
86 | * following hold: | ||
87 | -- | 37 | -- |
88 | 2.7.4 | 38 | 2.20.1 |
89 | 39 | ||
90 | 40 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | For a bus fault, the M profile BFSR bit PRECISERR means a bus | ||
2 | fault on a data access, and IBUSERR means a bus fault on an | ||
3 | instruction access. We had these the wrong way around; fix this. | ||
4 | 1 | ||
5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
6 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | ||
7 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
8 | Message-id: 1505137930-13255-4-git-send-email-peter.maydell@linaro.org | ||
9 | --- | ||
10 | target/arm/helper.c | 8 ++++---- | ||
11 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/target/arm/helper.c b/target/arm/helper.c | ||
14 | index XXXXXXX..XXXXXXX 100644 | ||
15 | --- a/target/arm/helper.c | ||
16 | +++ b/target/arm/helper.c | ||
17 | @@ -XXX,XX +XXX,XX @@ void arm_v7m_cpu_do_interrupt(CPUState *cs) | ||
18 | case 0x8: /* External Abort */ | ||
19 | switch (cs->exception_index) { | ||
20 | case EXCP_PREFETCH_ABORT: | ||
21 | - env->v7m.cfsr[M_REG_NS] |= R_V7M_CFSR_PRECISERR_MASK; | ||
22 | - qemu_log_mask(CPU_LOG_INT, "...with CFSR.PRECISERR\n"); | ||
23 | + env->v7m.cfsr[M_REG_NS] |= R_V7M_CFSR_IBUSERR_MASK; | ||
24 | + qemu_log_mask(CPU_LOG_INT, "...with CFSR.IBUSERR\n"); | ||
25 | break; | ||
26 | case EXCP_DATA_ABORT: | ||
27 | env->v7m.cfsr[M_REG_NS] |= | ||
28 | - (R_V7M_CFSR_IBUSERR_MASK | R_V7M_CFSR_BFARVALID_MASK); | ||
29 | + (R_V7M_CFSR_PRECISERR_MASK | R_V7M_CFSR_BFARVALID_MASK); | ||
30 | env->v7m.bfar = env->exception.vaddress; | ||
31 | qemu_log_mask(CPU_LOG_INT, | ||
32 | - "...with CFSR.IBUSERR and BFAR 0x%x\n", | ||
33 | + "...with CFSR.PRECISERR and BFAR 0x%x\n", | ||
34 | env->v7m.bfar); | ||
35 | break; | ||
36 | } | ||
37 | -- | ||
38 | 2.7.4 | ||
39 | |||
40 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | In do_v7m_exception_exit(), there's no need to force the high 4 | ||
2 | bits of 'type' to 1 when calling v7m_exception_taken(), because | ||
3 | we know that they're always 1 or we could not have got to this | ||
4 | "handle return to magic exception return address" code. Remove | ||
5 | the unnecessary ORs. | ||
6 | 1 | ||
7 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
8 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
9 | Acked-by: Alistair Francis <alistair.francis@xilinx.com> | ||
10 | Message-id: 1505137930-13255-6-git-send-email-peter.maydell@linaro.org | ||
11 | --- | ||
12 | target/arm/helper.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/target/arm/helper.c b/target/arm/helper.c | ||
16 | index XXXXXXX..XXXXXXX 100644 | ||
17 | --- a/target/arm/helper.c | ||
18 | +++ b/target/arm/helper.c | ||
19 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | ||
20 | */ | ||
21 | env->v7m.cfsr[env->v7m.secure] |= R_V7M_CFSR_INVPC_MASK; | ||
22 | armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE); | ||
23 | - v7m_exception_taken(cpu, type | 0xf0000000); | ||
24 | + v7m_exception_taken(cpu, type); | ||
25 | qemu_log_mask(CPU_LOG_INT, "...taking UsageFault on existing " | ||
26 | "stackframe: failed exception return integrity check\n"); | ||
27 | return; | ||
28 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | ||
29 | armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE); | ||
30 | env->v7m.cfsr[env->v7m.secure] |= R_V7M_CFSR_INVPC_MASK; | ||
31 | v7m_push_stack(cpu); | ||
32 | - v7m_exception_taken(cpu, type | 0xf0000000); | ||
33 | + v7m_exception_taken(cpu, type); | ||
34 | qemu_log_mask(CPU_LOG_INT, "...taking UsageFault on new stackframe: " | ||
35 | "failed exception return integrity check\n"); | ||
36 | return; | ||
37 | -- | ||
38 | 2.7.4 | ||
39 | |||
40 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The exception-return magic values get some new bits in v8M, which | ||
2 | makes some bit definitions for them worthwhile. | ||
3 | 1 | ||
4 | We don't use the bit definitions for the switch on the low bits | ||
5 | which checks the return type for v7M, because this is defined | ||
6 | in the v7M ARM ARM as a set of valid values rather than via | ||
7 | per-bit checks. | ||
8 | |||
9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
10 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | ||
11 | Message-id: 1505137930-13255-7-git-send-email-peter.maydell@linaro.org | ||
12 | --- | ||
13 | target/arm/internals.h | 10 ++++++++++ | ||
14 | target/arm/helper.c | 14 +++++++++----- | ||
15 | 2 files changed, 19 insertions(+), 5 deletions(-) | ||
16 | |||
17 | diff --git a/target/arm/internals.h b/target/arm/internals.h | ||
18 | index XXXXXXX..XXXXXXX 100644 | ||
19 | --- a/target/arm/internals.h | ||
20 | +++ b/target/arm/internals.h | ||
21 | @@ -XXX,XX +XXX,XX @@ FIELD(V7M_CONTROL, NPRIV, 0, 1) | ||
22 | FIELD(V7M_CONTROL, SPSEL, 1, 1) | ||
23 | FIELD(V7M_CONTROL, FPCA, 2, 1) | ||
24 | |||
25 | +/* Bit definitions for v7M exception return payload */ | ||
26 | +FIELD(V7M_EXCRET, ES, 0, 1) | ||
27 | +FIELD(V7M_EXCRET, RES0, 1, 1) | ||
28 | +FIELD(V7M_EXCRET, SPSEL, 2, 1) | ||
29 | +FIELD(V7M_EXCRET, MODE, 3, 1) | ||
30 | +FIELD(V7M_EXCRET, FTYPE, 4, 1) | ||
31 | +FIELD(V7M_EXCRET, DCRS, 5, 1) | ||
32 | +FIELD(V7M_EXCRET, S, 6, 1) | ||
33 | +FIELD(V7M_EXCRET, RES1, 7, 25) /* including the must-be-1 prefix */ | ||
34 | + | ||
35 | /* | ||
36 | * For AArch64, map a given EL to an index in the banked_spsr array. | ||
37 | * Note that this mapping and the AArch32 mapping defined in bank_number() | ||
38 | diff --git a/target/arm/helper.c b/target/arm/helper.c | ||
39 | index XXXXXXX..XXXXXXX 100644 | ||
40 | --- a/target/arm/helper.c | ||
41 | +++ b/target/arm/helper.c | ||
42 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | ||
43 | " previous exception %d\n", | ||
44 | type, env->v7m.exception); | ||
45 | |||
46 | - if (extract32(type, 5, 23) != extract32(-1, 5, 23)) { | ||
47 | + if ((type & R_V7M_EXCRET_RES1_MASK) != R_V7M_EXCRET_RES1_MASK) { | ||
48 | qemu_log_mask(LOG_GUEST_ERROR, "M profile: zero high bits in exception " | ||
49 | "exit PC value 0x%" PRIx32 " are UNPREDICTABLE\n", type); | ||
50 | } | ||
51 | @@ -XXX,XX +XXX,XX @@ static void do_v7m_exception_exit(ARMCPU *cpu) | ||
52 | * which security state's faultmask to clear. (v8M ARM ARM R_KBNF.) | ||
53 | */ | ||
54 | if (arm_feature(env, ARM_FEATURE_M_SECURITY)) { | ||
55 | - int es = type & 1; | ||
56 | + int es = type & R_V7M_EXCRET_ES_MASK; | ||
57 | if (armv7m_nvic_raw_execution_priority(env->nvic) >= 0) { | ||
58 | env->v7m.faultmask[es] = 0; | ||
59 | } | ||
60 | @@ -XXX,XX +XXX,XX @@ void arm_v7m_cpu_do_interrupt(CPUState *cs) | ||
61 | return; /* Never happens. Keep compiler happy. */ | ||
62 | } | ||
63 | |||
64 | - lr = 0xfffffff1; | ||
65 | + lr = R_V7M_EXCRET_RES1_MASK | | ||
66 | + R_V7M_EXCRET_S_MASK | | ||
67 | + R_V7M_EXCRET_DCRS_MASK | | ||
68 | + R_V7M_EXCRET_FTYPE_MASK | | ||
69 | + R_V7M_EXCRET_ES_MASK; | ||
70 | if (env->v7m.control[env->v7m.secure] & R_V7M_CONTROL_SPSEL_MASK) { | ||
71 | - lr |= 4; | ||
72 | + lr |= R_V7M_EXCRET_SPSEL_MASK; | ||
73 | } | ||
74 | if (!arm_v7m_is_handler_mode(env)) { | ||
75 | - lr |= 8; | ||
76 | + lr |= R_V7M_EXCRET_MODE_MASK; | ||
77 | } | ||
78 | |||
79 | v7m_push_stack(cpu); | ||
80 | -- | ||
81 | 2.7.4 | ||
82 | |||
83 | diff view generated by jsdifflib |
1 | From: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> | 1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> |
---|---|---|---|
2 | 2 | ||
3 | Now we are able to retrieve the gsi from the INTx pin, let's | 3 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
4 | enable intx_to_irq routing. From that point on, irqfd becomes | 4 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> |
5 | usable along with INTx when assigning a PCIe device. | 5 | Message-id: 20190520214342.13709-2-philmd@redhat.com |
6 | |||
7 | Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> | ||
8 | Signed-off-by: Tushar Jagad <tushar.jagad@linaro.org> | ||
9 | Signed-off-by: Eric Auger <eric.auger@redhat.com> | ||
10 | Reviewed-by: Andrew Jones <drjones@redhat.com> | ||
11 | Tested-by: Feng Kan <fkan@apm.com> | ||
12 | Message-id: 1505296004-6798-4-git-send-email-eric.auger@redhat.com | ||
13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
14 | --- | 7 | --- |
15 | hw/pci-host/gpex.c | 12 ++++++++++++ | 8 | hw/arm/exynos4_boards.c | 24 ------------------------ |
16 | 1 file changed, 12 insertions(+) | 9 | 1 file changed, 24 deletions(-) |
17 | 10 | ||
18 | diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c | 11 | diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c |
19 | index XXXXXXX..XXXXXXX 100644 | 12 | index XXXXXXX..XXXXXXX 100644 |
20 | --- a/hw/pci-host/gpex.c | 13 | --- a/hw/arm/exynos4_boards.c |
21 | +++ b/hw/pci-host/gpex.c | 14 | +++ b/hw/arm/exynos4_boards.c |
22 | @@ -XXX,XX +XXX,XX @@ int gpex_set_irq_num(GPEXHost *s, int index, int gsi) | 15 | @@ -XXX,XX +XXX,XX @@ |
23 | return 0; | 16 | #include "hw/net/lan9118.h" |
24 | } | 17 | #include "hw/boards.h" |
25 | 18 | ||
26 | +static PCIINTxRoute gpex_route_intx_pin_to_irq(void *opaque, int pin) | 19 | -#undef DEBUG |
27 | +{ | 20 | - |
28 | + PCIINTxRoute route; | 21 | -//#define DEBUG |
29 | + GPEXHost *s = opaque; | 22 | - |
30 | + | 23 | -#ifdef DEBUG |
31 | + route.mode = PCI_INTX_ENABLED; | 24 | - #undef PRINT_DEBUG |
32 | + route.irq = s->irq_num[pin]; | 25 | - #define PRINT_DEBUG(fmt, args...) \ |
33 | + | 26 | - do { \ |
34 | + return route; | 27 | - fprintf(stderr, " [%s:%d] "fmt, __func__, __LINE__, ##args); \ |
35 | +} | 28 | - } while (0) |
36 | + | 29 | -#else |
37 | static void gpex_host_realize(DeviceState *dev, Error **errp) | 30 | - #define PRINT_DEBUG(fmt, args...) do {} while (0) |
38 | { | 31 | -#endif |
39 | PCIHostState *pci = PCI_HOST_BRIDGE(dev); | 32 | - |
40 | @@ -XXX,XX +XXX,XX @@ static void gpex_host_realize(DeviceState *dev, Error **errp) | 33 | #define SMDK_LAN9118_BASE_ADDR 0x05000000 |
41 | &s->io_ioport, 0, 4, TYPE_PCIE_BUS); | 34 | |
42 | 35 | typedef enum Exynos4BoardType { | |
43 | qdev_set_parent_bus(DEVICE(&s->gpex_root), BUS(pci->bus)); | 36 | @@ -XXX,XX +XXX,XX @@ exynos4_boards_init_common(MachineState *machine, |
44 | + pci_bus_set_route_irq_fn(pci->bus, gpex_route_intx_pin_to_irq); | 37 | exynos4_board_binfo.gic_cpu_if_addr = |
45 | qdev_init_nofail(DEVICE(&s->gpex_root)); | 38 | EXYNOS4210_SMP_PRIVATE_BASE_ADDR + 0x100; |
46 | } | 39 | |
40 | - PRINT_DEBUG("\n ram_size: %luMiB [0x%08lx]\n" | ||
41 | - " kernel_filename: %s\n" | ||
42 | - " kernel_cmdline: %s\n" | ||
43 | - " initrd_filename: %s\n", | ||
44 | - exynos4_board_ram_size[board_type] / 1048576, | ||
45 | - exynos4_board_ram_size[board_type], | ||
46 | - machine->kernel_filename, | ||
47 | - machine->kernel_cmdline, | ||
48 | - machine->initrd_filename); | ||
49 | - | ||
50 | exynos4_boards_init_ram(s, get_system_memory(), | ||
51 | exynos4_board_ram_size[board_type]); | ||
47 | 52 | ||
48 | -- | 53 | -- |
49 | 2.7.4 | 54 | 2.20.1 |
50 | 55 | ||
51 | 56 | diff view generated by jsdifflib |
1 | From: Alistair Francis <alistair.francis@xilinx.com> | 1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> |
---|---|---|---|
2 | 2 | ||
3 | The EP108 is a early access development board. Now that silicon is in | 3 | It eases code review, unit is explicit. |
4 | production people have access to the ZCU102. Let's rename the internal | ||
5 | QEMU files and variables to use the ZCU102. | ||
6 | 4 | ||
7 | There is no functional change here as the EP108 is still a valid board | 5 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
8 | option. | 6 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> |
9 | 7 | Message-id: 20190520214342.13709-3-philmd@redhat.com | |
10 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | ||
11 | Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
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/Makefile.objs | 2 +- | 10 | hw/arm/exynos4_boards.c | 5 +++-- |
15 | hw/arm/{xlnx-ep108.c => xlnx-zcu102.c} | 30 +++++++++++++++--------------- | 11 | 1 file changed, 3 insertions(+), 2 deletions(-) |
16 | 2 files changed, 16 insertions(+), 16 deletions(-) | ||
17 | rename hw/arm/{xlnx-ep108.c => xlnx-zcu102.c} (85%) | ||
18 | 12 | ||
19 | diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs | 13 | diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c |
20 | index XXXXXXX..XXXXXXX 100644 | 14 | index XXXXXXX..XXXXXXX 100644 |
21 | --- a/hw/arm/Makefile.objs | 15 | --- a/hw/arm/exynos4_boards.c |
22 | +++ b/hw/arm/Makefile.objs | 16 | +++ b/hw/arm/exynos4_boards.c |
23 | @@ -XXX,XX +XXX,XX @@ obj-y += omap1.o omap2.o strongarm.o | ||
24 | obj-$(CONFIG_ALLWINNER_A10) += allwinner-a10.o cubieboard.o | ||
25 | obj-$(CONFIG_RASPI) += bcm2835_peripherals.o bcm2836.o raspi.o | ||
26 | obj-$(CONFIG_STM32F205_SOC) += stm32f205_soc.o | ||
27 | -obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp.o xlnx-ep108.o | ||
28 | +obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp.o xlnx-zcu102.o | ||
29 | obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o | ||
30 | obj-$(CONFIG_FSL_IMX31) += fsl-imx31.o kzm.o | ||
31 | obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o sabrelite.o | ||
32 | diff --git a/hw/arm/xlnx-ep108.c b/hw/arm/xlnx-zcu102.c | ||
33 | similarity index 85% | ||
34 | rename from hw/arm/xlnx-ep108.c | ||
35 | rename to hw/arm/xlnx-zcu102.c | ||
36 | index XXXXXXX..XXXXXXX 100644 | ||
37 | --- a/hw/arm/xlnx-ep108.c | ||
38 | +++ b/hw/arm/xlnx-zcu102.c | ||
39 | @@ -XXX,XX +XXX,XX @@ | 17 | @@ -XXX,XX +XXX,XX @@ |
40 | /* | 18 | */ |
41 | - * Xilinx ZynqMP EP108 board | 19 | |
42 | + * Xilinx ZynqMP ZCU102 board | 20 | #include "qemu/osdep.h" |
43 | * | 21 | +#include "qemu/units.h" |
44 | * Copyright (C) 2015 Xilinx Inc | 22 | #include "qapi/error.h" |
45 | * Written by Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 23 | #include "qemu/error-report.h" |
46 | @@ -XXX,XX +XXX,XX @@ | 24 | #include "qemu-common.h" |
47 | #include "exec/address-spaces.h" | 25 | @@ -XXX,XX +XXX,XX @@ static int exynos4_board_smp_bootreg_addr[EXYNOS4_NUM_OF_BOARDS] = { |
48 | #include "qemu/log.h" | 26 | }; |
49 | 27 | ||
50 | -typedef struct XlnxEP108 { | 28 | static unsigned long exynos4_board_ram_size[EXYNOS4_NUM_OF_BOARDS] = { |
51 | +typedef struct XlnxZCU102 { | 29 | - [EXYNOS4_BOARD_NURI] = 0x40000000, |
52 | XlnxZynqMPState soc; | 30 | - [EXYNOS4_BOARD_SMDKC210] = 0x40000000, |
53 | MemoryRegion ddr_ram; | 31 | + [EXYNOS4_BOARD_NURI] = 1 * GiB, |
54 | -} XlnxEP108; | 32 | + [EXYNOS4_BOARD_SMDKC210] = 1 * GiB, |
55 | +} XlnxZCU102; | 33 | }; |
56 | 34 | ||
57 | -static struct arm_boot_info xlnx_ep108_binfo; | 35 | static struct arm_boot_info exynos4_board_binfo = { |
58 | +static struct arm_boot_info xlnx_zcu102_binfo; | ||
59 | |||
60 | -static void xlnx_ep108_init(MachineState *machine) | ||
61 | +static void xlnx_zcu102_init(MachineState *machine) | ||
62 | { | ||
63 | - XlnxEP108 *s = g_new0(XlnxEP108, 1); | ||
64 | + XlnxZCU102 *s = g_new0(XlnxZCU102, 1); | ||
65 | int i; | ||
66 | uint64_t ram_size = machine->ram_size; | ||
67 | |||
68 | @@ -XXX,XX +XXX,XX @@ static void xlnx_ep108_init(MachineState *machine) | ||
69 | } | ||
70 | |||
71 | if (ram_size < 0x08000000) { | ||
72 | - qemu_log("WARNING: RAM size 0x%" PRIx64 " is small for EP108", | ||
73 | + qemu_log("WARNING: RAM size 0x%" PRIx64 " is small for ZCU102", | ||
74 | ram_size); | ||
75 | } | ||
76 | |||
77 | @@ -XXX,XX +XXX,XX @@ static void xlnx_ep108_init(MachineState *machine) | ||
78 | |||
79 | /* TODO create and connect IDE devices for ide_drive_get() */ | ||
80 | |||
81 | - xlnx_ep108_binfo.ram_size = ram_size; | ||
82 | - xlnx_ep108_binfo.kernel_filename = machine->kernel_filename; | ||
83 | - xlnx_ep108_binfo.kernel_cmdline = machine->kernel_cmdline; | ||
84 | - xlnx_ep108_binfo.initrd_filename = machine->initrd_filename; | ||
85 | - xlnx_ep108_binfo.loader_start = 0; | ||
86 | - arm_load_kernel(s->soc.boot_cpu_ptr, &xlnx_ep108_binfo); | ||
87 | + xlnx_zcu102_binfo.ram_size = ram_size; | ||
88 | + xlnx_zcu102_binfo.kernel_filename = machine->kernel_filename; | ||
89 | + xlnx_zcu102_binfo.kernel_cmdline = machine->kernel_cmdline; | ||
90 | + xlnx_zcu102_binfo.initrd_filename = machine->initrd_filename; | ||
91 | + xlnx_zcu102_binfo.loader_start = 0; | ||
92 | + arm_load_kernel(s->soc.boot_cpu_ptr, &xlnx_zcu102_binfo); | ||
93 | } | ||
94 | |||
95 | static void xlnx_ep108_machine_init(MachineClass *mc) | ||
96 | { | ||
97 | mc->desc = "Xilinx ZynqMP EP108 board"; | ||
98 | - mc->init = xlnx_ep108_init; | ||
99 | + mc->init = xlnx_zcu102_init; | ||
100 | mc->block_default_type = IF_IDE; | ||
101 | mc->units_per_default_bus = 1; | ||
102 | mc->ignore_memory_transaction_failures = true; | ||
103 | @@ -XXX,XX +XXX,XX @@ DEFINE_MACHINE("xlnx-ep108", xlnx_ep108_machine_init) | ||
104 | static void xlnx_zcu102_machine_init(MachineClass *mc) | ||
105 | { | ||
106 | mc->desc = "Xilinx ZynqMP ZCU102 board"; | ||
107 | - mc->init = xlnx_ep108_init; | ||
108 | + mc->init = xlnx_zcu102_init; | ||
109 | mc->block_default_type = IF_IDE; | ||
110 | mc->units_per_default_bus = 1; | ||
111 | mc->ignore_memory_transaction_failures = true; | ||
112 | -- | 36 | -- |
113 | 2.7.4 | 37 | 2.20.1 |
114 | 38 | ||
115 | 39 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Alistair Francis <alistair.francis@xilinx.com> | ||
2 | 1 | ||
3 | In preperation for future work let's manually create the Xilnx machines. | ||
4 | This will allow us to set properties for the machines in the future. | ||
5 | |||
6 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | ||
7 | Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
9 | --- | ||
10 | hw/arm/xlnx-zcu102.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++----- | ||
11 | 1 file changed, 67 insertions(+), 7 deletions(-) | ||
12 | |||
13 | diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c | ||
14 | index XXXXXXX..XXXXXXX 100644 | ||
15 | --- a/hw/arm/xlnx-zcu102.c | ||
16 | +++ b/hw/arm/xlnx-zcu102.c | ||
17 | @@ -XXX,XX +XXX,XX @@ | ||
18 | #include "qemu/log.h" | ||
19 | |||
20 | typedef struct XlnxZCU102 { | ||
21 | + MachineState parent_obj; | ||
22 | + | ||
23 | XlnxZynqMPState soc; | ||
24 | MemoryRegion ddr_ram; | ||
25 | } XlnxZCU102; | ||
26 | |||
27 | +#define TYPE_ZCU102_MACHINE MACHINE_TYPE_NAME("xlnx-zcu102") | ||
28 | +#define ZCU102_MACHINE(obj) \ | ||
29 | + OBJECT_CHECK(XlnxZCU102, (obj), TYPE_ZCU102_MACHINE) | ||
30 | + | ||
31 | +#define TYPE_EP108_MACHINE MACHINE_TYPE_NAME("xlnx-ep108") | ||
32 | +#define EP108_MACHINE(obj) \ | ||
33 | + OBJECT_CHECK(XlnxZCU102, (obj), TYPE_EP108_MACHINE) | ||
34 | + | ||
35 | static struct arm_boot_info xlnx_zcu102_binfo; | ||
36 | |||
37 | -static void xlnx_zcu102_init(MachineState *machine) | ||
38 | +static void xlnx_zynqmp_init(XlnxZCU102 *s, MachineState *machine) | ||
39 | { | ||
40 | - XlnxZCU102 *s = g_new0(XlnxZCU102, 1); | ||
41 | int i; | ||
42 | uint64_t ram_size = machine->ram_size; | ||
43 | |||
44 | @@ -XXX,XX +XXX,XX @@ static void xlnx_zcu102_init(MachineState *machine) | ||
45 | arm_load_kernel(s->soc.boot_cpu_ptr, &xlnx_zcu102_binfo); | ||
46 | } | ||
47 | |||
48 | -static void xlnx_ep108_machine_init(MachineClass *mc) | ||
49 | +static void xlnx_ep108_init(MachineState *machine) | ||
50 | +{ | ||
51 | + XlnxZCU102 *s = EP108_MACHINE(machine); | ||
52 | + | ||
53 | + xlnx_zynqmp_init(s, machine); | ||
54 | +} | ||
55 | + | ||
56 | +static void xlnx_ep108_machine_instance_init(Object *obj) | ||
57 | { | ||
58 | +} | ||
59 | + | ||
60 | +static void xlnx_ep108_machine_class_init(ObjectClass *oc, void *data) | ||
61 | +{ | ||
62 | + MachineClass *mc = MACHINE_CLASS(oc); | ||
63 | + | ||
64 | mc->desc = "Xilinx ZynqMP EP108 board"; | ||
65 | - mc->init = xlnx_zcu102_init; | ||
66 | + mc->init = xlnx_ep108_init; | ||
67 | mc->block_default_type = IF_IDE; | ||
68 | mc->units_per_default_bus = 1; | ||
69 | mc->ignore_memory_transaction_failures = true; | ||
70 | } | ||
71 | |||
72 | -DEFINE_MACHINE("xlnx-ep108", xlnx_ep108_machine_init) | ||
73 | +static const TypeInfo xlnx_ep108_machine_init_typeinfo = { | ||
74 | + .name = MACHINE_TYPE_NAME("xlnx-ep108"), | ||
75 | + .parent = TYPE_MACHINE, | ||
76 | + .class_init = xlnx_ep108_machine_class_init, | ||
77 | + .instance_init = xlnx_ep108_machine_instance_init, | ||
78 | + .instance_size = sizeof(XlnxZCU102), | ||
79 | +}; | ||
80 | |||
81 | -static void xlnx_zcu102_machine_init(MachineClass *mc) | ||
82 | +static void xlnx_ep108_machine_init_register_types(void) | ||
83 | { | ||
84 | + type_register_static(&xlnx_ep108_machine_init_typeinfo); | ||
85 | +} | ||
86 | + | ||
87 | +static void xlnx_zcu102_init(MachineState *machine) | ||
88 | +{ | ||
89 | + XlnxZCU102 *s = ZCU102_MACHINE(machine); | ||
90 | + | ||
91 | + xlnx_zynqmp_init(s, machine); | ||
92 | +} | ||
93 | + | ||
94 | +static void xlnx_zcu102_machine_instance_init(Object *obj) | ||
95 | +{ | ||
96 | +} | ||
97 | + | ||
98 | +static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data) | ||
99 | +{ | ||
100 | + MachineClass *mc = MACHINE_CLASS(oc); | ||
101 | + | ||
102 | mc->desc = "Xilinx ZynqMP ZCU102 board"; | ||
103 | mc->init = xlnx_zcu102_init; | ||
104 | mc->block_default_type = IF_IDE; | ||
105 | @@ -XXX,XX +XXX,XX @@ static void xlnx_zcu102_machine_init(MachineClass *mc) | ||
106 | mc->ignore_memory_transaction_failures = true; | ||
107 | } | ||
108 | |||
109 | -DEFINE_MACHINE("xlnx-zcu102", xlnx_zcu102_machine_init) | ||
110 | +static const TypeInfo xlnx_zcu102_machine_init_typeinfo = { | ||
111 | + .name = MACHINE_TYPE_NAME("xlnx-zcu102"), | ||
112 | + .parent = TYPE_MACHINE, | ||
113 | + .class_init = xlnx_zcu102_machine_class_init, | ||
114 | + .instance_init = xlnx_zcu102_machine_instance_init, | ||
115 | + .instance_size = sizeof(XlnxZCU102), | ||
116 | +}; | ||
117 | + | ||
118 | +static void xlnx_zcu102_machine_init_register_types(void) | ||
119 | +{ | ||
120 | + type_register_static(&xlnx_zcu102_machine_init_typeinfo); | ||
121 | +} | ||
122 | + | ||
123 | +type_init(xlnx_zcu102_machine_init_register_types) | ||
124 | +type_init(xlnx_ep108_machine_init_register_types) | ||
125 | -- | ||
126 | 2.7.4 | ||
127 | |||
128 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Alistair Francis <alistair.francis@xilinx.com> | ||
2 | 1 | ||
3 | Add a machine level secure property. This defaults to false and can be | ||
4 | set to true using this machine command line argument: | ||
5 | -machine xlnx-zcu102,secure=on | ||
6 | |||
7 | This follows what the ARM virt machine does. | ||
8 | |||
9 | This property only applies to the ZCU102 machine. The EP108 machine does | ||
10 | not have this property. | ||
11 | |||
12 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | ||
13 | Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
14 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
15 | --- | ||
16 | hw/arm/xlnx-zcu102.c | 32 ++++++++++++++++++++++++++++++++ | ||
17 | 1 file changed, 32 insertions(+) | ||
18 | |||
19 | diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c | ||
20 | index XXXXXXX..XXXXXXX 100644 | ||
21 | --- a/hw/arm/xlnx-zcu102.c | ||
22 | +++ b/hw/arm/xlnx-zcu102.c | ||
23 | @@ -XXX,XX +XXX,XX @@ typedef struct XlnxZCU102 { | ||
24 | |||
25 | XlnxZynqMPState soc; | ||
26 | MemoryRegion ddr_ram; | ||
27 | + | ||
28 | + bool secure; | ||
29 | } XlnxZCU102; | ||
30 | |||
31 | #define TYPE_ZCU102_MACHINE MACHINE_TYPE_NAME("xlnx-zcu102") | ||
32 | @@ -XXX,XX +XXX,XX @@ typedef struct XlnxZCU102 { | ||
33 | |||
34 | static struct arm_boot_info xlnx_zcu102_binfo; | ||
35 | |||
36 | +static bool zcu102_get_secure(Object *obj, Error **errp) | ||
37 | +{ | ||
38 | + XlnxZCU102 *s = ZCU102_MACHINE(obj); | ||
39 | + | ||
40 | + return s->secure; | ||
41 | +} | ||
42 | + | ||
43 | +static void zcu102_set_secure(Object *obj, bool value, Error **errp) | ||
44 | +{ | ||
45 | + XlnxZCU102 *s = ZCU102_MACHINE(obj); | ||
46 | + | ||
47 | + s->secure = value; | ||
48 | +} | ||
49 | + | ||
50 | static void xlnx_zynqmp_init(XlnxZCU102 *s, MachineState *machine) | ||
51 | { | ||
52 | int i; | ||
53 | @@ -XXX,XX +XXX,XX @@ static void xlnx_zynqmp_init(XlnxZCU102 *s, MachineState *machine) | ||
54 | |||
55 | object_property_set_link(OBJECT(&s->soc), OBJECT(&s->ddr_ram), | ||
56 | "ddr-ram", &error_abort); | ||
57 | + object_property_set_bool(OBJECT(&s->soc), s->secure, "secure", | ||
58 | + &error_fatal); | ||
59 | |||
60 | object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_fatal); | ||
61 | |||
62 | @@ -XXX,XX +XXX,XX @@ static void xlnx_ep108_init(MachineState *machine) | ||
63 | |||
64 | static void xlnx_ep108_machine_instance_init(Object *obj) | ||
65 | { | ||
66 | + XlnxZCU102 *s = EP108_MACHINE(obj); | ||
67 | + | ||
68 | + /* EP108, we don't support setting secure */ | ||
69 | + s->secure = false; | ||
70 | } | ||
71 | |||
72 | static void xlnx_ep108_machine_class_init(ObjectClass *oc, void *data) | ||
73 | @@ -XXX,XX +XXX,XX @@ static void xlnx_zcu102_init(MachineState *machine) | ||
74 | |||
75 | static void xlnx_zcu102_machine_instance_init(Object *obj) | ||
76 | { | ||
77 | + XlnxZCU102 *s = ZCU102_MACHINE(obj); | ||
78 | + | ||
79 | + /* Default to secure mode being disabled */ | ||
80 | + s->secure = false; | ||
81 | + object_property_add_bool(obj, "secure", zcu102_get_secure, | ||
82 | + zcu102_set_secure, NULL); | ||
83 | + object_property_set_description(obj, "secure", | ||
84 | + "Set on/off to enable/disable the ARM " | ||
85 | + "Security Extensions (TrustZone)", | ||
86 | + NULL); | ||
87 | } | ||
88 | |||
89 | static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data) | ||
90 | -- | ||
91 | 2.7.4 | ||
92 | |||
93 | diff view generated by jsdifflib |
1 | From: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> | 1 | From: Guenter Roeck <linux@roeck-us.net> |
---|---|---|---|
2 | 2 | ||
3 | To implement INTx to gsi routing we need to pass the gpex host | 3 | QEMU already supports pl330. Instantiate it for Exynos4210. |
4 | bridge the gsi associated to each INTx index. Let's introduce | ||
5 | irq_num array and gpex_set_irq_num setter function. | ||
6 | 4 | ||
7 | Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> | 5 | Relevant part of Linux arch/arm/boot/dts/exynos4.dtsi: |
8 | Signed-off-by: Tushar Jagad <tushar.jagad@linaro.org> | 6 | |
9 | Signed-off-by: Eric Auger <eric.auger@redhat.com> | 7 | / { |
10 | Tested-by: Feng Kan <fkan@apm.com> | 8 | soc: soc { |
11 | Reviewed-by: Andrew Jones <drjones@redhat.com> | 9 | amba { |
12 | Message-id: 1505296004-6798-2-git-send-email-eric.auger@redhat.com | 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> | ||
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 | include/hw/pci-host/gpex.h | 3 +++ | 56 | hw/arm/exynos4210.c | 26 ++++++++++++++++++++++++++ |
16 | hw/pci-host/gpex.c | 10 ++++++++++ | 57 | 1 file changed, 26 insertions(+) |
17 | 2 files changed, 13 insertions(+) | ||
18 | 58 | ||
19 | diff --git a/include/hw/pci-host/gpex.h b/include/hw/pci-host/gpex.h | 59 | diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c |
20 | index XXXXXXX..XXXXXXX 100644 | 60 | index XXXXXXX..XXXXXXX 100644 |
21 | --- a/include/hw/pci-host/gpex.h | 61 | --- a/hw/arm/exynos4210.c |
22 | +++ b/include/hw/pci-host/gpex.h | 62 | +++ b/hw/arm/exynos4210.c |
23 | @@ -XXX,XX +XXX,XX @@ typedef struct GPEXHost { | 63 | @@ -XXX,XX +XXX,XX @@ |
24 | MemoryRegion io_ioport; | 64 | /* EHCI */ |
25 | MemoryRegion io_mmio; | 65 | #define EXYNOS4210_EHCI_BASE_ADDR 0x12580000 |
26 | qemu_irq irq[GPEX_NUM_IRQS]; | 66 | |
27 | + int irq_num[GPEX_NUM_IRQS]; | 67 | +/* DMA */ |
28 | } GPEXHost; | 68 | +#define EXYNOS4210_PL330_BASE0_ADDR 0x12680000 |
29 | 69 | +#define EXYNOS4210_PL330_BASE1_ADDR 0x12690000 | |
30 | +int gpex_set_irq_num(GPEXHost *s, int index, int gsi); | 70 | +#define EXYNOS4210_PL330_BASE2_ADDR 0x12850000 |
31 | + | 71 | + |
32 | #endif /* HW_GPEX_H */ | 72 | static uint8_t chipid_and_omr[] = { 0x11, 0x02, 0x21, 0x43, |
33 | diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c | 73 | 0x09, 0x00, 0x00, 0x00 }; |
34 | index XXXXXXX..XXXXXXX 100644 | 74 | |
35 | --- a/hw/pci-host/gpex.c | 75 | @@ -XXX,XX +XXX,XX @@ static uint64_t exynos4210_calc_affinity(int cpu) |
36 | +++ b/hw/pci-host/gpex.c | 76 | return (0x9 << ARM_AFF1_SHIFT) | cpu; |
37 | @@ -XXX,XX +XXX,XX @@ static void gpex_set_irq(void *opaque, int irq_num, int level) | ||
38 | qemu_set_irq(s->irq[irq_num], level); | ||
39 | } | 77 | } |
40 | 78 | ||
41 | +int gpex_set_irq_num(GPEXHost *s, int index, int gsi) | 79 | +static void pl330_create(uint32_t base, qemu_irq irq, int nreq) |
42 | +{ | 80 | +{ |
43 | + if (index >= GPEX_NUM_IRQS) { | 81 | + SysBusDevice *busdev; |
44 | + return -EINVAL; | 82 | + DeviceState *dev; |
45 | + } | ||
46 | + | 83 | + |
47 | + s->irq_num[index] = gsi; | 84 | + dev = qdev_create(NULL, "pl330"); |
48 | + return 0; | 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); | ||
49 | +} | 90 | +} |
50 | + | 91 | + |
51 | static void gpex_host_realize(DeviceState *dev, Error **errp) | 92 | Exynos4210State *exynos4210_init(MemoryRegion *system_mem) |
52 | { | 93 | { |
53 | PCIHostState *pci = PCI_HOST_BRIDGE(dev); | 94 | Exynos4210State *s = g_new0(Exynos4210State, 1); |
95 | @@ -XXX,XX +XXX,XX @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem) | ||
96 | sysbus_create_simple(TYPE_EXYNOS4210_EHCI, EXYNOS4210_EHCI_BASE_ADDR, | ||
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; | ||
108 | } | ||
54 | -- | 109 | -- |
55 | 2.7.4 | 110 | 2.20.1 |
56 | 111 | ||
57 | 112 | diff view generated by jsdifflib |
1 | From: Alistair Francis <alistair.francis@xilinx.com> | 1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> |
---|---|---|---|
2 | 2 | ||
3 | Add a machine level virtualization property. This defaults to false and can be | 3 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
4 | set to true using this machine command line argument: | 4 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> |
5 | -machine xlnx-zcu102,virtualization=on | 5 | Message-id: 20190520214342.13709-5-philmd@redhat.com |
6 | |||
7 | This follows what the ARM virt machine does. | ||
8 | |||
9 | This property only applies to the ZCU102 machine. The EP108 machine does | ||
10 | not have this property. | ||
11 | |||
12 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | ||
13 | Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
14 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
15 | --- | 7 | --- |
16 | include/hw/arm/xlnx-zynqmp.h | 2 ++ | 8 | include/hw/arm/exynos4210.h | 9 +++++++-- |
17 | hw/arm/xlnx-zcu102.c | 30 +++++++++++++++++++++++++++++- | 9 | hw/arm/exynos4210.c | 28 ++++++++++++++++++++++++---- |
18 | hw/arm/xlnx-zynqmp.c | 3 ++- | 10 | hw/arm/exynos4_boards.c | 9 ++++++--- |
19 | 3 files changed, 33 insertions(+), 2 deletions(-) | 11 | 3 files changed, 37 insertions(+), 9 deletions(-) |
20 | 12 | ||
21 | diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h | 13 | diff --git a/include/hw/arm/exynos4210.h b/include/hw/arm/exynos4210.h |
22 | index XXXXXXX..XXXXXXX 100644 | 14 | index XXXXXXX..XXXXXXX 100644 |
23 | --- a/include/hw/arm/xlnx-zynqmp.h | 15 | --- a/include/hw/arm/exynos4210.h |
24 | +++ b/include/hw/arm/xlnx-zynqmp.h | 16 | +++ b/include/hw/arm/exynos4210.h |
25 | @@ -XXX,XX +XXX,XX @@ typedef struct XlnxZynqMPState { | 17 | @@ -XXX,XX +XXX,XX @@ typedef struct Exynos4210Irq { |
26 | 18 | } Exynos4210Irq; | |
27 | /* Has the ARM Security extensions? */ | 19 | |
28 | bool secure; | 20 | typedef struct Exynos4210State { |
29 | + /* Has the ARM Virtualization extensions? */ | 21 | + /*< private >*/ |
30 | + bool virt; | 22 | + SysBusDevice parent_obj; |
31 | /* Has the RPU subsystem? */ | 23 | + /*< public >*/ |
32 | bool has_rpu; | 24 | ARMCPU *cpu[EXYNOS4210_NCPUS]; |
33 | } XlnxZynqMPState; | 25 | Exynos4210Irq irqs; |
34 | diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c | 26 | qemu_irq *irq_table; |
27 | @@ -XXX,XX +XXX,XX @@ typedef struct Exynos4210State { | ||
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 | ||
35 | index XXXXXXX..XXXXXXX 100644 | 44 | index XXXXXXX..XXXXXXX 100644 |
36 | --- a/hw/arm/xlnx-zcu102.c | 45 | --- a/hw/arm/exynos4210.c |
37 | +++ b/hw/arm/xlnx-zcu102.c | 46 | +++ b/hw/arm/exynos4210.c |
38 | @@ -XXX,XX +XXX,XX @@ typedef struct XlnxZCU102 { | 47 | @@ -XXX,XX +XXX,XX @@ static void pl330_create(uint32_t base, qemu_irq irq, int nreq) |
39 | MemoryRegion ddr_ram; | 48 | sysbus_connect_irq(busdev, 0, irq); |
40 | |||
41 | bool secure; | ||
42 | + bool virt; | ||
43 | } XlnxZCU102; | ||
44 | |||
45 | #define TYPE_ZCU102_MACHINE MACHINE_TYPE_NAME("xlnx-zcu102") | ||
46 | @@ -XXX,XX +XXX,XX @@ static void zcu102_set_secure(Object *obj, bool value, Error **errp) | ||
47 | s->secure = value; | ||
48 | } | 49 | } |
49 | 50 | ||
50 | +static bool zcu102_get_virt(Object *obj, Error **errp) | 51 | -Exynos4210State *exynos4210_init(MemoryRegion *system_mem) |
52 | +static void exynos4210_realize(DeviceState *socdev, Error **errp) | ||
53 | { | ||
54 | - Exynos4210State *s = g_new0(Exynos4210State, 1); | ||
55 | + Exynos4210State *s = EXYNOS4210_SOC(socdev); | ||
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) | ||
51 | +{ | 69 | +{ |
52 | + XlnxZCU102 *s = ZCU102_MACHINE(obj); | 70 | + DeviceClass *dc = DEVICE_CLASS(klass); |
53 | + | 71 | + |
54 | + return s->virt; | 72 | + dc->realize = exynos4210_realize; |
55 | +} | 73 | +} |
56 | + | 74 | + |
57 | +static void zcu102_set_virt(Object *obj, bool value, Error **errp) | 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) | ||
58 | +{ | 83 | +{ |
59 | + XlnxZCU102 *s = ZCU102_MACHINE(obj); | 84 | + type_register_static(&exynos4210_info); |
60 | + | ||
61 | + s->virt = value; | ||
62 | +} | 85 | +} |
63 | + | 86 | + |
64 | static void xlnx_zynqmp_init(XlnxZCU102 *s, MachineState *machine) | 87 | +type_init(exynos4210_register_types) |
65 | { | 88 | diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c |
66 | int i; | 89 | index XXXXXXX..XXXXXXX 100644 |
67 | @@ -XXX,XX +XXX,XX @@ static void xlnx_zynqmp_init(XlnxZCU102 *s, MachineState *machine) | 90 | --- a/hw/arm/exynos4_boards.c |
68 | "ddr-ram", &error_abort); | 91 | +++ b/hw/arm/exynos4_boards.c |
69 | object_property_set_bool(OBJECT(&s->soc), s->secure, "secure", | 92 | @@ -XXX,XX +XXX,XX @@ typedef enum Exynos4BoardType { |
70 | &error_fatal); | 93 | } Exynos4BoardType; |
71 | + object_property_set_bool(OBJECT(&s->soc), s->virt, "virtualization", | 94 | |
95 | typedef struct Exynos4BoardState { | ||
96 | - Exynos4210State *soc; | ||
97 | + Exynos4210State soc; | ||
98 | MemoryRegion dram0_mem; | ||
99 | MemoryRegion dram1_mem; | ||
100 | } Exynos4BoardState; | ||
101 | @@ -XXX,XX +XXX,XX @@ exynos4_boards_init_common(MachineState *machine, | ||
102 | exynos4_boards_init_ram(s, get_system_memory(), | ||
103 | exynos4_board_ram_size[board_type]); | ||
104 | |||
105 | - s->soc = exynos4210_init(get_system_memory()); | ||
106 | + object_initialize(&s->soc, sizeof(s->soc), TYPE_EXYNOS4210_SOC); | ||
107 | + qdev_set_parent_bus(DEVICE(&s->soc), sysbus_get_default()); | ||
108 | + object_property_set_bool(OBJECT(&s->soc), true, "realized", | ||
72 | + &error_fatal); | 109 | + &error_fatal); |
73 | 110 | ||
74 | object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_fatal); | 111 | return s; |
75 | |||
76 | @@ -XXX,XX +XXX,XX @@ static void xlnx_ep108_machine_instance_init(Object *obj) | ||
77 | { | ||
78 | XlnxZCU102 *s = EP108_MACHINE(obj); | ||
79 | |||
80 | - /* EP108, we don't support setting secure */ | ||
81 | + /* EP108, we don't support setting secure or virt */ | ||
82 | s->secure = false; | ||
83 | + s->virt = false; | ||
84 | } | 112 | } |
85 | 113 | @@ -XXX,XX +XXX,XX @@ static void smdkc210_init(MachineState *machine) | |
86 | static void xlnx_ep108_machine_class_init(ObjectClass *oc, void *data) | 114 | EXYNOS4_BOARD_SMDKC210); |
87 | @@ -XXX,XX +XXX,XX @@ static void xlnx_zcu102_machine_instance_init(Object *obj) | 115 | |
88 | "Set on/off to enable/disable the ARM " | 116 | lan9215_init(SMDK_LAN9118_BASE_ADDR, |
89 | "Security Extensions (TrustZone)", | 117 | - qemu_irq_invert(s->soc->irq_table[exynos4210_get_irq(37, 1)])); |
90 | NULL); | 118 | + qemu_irq_invert(s->soc.irq_table[exynos4210_get_irq(37, 1)])); |
91 | + | 119 | arm_load_kernel(ARM_CPU(first_cpu), &exynos4_board_binfo); |
92 | + /* Default to virt (EL2) being disabled */ | ||
93 | + s->virt = false; | ||
94 | + object_property_add_bool(obj, "virtualization", zcu102_get_virt, | ||
95 | + zcu102_set_virt, NULL); | ||
96 | + object_property_set_description(obj, "virtualization", | ||
97 | + "Set on/off to enable/disable emulating a " | ||
98 | + "guest CPU which implements the ARM " | ||
99 | + "Virtualization Extensions", | ||
100 | + NULL); | ||
101 | } | 120 | } |
102 | 121 | ||
103 | static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data) | ||
104 | diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c | ||
105 | index XXXXXXX..XXXXXXX 100644 | ||
106 | --- a/hw/arm/xlnx-zynqmp.c | ||
107 | +++ b/hw/arm/xlnx-zynqmp.c | ||
108 | @@ -XXX,XX +XXX,XX @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) | ||
109 | object_property_set_bool(OBJECT(&s->apu_cpu[i]), | ||
110 | s->secure, "has_el3", NULL); | ||
111 | object_property_set_bool(OBJECT(&s->apu_cpu[i]), | ||
112 | - false, "has_el2", NULL); | ||
113 | + s->virt, "has_el2", NULL); | ||
114 | object_property_set_int(OBJECT(&s->apu_cpu[i]), GIC_BASE_ADDR, | ||
115 | "reset-cbar", &error_abort); | ||
116 | object_property_set_bool(OBJECT(&s->apu_cpu[i]), true, "realized", | ||
117 | @@ -XXX,XX +XXX,XX @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) | ||
118 | static Property xlnx_zynqmp_props[] = { | ||
119 | DEFINE_PROP_STRING("boot-cpu", XlnxZynqMPState, boot_cpu), | ||
120 | DEFINE_PROP_BOOL("secure", XlnxZynqMPState, secure, false), | ||
121 | + DEFINE_PROP_BOOL("virtualization", XlnxZynqMPState, virt, false), | ||
122 | DEFINE_PROP_BOOL("has_rpu", XlnxZynqMPState, has_rpu, false), | ||
123 | DEFINE_PROP_LINK("ddr-ram", XlnxZynqMPState, ddr_ram, TYPE_MEMORY_REGION, | ||
124 | MemoryRegion *), | ||
125 | -- | 122 | -- |
126 | 2.7.4 | 123 | 2.20.1 |
127 | 124 | ||
128 | 125 | diff view generated by jsdifflib |