1 | Not very much here, but several people have fallen over | 1 | Just a collection of bug fixes this time around... |
---|---|---|---|
2 | the vector operation segfault bug, so let's get the fix | ||
3 | into master. | ||
4 | 2 | ||
5 | thanks | 3 | thanks |
6 | -- PMM | 4 | -- PMM |
7 | 5 | ||
8 | The following changes since commit d418238dca7b4e0b124135827ead3076233052b1: | 6 | The following changes since commit 2a6ae69154542caa91dd17c40fd3f5ffbec300de: |
9 | 7 | ||
10 | Merge remote-tracking branch 'remotes/rth/tags/pull-rng-20190522' into staging (2019-05-23 12:57:17 +0100) | 8 | Merge tag 'pull-maintainer-ominbus-030723-1' of https://gitlab.com/stsquad/qemu into staging (2023-07-04 08:36:44 +0200) |
11 | 9 | ||
12 | are available in the Git repository at: | 10 | are available in the Git repository at: |
13 | 11 | ||
14 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20190523 | 12 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230704 |
15 | 13 | ||
16 | for you to fetch changes up to 98e4f4fdb8ea05d840f51f47125924c2bb9df2df: | 14 | for you to fetch changes up to 86a78272f094857b4eda79d721c116e93942aa9a: |
17 | 15 | ||
18 | hw/arm/exynos4210: QOM'ify the Exynos4210 SoC (2019-05-23 14:47:44 +0100) | 16 | target/xtensa: Assert that interrupt level is within bounds (2023-07-04 14:27:08 +0100) |
19 | 17 | ||
20 | ---------------------------------------------------------------- | 18 | ---------------------------------------------------------------- |
21 | target-arm queue: | 19 | target-arm queue: |
22 | * exynos4210: QOM'ify the Exynos4210 SoC | 20 | * Add raw_writes ops for register whose write induce TLB maintenance |
23 | * exynos4210: Add DMA support for the Exynos4210 | 21 | * hw/arm/sbsa-ref: use XHCI to replace EHCI |
24 | * arm_gicv3: Fix writes to ICC_CTLR_EL3 | 22 | * Avoid splitting Zregs across lines in dump |
25 | * arm_gicv3: Fix write of ICH_VMCR_EL2.{VBPR0, VBPR1} | 23 | * Dump ZA[] when active |
26 | * target/arm: Fix vector operation segfault | 24 | * Fix SME full tile indexing |
27 | * target/arm: Minor improvements to BFXIL, EXTR | 25 | * Handle IC IVAU to improve compatibility with JITs |
26 | * xlnx-canfd-test: Fix code coverity issues | ||
27 | * gdbstub: Guard M-profile code with CONFIG_TCG | ||
28 | * allwinner-sramc: Set class_size | ||
29 | * target/xtensa: Assert that interrupt level is within bounds | ||
28 | 30 | ||
29 | ---------------------------------------------------------------- | 31 | ---------------------------------------------------------------- |
30 | Alistair Francis (1): | 32 | Akihiko Odaki (1): |
31 | target/arm: Fix vector operation segfault | 33 | hw: arm: allwinner-sramc: Set class_size |
32 | 34 | ||
33 | Guenter Roeck (1): | 35 | Eric Auger (1): |
34 | hw/arm/exynos4210: Add DMA support for the Exynos4210 | 36 | target/arm: Add raw_writes ops for register whose write induce TLB maintenance |
35 | 37 | ||
36 | Peter Maydell (5): | 38 | Fabiano Rosas (1): |
37 | arm: Move system_clock_scale to armv7m_systick.h | 39 | target/arm: gdbstub: Guard M-profile code with CONFIG_TCG |
38 | arm: Remove unnecessary includes of hw/arm/arm.h | ||
39 | arm: Rename hw/arm/arm.h to hw/arm/boot.h | ||
40 | hw/intc/arm_gicv3: Fix write of ICH_VMCR_EL2.{VBPR0, VBPR1} | ||
41 | hw/intc/arm_gicv3: Fix writes to ICC_CTLR_EL3 | ||
42 | 40 | ||
43 | Philippe Mathieu-Daudé (3): | 41 | John Högberg (2): |
44 | hw/arm/exynos4: Remove unuseful debug code | 42 | target/arm: Handle IC IVAU to improve compatibility with JITs |
45 | hw/arm/exynos4: Use the IEC binary prefix definitions | 43 | tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code |
46 | hw/arm/exynos4210: QOM'ify the Exynos4210 SoC | ||
47 | 44 | ||
48 | Richard Henderson (2): | 45 | Peter Maydell (1): |
49 | target/arm: Use extract2 for EXTR | 46 | target/xtensa: Assert that interrupt level is within bounds |
50 | target/arm: Simplify BFXIL expansion | ||
51 | 47 | ||
52 | include/hw/arm/allwinner-a10.h | 2 +- | 48 | Richard Henderson (3): |
53 | include/hw/arm/aspeed_soc.h | 1 - | 49 | target/arm: Avoid splitting Zregs across lines in dump |
54 | include/hw/arm/bcm2836.h | 1 - | 50 | target/arm: Dump ZA[] when active |
55 | include/hw/arm/{arm.h => boot.h} | 12 +++------ | 51 | target/arm: Fix SME full tile indexing |
56 | include/hw/arm/exynos4210.h | 9 +++++-- | ||
57 | include/hw/arm/fsl-imx25.h | 2 +- | ||
58 | include/hw/arm/fsl-imx31.h | 2 +- | ||
59 | include/hw/arm/fsl-imx6.h | 2 +- | ||
60 | include/hw/arm/fsl-imx6ul.h | 2 +- | ||
61 | include/hw/arm/fsl-imx7.h | 2 +- | ||
62 | include/hw/arm/virt.h | 2 +- | ||
63 | include/hw/arm/xlnx-versal.h | 2 +- | ||
64 | include/hw/arm/xlnx-zynqmp.h | 2 +- | ||
65 | include/hw/timer/armv7m_systick.h | 22 ++++++++++++++++ | ||
66 | hw/arm/armsse.c | 2 +- | ||
67 | hw/arm/armv7m.c | 2 +- | ||
68 | hw/arm/aspeed.c | 2 +- | ||
69 | hw/arm/boot.c | 2 +- | ||
70 | hw/arm/collie.c | 2 +- | ||
71 | hw/arm/exynos4210.c | 54 ++++++++++++++++++++++++++++++++++++--- | ||
72 | hw/arm/exynos4_boards.c | 40 ++++++++--------------------- | ||
73 | hw/arm/highbank.c | 2 +- | ||
74 | hw/arm/integratorcp.c | 2 +- | ||
75 | hw/arm/mainstone.c | 2 +- | ||
76 | hw/arm/microbit.c | 2 +- | ||
77 | hw/arm/mps2-tz.c | 2 +- | ||
78 | hw/arm/mps2.c | 2 +- | ||
79 | hw/arm/msf2-soc.c | 1 - | ||
80 | hw/arm/msf2-som.c | 2 +- | ||
81 | hw/arm/musca.c | 2 +- | ||
82 | hw/arm/musicpal.c | 2 +- | ||
83 | hw/arm/netduino2.c | 2 +- | ||
84 | hw/arm/nrf51_soc.c | 2 +- | ||
85 | hw/arm/nseries.c | 2 +- | ||
86 | hw/arm/omap1.c | 2 +- | ||
87 | hw/arm/omap2.c | 2 +- | ||
88 | hw/arm/omap_sx1.c | 2 +- | ||
89 | hw/arm/palm.c | 2 +- | ||
90 | hw/arm/raspi.c | 2 +- | ||
91 | hw/arm/realview.c | 2 +- | ||
92 | hw/arm/spitz.c | 2 +- | ||
93 | hw/arm/stellaris.c | 2 +- | ||
94 | hw/arm/stm32f205_soc.c | 2 +- | ||
95 | hw/arm/strongarm.c | 2 +- | ||
96 | hw/arm/tosa.c | 2 +- | ||
97 | hw/arm/versatilepb.c | 2 +- | ||
98 | hw/arm/vexpress.c | 2 +- | ||
99 | hw/arm/virt.c | 2 +- | ||
100 | hw/arm/xilinx_zynq.c | 2 +- | ||
101 | hw/arm/xlnx-versal.c | 2 +- | ||
102 | hw/arm/z2.c | 2 +- | ||
103 | hw/intc/arm_gicv3_cpuif.c | 6 ++--- | ||
104 | hw/intc/armv7m_nvic.c | 1 - | ||
105 | target/arm/arm-semi.c | 1 - | ||
106 | target/arm/cpu.c | 1 - | ||
107 | target/arm/cpu64.c | 1 - | ||
108 | target/arm/kvm.c | 1 - | ||
109 | target/arm/kvm32.c | 1 - | ||
110 | target/arm/kvm64.c | 1 - | ||
111 | target/arm/translate-a64.c | 44 ++++++++++++++++--------------- | ||
112 | target/arm/translate.c | 4 +-- | ||
113 | 61 files changed, 164 insertions(+), 123 deletions(-) | ||
114 | rename include/hw/arm/{arm.h => boot.h} (96%) | ||
115 | 52 | ||
53 | Vikram Garhwal (1): | ||
54 | tests/qtest: xlnx-canfd-test: Fix code coverity issues | ||
55 | |||
56 | Yuquan Wang (1): | ||
57 | hw/arm/sbsa-ref: use XHCI to replace EHCI | ||
58 | |||
59 | docs/system/arm/sbsa.rst | 5 +- | ||
60 | hw/arm/sbsa-ref.c | 23 +++-- | ||
61 | hw/misc/allwinner-sramc.c | 1 + | ||
62 | target/arm/cpu.c | 65 ++++++++----- | ||
63 | target/arm/gdbstub.c | 4 + | ||
64 | target/arm/helper.c | 70 +++++++++++--- | ||
65 | target/arm/tcg/translate-sme.c | 24 +++-- | ||
66 | target/xtensa/exc_helper.c | 3 + | ||
67 | tests/qtest/xlnx-canfd-test.c | 33 +++---- | ||
68 | tests/tcg/aarch64/icivau.c | 189 ++++++++++++++++++++++++++++++++++++++ | ||
69 | tests/tcg/aarch64/sme-outprod1.c | 83 +++++++++++++++++ | ||
70 | hw/arm/Kconfig | 2 +- | ||
71 | tests/tcg/aarch64/Makefile.target | 13 ++- | ||
72 | 13 files changed, 436 insertions(+), 79 deletions(-) | ||
73 | create mode 100644 tests/tcg/aarch64/icivau.c | ||
74 | create mode 100644 tests/tcg/aarch64/sme-outprod1.c | ||
75 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | 1 | From: Eric Auger <eric.auger@redhat.com> |
---|---|---|---|
2 | 2 | ||
3 | It eases code review, unit is explicit. | 3 | Some registers whose 'cooked' writefns induce TLB maintenance do |
4 | not have raw_writefn ops defined. If only the writefn ops is set | ||
5 | (ie. no raw_writefn is provided), it is assumed the cooked also | ||
6 | work as the raw one. For those registers it is not obvious the | ||
7 | tlb_flush works on KVM mode so better/safer setting the raw write. | ||
4 | 8 | ||
5 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 9 | Signed-off-by: Eric Auger <eric.auger@redhat.com> |
6 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 10 | Suggested-by: Peter Maydell <peter.maydell@linaro.org> |
7 | Message-id: 20190520214342.13709-3-philmd@redhat.com | 11 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
9 | --- | 13 | --- |
10 | hw/arm/exynos4_boards.c | 5 +++-- | 14 | target/arm/helper.c | 23 +++++++++++++---------- |
11 | 1 file changed, 3 insertions(+), 2 deletions(-) | 15 | 1 file changed, 13 insertions(+), 10 deletions(-) |
12 | 16 | ||
13 | diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c | 17 | diff --git a/target/arm/helper.c b/target/arm/helper.c |
14 | index XXXXXXX..XXXXXXX 100644 | 18 | index XXXXXXX..XXXXXXX 100644 |
15 | --- a/hw/arm/exynos4_boards.c | 19 | --- a/target/arm/helper.c |
16 | +++ b/hw/arm/exynos4_boards.c | 20 | +++ b/target/arm/helper.c |
17 | @@ -XXX,XX +XXX,XX @@ | 21 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo vmsa_cp_reginfo[] = { |
18 | */ | 22 | .opc0 = 3, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 0, |
19 | 23 | .access = PL1_RW, .accessfn = access_tvm_trvm, | |
20 | #include "qemu/osdep.h" | 24 | .fgt = FGT_TTBR0_EL1, |
21 | +#include "qemu/units.h" | 25 | - .writefn = vmsa_ttbr_write, .resetvalue = 0, |
22 | #include "qapi/error.h" | 26 | + .writefn = vmsa_ttbr_write, .resetvalue = 0, .raw_writefn = raw_write, |
23 | #include "qemu/error-report.h" | 27 | .bank_fieldoffsets = { offsetof(CPUARMState, cp15.ttbr0_s), |
24 | #include "qemu-common.h" | 28 | offsetof(CPUARMState, cp15.ttbr0_ns) } }, |
25 | @@ -XXX,XX +XXX,XX @@ static int exynos4_board_smp_bootreg_addr[EXYNOS4_NUM_OF_BOARDS] = { | 29 | { .name = "TTBR1_EL1", .state = ARM_CP_STATE_BOTH, |
30 | .opc0 = 3, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 1, | ||
31 | .access = PL1_RW, .accessfn = access_tvm_trvm, | ||
32 | .fgt = FGT_TTBR1_EL1, | ||
33 | - .writefn = vmsa_ttbr_write, .resetvalue = 0, | ||
34 | + .writefn = vmsa_ttbr_write, .resetvalue = 0, .raw_writefn = raw_write, | ||
35 | .bank_fieldoffsets = { offsetof(CPUARMState, cp15.ttbr1_s), | ||
36 | offsetof(CPUARMState, cp15.ttbr1_ns) } }, | ||
37 | { .name = "TCR_EL1", .state = ARM_CP_STATE_AA64, | ||
38 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo lpae_cp_reginfo[] = { | ||
39 | .type = ARM_CP_64BIT | ARM_CP_ALIAS, | ||
40 | .bank_fieldoffsets = { offsetof(CPUARMState, cp15.ttbr0_s), | ||
41 | offsetof(CPUARMState, cp15.ttbr0_ns) }, | ||
42 | - .writefn = vmsa_ttbr_write, }, | ||
43 | + .writefn = vmsa_ttbr_write, .raw_writefn = raw_write }, | ||
44 | { .name = "TTBR1", .cp = 15, .crm = 2, .opc1 = 1, | ||
45 | .access = PL1_RW, .accessfn = access_tvm_trvm, | ||
46 | .type = ARM_CP_64BIT | ARM_CP_ALIAS, | ||
47 | .bank_fieldoffsets = { offsetof(CPUARMState, cp15.ttbr1_s), | ||
48 | offsetof(CPUARMState, cp15.ttbr1_ns) }, | ||
49 | - .writefn = vmsa_ttbr_write, }, | ||
50 | + .writefn = vmsa_ttbr_write, .raw_writefn = raw_write }, | ||
26 | }; | 51 | }; |
27 | 52 | ||
28 | static unsigned long exynos4_board_ram_size[EXYNOS4_NUM_OF_BOARDS] = { | 53 | static uint64_t aa64_fpcr_read(CPUARMState *env, const ARMCPRegInfo *ri) |
29 | - [EXYNOS4_BOARD_NURI] = 0x40000000, | 54 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo el2_cp_reginfo[] = { |
30 | - [EXYNOS4_BOARD_SMDKC210] = 0x40000000, | 55 | .type = ARM_CP_IO, |
31 | + [EXYNOS4_BOARD_NURI] = 1 * GiB, | 56 | .opc0 = 3, .opc1 = 4, .crn = 1, .crm = 1, .opc2 = 0, |
32 | + [EXYNOS4_BOARD_SMDKC210] = 1 * GiB, | 57 | .access = PL2_RW, .fieldoffset = offsetof(CPUARMState, cp15.hcr_el2), |
33 | }; | 58 | - .writefn = hcr_write }, |
34 | 59 | + .writefn = hcr_write, .raw_writefn = raw_write }, | |
35 | static struct arm_boot_info exynos4_board_binfo = { | 60 | { .name = "HCR", .state = ARM_CP_STATE_AA32, |
61 | .type = ARM_CP_ALIAS | ARM_CP_IO, | ||
62 | .cp = 15, .opc1 = 4, .crn = 1, .crm = 1, .opc2 = 0, | ||
63 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo el2_cp_reginfo[] = { | ||
64 | { .name = "TCR_EL2", .state = ARM_CP_STATE_BOTH, | ||
65 | .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 2, | ||
66 | .access = PL2_RW, .writefn = vmsa_tcr_el12_write, | ||
67 | + .raw_writefn = raw_write, | ||
68 | .fieldoffset = offsetof(CPUARMState, cp15.tcr_el[2]) }, | ||
69 | { .name = "VTCR", .state = ARM_CP_STATE_AA32, | ||
70 | .cp = 15, .opc1 = 4, .crn = 2, .crm = 1, .opc2 = 2, | ||
71 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo el2_cp_reginfo[] = { | ||
72 | .type = ARM_CP_64BIT | ARM_CP_ALIAS, | ||
73 | .access = PL2_RW, .accessfn = access_el3_aa32ns, | ||
74 | .fieldoffset = offsetof(CPUARMState, cp15.vttbr_el2), | ||
75 | - .writefn = vttbr_write }, | ||
76 | + .writefn = vttbr_write, .raw_writefn = raw_write }, | ||
77 | { .name = "VTTBR_EL2", .state = ARM_CP_STATE_AA64, | ||
78 | .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 1, .opc2 = 0, | ||
79 | - .access = PL2_RW, .writefn = vttbr_write, | ||
80 | + .access = PL2_RW, .writefn = vttbr_write, .raw_writefn = raw_write, | ||
81 | .fieldoffset = offsetof(CPUARMState, cp15.vttbr_el2) }, | ||
82 | { .name = "SCTLR_EL2", .state = ARM_CP_STATE_BOTH, | ||
83 | .opc0 = 3, .opc1 = 4, .crn = 1, .crm = 0, .opc2 = 0, | ||
84 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo el2_cp_reginfo[] = { | ||
85 | .fieldoffset = offsetof(CPUARMState, cp15.tpidr_el[2]) }, | ||
86 | { .name = "TTBR0_EL2", .state = ARM_CP_STATE_AA64, | ||
87 | .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 0, | ||
88 | - .access = PL2_RW, .resetvalue = 0, .writefn = vmsa_tcr_ttbr_el2_write, | ||
89 | + .access = PL2_RW, .resetvalue = 0, | ||
90 | + .writefn = vmsa_tcr_ttbr_el2_write, .raw_writefn = raw_write, | ||
91 | .fieldoffset = offsetof(CPUARMState, cp15.ttbr0_el[2]) }, | ||
92 | { .name = "HTTBR", .cp = 15, .opc1 = 4, .crm = 2, | ||
93 | .access = PL2_RW, .type = ARM_CP_64BIT | ARM_CP_ALIAS, | ||
94 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo el3_cp_reginfo[] = { | ||
95 | { .name = "SCR_EL3", .state = ARM_CP_STATE_AA64, | ||
96 | .opc0 = 3, .opc1 = 6, .crn = 1, .crm = 1, .opc2 = 0, | ||
97 | .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, cp15.scr_el3), | ||
98 | - .resetfn = scr_reset, .writefn = scr_write }, | ||
99 | + .resetfn = scr_reset, .writefn = scr_write, .raw_writefn = raw_write }, | ||
100 | { .name = "SCR", .type = ARM_CP_ALIAS | ARM_CP_NEWEL, | ||
101 | .cp = 15, .opc1 = 0, .crn = 1, .crm = 1, .opc2 = 0, | ||
102 | .access = PL1_RW, .accessfn = access_trap_aa32s_el1, | ||
103 | .fieldoffset = offsetoflow32(CPUARMState, cp15.scr_el3), | ||
104 | - .writefn = scr_write }, | ||
105 | + .writefn = scr_write, .raw_writefn = raw_write }, | ||
106 | { .name = "SDER32_EL3", .state = ARM_CP_STATE_AA64, | ||
107 | .opc0 = 3, .opc1 = 6, .crn = 1, .crm = 1, .opc2 = 1, | ||
108 | .access = PL3_RW, .resetvalue = 0, | ||
109 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo vhe_reginfo[] = { | ||
110 | { .name = "TTBR1_EL2", .state = ARM_CP_STATE_AA64, | ||
111 | .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 1, | ||
112 | .access = PL2_RW, .writefn = vmsa_tcr_ttbr_el2_write, | ||
113 | + .raw_writefn = raw_write, | ||
114 | .fieldoffset = offsetof(CPUARMState, cp15.ttbr1_el[2]) }, | ||
115 | #ifndef CONFIG_USER_ONLY | ||
116 | { .name = "CNTHV_CVAL_EL2", .state = ARM_CP_STATE_AA64, | ||
36 | -- | 117 | -- |
37 | 2.20.1 | 118 | 2.34.1 |
38 | |||
39 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | 1 | From: Yuquan Wang <wangyuquan1236@phytium.com.cn> |
---|---|---|---|
2 | 2 | ||
3 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 3 | The current sbsa-ref cannot use EHCI controller which is only |
4 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 4 | able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB. |
5 | Message-id: 20190520214342.13709-5-philmd@redhat.com | 5 | Hence, this uses XHCI to provide a usb controller with 64-bit |
6 | DMA capablity instead of EHCI. | ||
7 | |||
8 | We bump the platform version to 0.3 with this change. Although the | ||
9 | hardware at the USB controller address changes, the firmware and | ||
10 | Linux can both cope with this -- on an older non-XHCI-aware | ||
11 | firmware/kernel setup the probe routine simply fails and the guest | ||
12 | proceeds without any USB. (This isn't a loss of functionality, | ||
13 | because the old USB controller never worked in the first place.) So | ||
14 | we can call this a backwards-compatible change and only bump the | ||
15 | minor version. | ||
16 | |||
17 | Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn> | ||
18 | Message-id: 20230621103847.447508-2-wangyuquan1236@phytium.com.cn | ||
19 | [PMM: tweaked commit message; add line to docs about what | ||
20 | changes in platform version 0.3] | ||
21 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 22 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
7 | --- | 23 | --- |
8 | include/hw/arm/exynos4210.h | 9 +++++++-- | 24 | docs/system/arm/sbsa.rst | 5 ++++- |
9 | hw/arm/exynos4210.c | 28 ++++++++++++++++++++++++---- | 25 | hw/arm/sbsa-ref.c | 23 +++++++++++++---------- |
10 | hw/arm/exynos4_boards.c | 9 ++++++--- | 26 | hw/arm/Kconfig | 2 +- |
11 | 3 files changed, 37 insertions(+), 9 deletions(-) | 27 | 3 files changed, 18 insertions(+), 12 deletions(-) |
12 | 28 | ||
13 | diff --git a/include/hw/arm/exynos4210.h b/include/hw/arm/exynos4210.h | 29 | diff --git a/docs/system/arm/sbsa.rst b/docs/system/arm/sbsa.rst |
14 | index XXXXXXX..XXXXXXX 100644 | 30 | index XXXXXXX..XXXXXXX 100644 |
15 | --- a/include/hw/arm/exynos4210.h | 31 | --- a/docs/system/arm/sbsa.rst |
16 | +++ b/include/hw/arm/exynos4210.h | 32 | +++ b/docs/system/arm/sbsa.rst |
17 | @@ -XXX,XX +XXX,XX @@ typedef struct Exynos4210Irq { | 33 | @@ -XXX,XX +XXX,XX @@ The ``sbsa-ref`` board supports: |
18 | } Exynos4210Irq; | 34 | - A configurable number of AArch64 CPUs |
19 | 35 | - GIC version 3 | |
20 | typedef struct Exynos4210State { | 36 | - System bus AHCI controller |
21 | + /*< private >*/ | 37 | - - System bus EHCI controller |
22 | + SysBusDevice parent_obj; | 38 | + - System bus XHCI controller |
23 | + /*< public >*/ | 39 | - CDROM and hard disc on AHCI bus |
24 | ARMCPU *cpu[EXYNOS4210_NCPUS]; | 40 | - E1000E ethernet card on PCIe bus |
25 | Exynos4210Irq irqs; | 41 | - Bochs display adapter on PCIe bus |
26 | qemu_irq *irq_table; | 42 | @@ -XXX,XX +XXX,XX @@ Platform version changes: |
27 | @@ -XXX,XX +XXX,XX @@ typedef struct Exynos4210State { | 43 | |
28 | I2CBus *i2c_if[EXYNOS4210_I2C_NUMBER]; | 44 | 0.2 |
29 | } Exynos4210State; | 45 | GIC ITS information is present in devicetree. |
30 | |||
31 | +#define TYPE_EXYNOS4210_SOC "exynos4210" | ||
32 | +#define EXYNOS4210_SOC(obj) \ | ||
33 | + OBJECT_CHECK(Exynos4210State, obj, TYPE_EXYNOS4210_SOC) | ||
34 | + | 46 | + |
35 | void exynos4210_write_secondary(ARMCPU *cpu, | 47 | +0.3 |
36 | const struct arm_boot_info *info); | 48 | + The USB controller is an XHCI device, not EHCI |
37 | 49 | diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c | |
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 | ||
44 | index XXXXXXX..XXXXXXX 100644 | 50 | index XXXXXXX..XXXXXXX 100644 |
45 | --- a/hw/arm/exynos4210.c | 51 | --- a/hw/arm/sbsa-ref.c |
46 | +++ b/hw/arm/exynos4210.c | 52 | +++ b/hw/arm/sbsa-ref.c |
47 | @@ -XXX,XX +XXX,XX @@ static void pl330_create(uint32_t base, qemu_irq irq, int nreq) | 53 | @@ -XXX,XX +XXX,XX @@ |
48 | sysbus_connect_irq(busdev, 0, irq); | 54 | #include "hw/pci-host/gpex.h" |
55 | #include "hw/qdev-properties.h" | ||
56 | #include "hw/usb.h" | ||
57 | +#include "hw/usb/xhci.h" | ||
58 | #include "hw/char/pl011.h" | ||
59 | #include "hw/watchdog/sbsa_gwdt.h" | ||
60 | #include "net/net.h" | ||
61 | @@ -XXX,XX +XXX,XX @@ enum { | ||
62 | SBSA_SECURE_UART_MM, | ||
63 | SBSA_SECURE_MEM, | ||
64 | SBSA_AHCI, | ||
65 | - SBSA_EHCI, | ||
66 | + SBSA_XHCI, | ||
67 | }; | ||
68 | |||
69 | struct SBSAMachineState { | ||
70 | @@ -XXX,XX +XXX,XX @@ static const MemMapEntry sbsa_ref_memmap[] = { | ||
71 | [SBSA_SMMU] = { 0x60050000, 0x00020000 }, | ||
72 | /* Space here reserved for more SMMUs */ | ||
73 | [SBSA_AHCI] = { 0x60100000, 0x00010000 }, | ||
74 | - [SBSA_EHCI] = { 0x60110000, 0x00010000 }, | ||
75 | + [SBSA_XHCI] = { 0x60110000, 0x00010000 }, | ||
76 | /* Space here reserved for other devices */ | ||
77 | [SBSA_PCIE_PIO] = { 0x7fff0000, 0x00010000 }, | ||
78 | /* 32-bit address PCIE MMIO space */ | ||
79 | @@ -XXX,XX +XXX,XX @@ static const int sbsa_ref_irqmap[] = { | ||
80 | [SBSA_SECURE_UART] = 8, | ||
81 | [SBSA_SECURE_UART_MM] = 9, | ||
82 | [SBSA_AHCI] = 10, | ||
83 | - [SBSA_EHCI] = 11, | ||
84 | + [SBSA_XHCI] = 11, | ||
85 | [SBSA_SMMU] = 12, /* ... to 15 */ | ||
86 | [SBSA_GWDT_WS0] = 16, | ||
87 | }; | ||
88 | @@ -XXX,XX +XXX,XX @@ static void create_fdt(SBSAMachineState *sms) | ||
89 | * fw compatibility. | ||
90 | */ | ||
91 | qemu_fdt_setprop_cell(fdt, "/", "machine-version-major", 0); | ||
92 | - qemu_fdt_setprop_cell(fdt, "/", "machine-version-minor", 2); | ||
93 | + qemu_fdt_setprop_cell(fdt, "/", "machine-version-minor", 3); | ||
94 | |||
95 | if (ms->numa_state->have_numa_distance) { | ||
96 | int size = nb_numa_nodes * nb_numa_nodes * 3 * sizeof(uint32_t); | ||
97 | @@ -XXX,XX +XXX,XX @@ static void create_ahci(const SBSAMachineState *sms) | ||
98 | } | ||
49 | } | 99 | } |
50 | 100 | ||
51 | -Exynos4210State *exynos4210_init(MemoryRegion *system_mem) | 101 | -static void create_ehci(const SBSAMachineState *sms) |
52 | +static void exynos4210_realize(DeviceState *socdev, Error **errp) | 102 | +static void create_xhci(const SBSAMachineState *sms) |
53 | { | 103 | { |
54 | - Exynos4210State *s = g_new0(Exynos4210State, 1); | 104 | - hwaddr base = sbsa_ref_memmap[SBSA_EHCI].base; |
55 | + Exynos4210State *s = EXYNOS4210_SOC(socdev); | 105 | - int irq = sbsa_ref_irqmap[SBSA_EHCI]; |
56 | + MemoryRegion *system_mem = get_system_memory(); | 106 | + hwaddr base = sbsa_ref_memmap[SBSA_XHCI].base; |
57 | qemu_irq gate_irq[EXYNOS4210_NCPUS][EXYNOS4210_IRQ_GATE_NINPUTS]; | 107 | + int irq = sbsa_ref_irqmap[SBSA_XHCI]; |
58 | SysBusDevice *busdev; | 108 | + DeviceState *dev = qdev_new(TYPE_XHCI_SYSBUS); |
59 | DeviceState *dev; | 109 | |
60 | @@ -XXX,XX +XXX,XX @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem) | 110 | - sysbus_create_simple("platform-ehci-usb", base, |
61 | qemu_irq_invert(s->irq_table[exynos4210_get_irq(36, 1)]), 32); | 111 | - qdev_get_gpio_in(sms->gic, irq)); |
62 | pl330_create(EXYNOS4210_PL330_BASE2_ADDR, | 112 | + sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); |
63 | qemu_irq_invert(s->irq_table[exynos4210_get_irq(34, 1)]), 1); | 113 | + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); |
64 | - | 114 | + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, qdev_get_gpio_in(sms->gic, irq)); |
65 | - return s; | ||
66 | } | 115 | } |
67 | + | 116 | |
68 | +static void exynos4210_class_init(ObjectClass *klass, void *data) | 117 | static void create_smmu(const SBSAMachineState *sms, PCIBus *bus) |
69 | +{ | 118 | @@ -XXX,XX +XXX,XX @@ static void sbsa_ref_init(MachineState *machine) |
70 | + DeviceClass *dc = DEVICE_CLASS(klass); | 119 | |
71 | + | 120 | create_ahci(sms); |
72 | + dc->realize = exynos4210_realize; | 121 | |
73 | +} | 122 | - create_ehci(sms); |
74 | + | 123 | + create_xhci(sms); |
75 | +static const TypeInfo exynos4210_info = { | 124 | |
76 | + .name = TYPE_EXYNOS4210_SOC, | 125 | create_pcie(sms); |
77 | + .parent = TYPE_SYS_BUS_DEVICE, | 126 | |
78 | + .instance_size = sizeof(Exynos4210State), | 127 | diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig |
79 | + .class_init = exynos4210_class_init, | ||
80 | +}; | ||
81 | + | ||
82 | +static void exynos4210_register_types(void) | ||
83 | +{ | ||
84 | + type_register_static(&exynos4210_info); | ||
85 | +} | ||
86 | + | ||
87 | +type_init(exynos4210_register_types) | ||
88 | diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c | ||
89 | index XXXXXXX..XXXXXXX 100644 | 128 | index XXXXXXX..XXXXXXX 100644 |
90 | --- a/hw/arm/exynos4_boards.c | 129 | --- a/hw/arm/Kconfig |
91 | +++ b/hw/arm/exynos4_boards.c | 130 | +++ b/hw/arm/Kconfig |
92 | @@ -XXX,XX +XXX,XX @@ typedef enum Exynos4BoardType { | 131 | @@ -XXX,XX +XXX,XX @@ config SBSA_REF |
93 | } Exynos4BoardType; | 132 | select PL011 # UART |
94 | 133 | select PL031 # RTC | |
95 | typedef struct Exynos4BoardState { | 134 | select PL061 # GPIO |
96 | - Exynos4210State *soc; | 135 | - select USB_EHCI_SYSBUS |
97 | + Exynos4210State soc; | 136 | + select USB_XHCI_SYSBUS |
98 | MemoryRegion dram0_mem; | 137 | select WDT_SBSA |
99 | MemoryRegion dram1_mem; | 138 | select BOCHS_DISPLAY |
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", | ||
109 | + &error_fatal); | ||
110 | |||
111 | return s; | ||
112 | } | ||
113 | @@ -XXX,XX +XXX,XX @@ static void smdkc210_init(MachineState *machine) | ||
114 | EXYNOS4_BOARD_SMDKC210); | ||
115 | |||
116 | lan9215_init(SMDK_LAN9118_BASE_ADDR, | ||
117 | - qemu_irq_invert(s->soc->irq_table[exynos4210_get_irq(37, 1)])); | ||
118 | + qemu_irq_invert(s->soc.irq_table[exynos4210_get_irq(37, 1)])); | ||
119 | arm_load_kernel(ARM_CPU(first_cpu), &exynos4_board_binfo); | ||
120 | } | ||
121 | 139 | ||
122 | -- | 140 | -- |
123 | 2.20.1 | 141 | 2.34.1 |
124 | |||
125 | diff view generated by jsdifflib |
1 | In ich_vmcr_write() we enforce "writes of BPR fields to less than | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
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. | ||
6 | 2 | ||
3 | Allow the line length to extend to 548 columns. While annoyingly wide, | ||
4 | it's still less confusing than the continuations we print. Also, the | ||
5 | default VL used by Linux (and max for A64FX) uses only 140 columns. | ||
6 | |||
7 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
8 | Message-id: 20230622151201.1578522-2-richard.henderson@linaro.org | ||
9 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
7 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 10 | 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 | ||
10 | --- | 11 | --- |
11 | hw/intc/arm_gicv3_cpuif.c | 2 +- | 12 | target/arm/cpu.c | 36 ++++++++++++++---------------------- |
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | 1 file changed, 14 insertions(+), 22 deletions(-) |
13 | 14 | ||
14 | diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c | 15 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c |
15 | index XXXXXXX..XXXXXXX 100644 | 16 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/hw/intc/arm_gicv3_cpuif.c | 17 | --- a/target/arm/cpu.c |
17 | +++ b/hw/intc/arm_gicv3_cpuif.c | 18 | +++ b/target/arm/cpu.c |
18 | @@ -XXX,XX +XXX,XX @@ static void ich_vmcr_write(CPUARMState *env, const ARMCPRegInfo *ri, | 19 | @@ -XXX,XX +XXX,XX @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags) |
19 | /* Enforce "writing BPRs to less than minimum sets them to the minimum" | 20 | ARMCPU *cpu = ARM_CPU(cs); |
20 | * by reading and writing back the fields. | 21 | CPUARMState *env = &cpu->env; |
21 | */ | 22 | uint32_t psr = pstate_read(env); |
22 | - write_vbpr(cs, GICV3_G1, read_vbpr(cs, GICV3_G0)); | 23 | - int i; |
23 | + write_vbpr(cs, GICV3_G0, read_vbpr(cs, GICV3_G0)); | 24 | + int i, j; |
24 | write_vbpr(cs, GICV3_G1, read_vbpr(cs, GICV3_G1)); | 25 | int el = arm_current_el(env); |
25 | 26 | const char *ns_status; | |
26 | gicv3_cpuif_virt_update(cs); | 27 | bool sve; |
28 | @@ -XXX,XX +XXX,XX @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags) | ||
29 | } | ||
30 | |||
31 | if (sve) { | ||
32 | - int j, zcr_len = sve_vqm1_for_el(env, el); | ||
33 | + int zcr_len = sve_vqm1_for_el(env, el); | ||
34 | |||
35 | for (i = 0; i <= FFR_PRED_NUM; i++) { | ||
36 | bool eol; | ||
37 | @@ -XXX,XX +XXX,XX @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags) | ||
38 | } | ||
39 | } | ||
40 | |||
41 | - for (i = 0; i < 32; i++) { | ||
42 | - if (zcr_len == 0) { | ||
43 | + if (zcr_len == 0) { | ||
44 | + /* | ||
45 | + * With vl=16, there are only 37 columns per register, | ||
46 | + * so output two registers per line. | ||
47 | + */ | ||
48 | + for (i = 0; i < 32; i++) { | ||
49 | qemu_fprintf(f, "Z%02d=%016" PRIx64 ":%016" PRIx64 "%s", | ||
50 | i, env->vfp.zregs[i].d[1], | ||
51 | env->vfp.zregs[i].d[0], i & 1 ? "\n" : " "); | ||
52 | - } else if (zcr_len == 1) { | ||
53 | - qemu_fprintf(f, "Z%02d=%016" PRIx64 ":%016" PRIx64 | ||
54 | - ":%016" PRIx64 ":%016" PRIx64 "\n", | ||
55 | - i, env->vfp.zregs[i].d[3], env->vfp.zregs[i].d[2], | ||
56 | - env->vfp.zregs[i].d[1], env->vfp.zregs[i].d[0]); | ||
57 | - } else { | ||
58 | + } | ||
59 | + } else { | ||
60 | + for (i = 0; i < 32; i++) { | ||
61 | + qemu_fprintf(f, "Z%02d=", i); | ||
62 | for (j = zcr_len; j >= 0; j--) { | ||
63 | - bool odd = (zcr_len - j) % 2 != 0; | ||
64 | - if (j == zcr_len) { | ||
65 | - qemu_fprintf(f, "Z%02d[%x-%x]=", i, j, j - 1); | ||
66 | - } else if (!odd) { | ||
67 | - if (j > 0) { | ||
68 | - qemu_fprintf(f, " [%x-%x]=", j, j - 1); | ||
69 | - } else { | ||
70 | - qemu_fprintf(f, " [%x]=", j); | ||
71 | - } | ||
72 | - } | ||
73 | qemu_fprintf(f, "%016" PRIx64 ":%016" PRIx64 "%s", | ||
74 | env->vfp.zregs[i].d[j * 2 + 1], | ||
75 | - env->vfp.zregs[i].d[j * 2], | ||
76 | - odd || j == 0 ? "\n" : ":"); | ||
77 | + env->vfp.zregs[i].d[j * 2 + 0], | ||
78 | + j ? ":" : "\n"); | ||
79 | } | ||
80 | } | ||
81 | } | ||
27 | -- | 82 | -- |
28 | 2.20.1 | 83 | 2.34.1 |
29 | |||
30 | diff view generated by jsdifflib |
1 | From: Richard Henderson <richard.henderson@linaro.org> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | This is, after all, how we implement extract2 in tcg/aarch64. | 3 | Always print each matrix row whole, one per line, so that we |
4 | get the entire matrix in the proper shape. | ||
4 | 5 | ||
6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
7 | Message-id: 20230622151201.1578522-3-richard.henderson@linaro.org | ||
5 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 8 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
7 | Message-id: 20190514011129.11330-2-richard.henderson@linaro.org | ||
8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
9 | --- | 10 | --- |
10 | target/arm/translate-a64.c | 38 ++++++++++++++++++++------------------ | 11 | target/arm/cpu.c | 18 ++++++++++++++++++ |
11 | 1 file changed, 20 insertions(+), 18 deletions(-) | 12 | 1 file changed, 18 insertions(+) |
12 | 13 | ||
13 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c | 14 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c |
14 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
15 | --- a/target/arm/translate-a64.c | 16 | --- a/target/arm/cpu.c |
16 | +++ b/target/arm/translate-a64.c | 17 | +++ b/target/arm/cpu.c |
17 | @@ -XXX,XX +XXX,XX @@ static void disas_extract(DisasContext *s, uint32_t insn) | 18 | @@ -XXX,XX +XXX,XX @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags) |
18 | } else { | 19 | i, q[1], q[0], (i & 1 ? "\n" : " ")); |
19 | tcg_gen_ext32u_i64(tcg_rd, cpu_reg(s, rm)); | ||
20 | } | ||
21 | - } else if (rm == rn) { /* ROR */ | ||
22 | - tcg_rm = cpu_reg(s, rm); | ||
23 | - if (sf) { | ||
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 | } | 20 | } |
62 | } | 21 | } |
22 | + | ||
23 | + if (cpu_isar_feature(aa64_sme, cpu) && | ||
24 | + FIELD_EX64(env->svcr, SVCR, ZA) && | ||
25 | + sme_exception_el(env, el) == 0) { | ||
26 | + int zcr_len = sve_vqm1_for_el_sm(env, el, true); | ||
27 | + int svl = (zcr_len + 1) * 16; | ||
28 | + int svl_lg10 = svl < 100 ? 2 : 3; | ||
29 | + | ||
30 | + for (i = 0; i < svl; i++) { | ||
31 | + qemu_fprintf(f, "ZA[%0*d]=", svl_lg10, i); | ||
32 | + for (j = zcr_len; j >= 0; --j) { | ||
33 | + qemu_fprintf(f, "%016" PRIx64 ":%016" PRIx64 "%c", | ||
34 | + env->zarray[i].d[2 * j + 1], | ||
35 | + env->zarray[i].d[2 * j], | ||
36 | + j ? ':' : '\n'); | ||
37 | + } | ||
38 | + } | ||
39 | + } | ||
40 | } | ||
41 | |||
42 | #else | ||
63 | -- | 43 | -- |
64 | 2.20.1 | 44 | 2.34.1 |
65 | |||
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 | The mask implied by the extract is redundant with the one | 3 | For the outer product set of insns, which take an entire matrix |
4 | implied by the deposit. Also, fix spelling of BFXIL. | 4 | tile as output, the argument is not a combined tile+column. |
5 | 5 | Therefore using get_tile_rowcol was incorrect, as we extracted | |
6 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 6 | the tile number from itself. |
7 | |||
8 | The test case relies only on assembler support for SME, since | ||
9 | no release of GCC recognizes -march=armv9-a+sme yet. | ||
10 | |||
11 | Cc: qemu-stable@nongnu.org | ||
12 | Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1620 | ||
7 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 13 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
8 | Message-id: 20190514011129.11330-3-richard.henderson@linaro.org | 14 | Message-id: 20230622151201.1578522-5-richard.henderson@linaro.org |
15 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 16 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
10 | --- | 17 | --- |
11 | target/arm/translate-a64.c | 6 +++--- | 18 | target/arm/tcg/translate-sme.c | 24 ++++++--- |
12 | 1 file changed, 3 insertions(+), 3 deletions(-) | 19 | tests/tcg/aarch64/sme-outprod1.c | 83 +++++++++++++++++++++++++++++++ |
13 | 20 | tests/tcg/aarch64/Makefile.target | 10 ++-- | |
14 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c | 21 | 3 files changed, 108 insertions(+), 9 deletions(-) |
22 | create mode 100644 tests/tcg/aarch64/sme-outprod1.c | ||
23 | |||
24 | diff --git a/target/arm/tcg/translate-sme.c b/target/arm/tcg/translate-sme.c | ||
15 | index XXXXXXX..XXXXXXX 100644 | 25 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/target/arm/translate-a64.c | 26 | --- a/target/arm/tcg/translate-sme.c |
17 | +++ b/target/arm/translate-a64.c | 27 | +++ b/target/arm/tcg/translate-sme.c |
18 | @@ -XXX,XX +XXX,XX @@ static void disas_bitfield(DisasContext *s, uint32_t insn) | 28 | @@ -XXX,XX +XXX,XX @@ static TCGv_ptr get_tile_rowcol(DisasContext *s, int esz, int rs, |
19 | tcg_gen_extract_i64(tcg_rd, tcg_tmp, ri, len); | 29 | return addr; |
20 | return; | 30 | } |
21 | } | 31 | |
22 | - /* opc == 1, BXFIL fall through to deposit */ | 32 | +/* |
23 | - tcg_gen_extract_i64(tcg_tmp, tcg_tmp, ri, len); | 33 | + * Resolve tile.size[0] to a host pointer. |
24 | + /* opc == 1, BFXIL fall through to deposit */ | 34 | + * Used by e.g. outer product insns where we require the entire tile. |
25 | + tcg_gen_shri_i64(tcg_tmp, tcg_tmp, ri); | 35 | + */ |
26 | pos = 0; | 36 | +static TCGv_ptr get_tile(DisasContext *s, int esz, int tile) |
27 | } else { | 37 | +{ |
28 | /* Handle the ri > si case with a deposit | 38 | + TCGv_ptr addr = tcg_temp_new_ptr(); |
29 | @@ -XXX,XX +XXX,XX @@ static void disas_bitfield(DisasContext *s, uint32_t insn) | 39 | + int offset; |
30 | len = ri; | 40 | + |
41 | + offset = tile * sizeof(ARMVectorReg) + offsetof(CPUARMState, zarray); | ||
42 | + | ||
43 | + tcg_gen_addi_ptr(addr, cpu_env, offset); | ||
44 | + return addr; | ||
45 | +} | ||
46 | + | ||
47 | static bool trans_ZERO(DisasContext *s, arg_ZERO *a) | ||
48 | { | ||
49 | if (!dc_isar_feature(aa64_sme, s)) { | ||
50 | @@ -XXX,XX +XXX,XX @@ static bool do_adda(DisasContext *s, arg_adda *a, MemOp esz, | ||
51 | return true; | ||
31 | } | 52 | } |
32 | 53 | ||
33 | - if (opc == 1) { /* BFM, BXFIL */ | 54 | - /* Sum XZR+zad to find ZAd. */ |
34 | + if (opc == 1) { /* BFM, BFXIL */ | 55 | - za = get_tile_rowcol(s, esz, 31, a->zad, false); |
35 | tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_tmp, pos, len); | 56 | + za = get_tile(s, esz, a->zad); |
36 | } else { | 57 | zn = vec_full_reg_ptr(s, a->zn); |
37 | /* SBFM or UBFM: We start with zero, and we haven't modified | 58 | pn = pred_full_reg_ptr(s, a->pn); |
59 | pm = pred_full_reg_ptr(s, a->pm); | ||
60 | @@ -XXX,XX +XXX,XX @@ static bool do_outprod(DisasContext *s, arg_op *a, MemOp esz, | ||
61 | return true; | ||
62 | } | ||
63 | |||
64 | - /* Sum XZR+zad to find ZAd. */ | ||
65 | - za = get_tile_rowcol(s, esz, 31, a->zad, false); | ||
66 | + za = get_tile(s, esz, a->zad); | ||
67 | zn = vec_full_reg_ptr(s, a->zn); | ||
68 | zm = vec_full_reg_ptr(s, a->zm); | ||
69 | pn = pred_full_reg_ptr(s, a->pn); | ||
70 | @@ -XXX,XX +XXX,XX @@ static bool do_outprod_fpst(DisasContext *s, arg_op *a, MemOp esz, | ||
71 | return true; | ||
72 | } | ||
73 | |||
74 | - /* Sum XZR+zad to find ZAd. */ | ||
75 | - za = get_tile_rowcol(s, esz, 31, a->zad, false); | ||
76 | + za = get_tile(s, esz, a->zad); | ||
77 | zn = vec_full_reg_ptr(s, a->zn); | ||
78 | zm = vec_full_reg_ptr(s, a->zm); | ||
79 | pn = pred_full_reg_ptr(s, a->pn); | ||
80 | diff --git a/tests/tcg/aarch64/sme-outprod1.c b/tests/tcg/aarch64/sme-outprod1.c | ||
81 | new file mode 100644 | ||
82 | index XXXXXXX..XXXXXXX | ||
83 | --- /dev/null | ||
84 | +++ b/tests/tcg/aarch64/sme-outprod1.c | ||
85 | @@ -XXX,XX +XXX,XX @@ | ||
86 | +/* | ||
87 | + * SME outer product, 1 x 1. | ||
88 | + * SPDX-License-Identifier: GPL-2.0-or-later | ||
89 | + */ | ||
90 | + | ||
91 | +#include <stdio.h> | ||
92 | + | ||
93 | +extern void foo(float *dst); | ||
94 | + | ||
95 | +asm( | ||
96 | +" .arch_extension sme\n" | ||
97 | +" .type foo, @function\n" | ||
98 | +"foo:\n" | ||
99 | +" stp x29, x30, [sp, -80]!\n" | ||
100 | +" mov x29, sp\n" | ||
101 | +" stp d8, d9, [sp, 16]\n" | ||
102 | +" stp d10, d11, [sp, 32]\n" | ||
103 | +" stp d12, d13, [sp, 48]\n" | ||
104 | +" stp d14, d15, [sp, 64]\n" | ||
105 | +" smstart\n" | ||
106 | +" ptrue p0.s, vl4\n" | ||
107 | +" fmov z0.s, #1.0\n" | ||
108 | +/* | ||
109 | + * An outer product of a vector of 1.0 by itself should be a matrix of 1.0. | ||
110 | + * Note that we are using tile 1 here (za1.s) rather than tile 0. | ||
111 | + */ | ||
112 | +" zero {za}\n" | ||
113 | +" fmopa za1.s, p0/m, p0/m, z0.s, z0.s\n" | ||
114 | +/* | ||
115 | + * Read the first 4x4 sub-matrix of elements from tile 1: | ||
116 | + * Note that za1h should be interchangable here. | ||
117 | + */ | ||
118 | +" mov w12, #0\n" | ||
119 | +" mova z0.s, p0/m, za1v.s[w12, #0]\n" | ||
120 | +" mova z1.s, p0/m, za1v.s[w12, #1]\n" | ||
121 | +" mova z2.s, p0/m, za1v.s[w12, #2]\n" | ||
122 | +" mova z3.s, p0/m, za1v.s[w12, #3]\n" | ||
123 | +/* | ||
124 | + * And store them to the input pointer (dst in the C code): | ||
125 | + */ | ||
126 | +" st1w {z0.s}, p0, [x0]\n" | ||
127 | +" add x0, x0, #16\n" | ||
128 | +" st1w {z1.s}, p0, [x0]\n" | ||
129 | +" add x0, x0, #16\n" | ||
130 | +" st1w {z2.s}, p0, [x0]\n" | ||
131 | +" add x0, x0, #16\n" | ||
132 | +" st1w {z3.s}, p0, [x0]\n" | ||
133 | +" smstop\n" | ||
134 | +" ldp d8, d9, [sp, 16]\n" | ||
135 | +" ldp d10, d11, [sp, 32]\n" | ||
136 | +" ldp d12, d13, [sp, 48]\n" | ||
137 | +" ldp d14, d15, [sp, 64]\n" | ||
138 | +" ldp x29, x30, [sp], 80\n" | ||
139 | +" ret\n" | ||
140 | +" .size foo, . - foo" | ||
141 | +); | ||
142 | + | ||
143 | +int main() | ||
144 | +{ | ||
145 | + float dst[16]; | ||
146 | + int i, j; | ||
147 | + | ||
148 | + foo(dst); | ||
149 | + | ||
150 | + for (i = 0; i < 16; i++) { | ||
151 | + if (dst[i] != 1.0f) { | ||
152 | + break; | ||
153 | + } | ||
154 | + } | ||
155 | + | ||
156 | + if (i == 16) { | ||
157 | + return 0; /* success */ | ||
158 | + } | ||
159 | + | ||
160 | + /* failure */ | ||
161 | + for (i = 0; i < 4; ++i) { | ||
162 | + for (j = 0; j < 4; ++j) { | ||
163 | + printf("%f ", (double)dst[i * 4 + j]); | ||
164 | + } | ||
165 | + printf("\n"); | ||
166 | + } | ||
167 | + return 1; | ||
168 | +} | ||
169 | diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target | ||
170 | index XXXXXXX..XXXXXXX 100644 | ||
171 | --- a/tests/tcg/aarch64/Makefile.target | ||
172 | +++ b/tests/tcg/aarch64/Makefile.target | ||
173 | @@ -XXX,XX +XXX,XX @@ config-cc.mak: Makefile | ||
174 | $(call cc-option,-march=armv8.5-a, CROSS_CC_HAS_ARMV8_5); \ | ||
175 | $(call cc-option,-mbranch-protection=standard, CROSS_CC_HAS_ARMV8_BTI); \ | ||
176 | $(call cc-option,-march=armv8.5-a+memtag, CROSS_CC_HAS_ARMV8_MTE); \ | ||
177 | - $(call cc-option,-march=armv9-a+sme, CROSS_CC_HAS_ARMV9_SME)) 3> config-cc.mak | ||
178 | + $(call cc-option,-Wa$(COMMA)-march=armv9-a+sme, CROSS_AS_HAS_ARMV9_SME)) 3> config-cc.mak | ||
179 | -include config-cc.mak | ||
180 | |||
181 | ifneq ($(CROSS_CC_HAS_ARMV8_2),) | ||
182 | @@ -XXX,XX +XXX,XX @@ AARCH64_TESTS += mte-1 mte-2 mte-3 mte-4 mte-5 mte-6 mte-7 | ||
183 | mte-%: CFLAGS += -march=armv8.5-a+memtag | ||
184 | endif | ||
185 | |||
186 | +ifneq ($(CROSS_AS_HAS_ARMV9_SME),) | ||
187 | +AARCH64_TESTS += sme-outprod1 | ||
188 | +endif | ||
189 | + | ||
190 | ifneq ($(CROSS_CC_HAS_SVE),) | ||
191 | # System Registers Tests | ||
192 | AARCH64_TESTS += sysregs | ||
193 | -ifneq ($(CROSS_CC_HAS_ARMV9_SME),) | ||
194 | -sysregs: CFLAGS+=-march=armv9-a+sme -DHAS_ARMV9_SME | ||
195 | +ifneq ($(CROSS_AS_HAS_ARMV9_SME),) | ||
196 | +sysregs: CFLAGS+=-Wa,-march=armv9-a+sme -DHAS_ARMV9_SME | ||
197 | else | ||
198 | sysregs: CFLAGS+=-march=armv8.1-a+sve | ||
199 | endif | ||
38 | -- | 200 | -- |
39 | 2.20.1 | 201 | 2.34.1 |
40 | |||
41 | diff view generated by jsdifflib |
1 | The hw/arm/arm.h header now only includes declarations relating | 1 | From: John Högberg <john.hogberg@ericsson.com> |
---|---|---|---|
2 | to boot.c code, so it is only needed by Arm board or SoC code. | ||
3 | Remove some unnecessary inclusions of it from target/arm files | ||
4 | and from hw/intc/armv7m_nvic.c. | ||
5 | 2 | ||
3 | Unlike architectures with precise self-modifying code semantics | ||
4 | (e.g. x86) ARM processors do not maintain coherency for instruction | ||
5 | execution and memory, requiring an instruction synchronization | ||
6 | barrier on every core that will execute the new code, and on many | ||
7 | models also the explicit use of cache management instructions. | ||
8 | |||
9 | While this is required to make JITs work on actual hardware, QEMU | ||
10 | has gotten away with not handling this since it does not emulate | ||
11 | caches, and unconditionally invalidates code whenever the softmmu | ||
12 | or the user-mode page protection logic detects that code has been | ||
13 | modified. | ||
14 | |||
15 | Unfortunately the latter does not work in the face of dual-mapped | ||
16 | code (a common W^X workaround), where one page is executable and | ||
17 | the other is writable: user-mode has no way to connect one with the | ||
18 | other as that is only known to the kernel and the emulated | ||
19 | application. | ||
20 | |||
21 | This commit works around the issue by telling software that | ||
22 | instruction cache invalidation is required by clearing the | ||
23 | CPR_EL0.DIC flag (regardless of whether the emulated processor | ||
24 | needs it), and then invalidating code in IC IVAU instructions. | ||
25 | |||
26 | Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1034 | ||
27 | |||
28 | Co-authored-by: Richard Henderson <richard.henderson@linaro.org> | ||
29 | Signed-off-by: John Högberg <john.hogberg@ericsson.com> | ||
30 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
31 | Message-id: 168778890374.24232.3402138851538068785-1@git.sr.ht | ||
32 | [PMM: removed unnecessary AArch64 feature check; moved | ||
33 | "clear CTR_EL1.DIC" code up a bit so it's not in the middle | ||
34 | of the vfp/neon related tests] | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 35 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
7 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
8 | Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
9 | Message-id: 20190516163857.6430-3-peter.maydell@linaro.org | ||
10 | --- | 36 | --- |
11 | hw/intc/armv7m_nvic.c | 1 - | 37 | target/arm/cpu.c | 11 +++++++++++ |
12 | target/arm/arm-semi.c | 1 - | 38 | target/arm/helper.c | 47 ++++++++++++++++++++++++++++++++++++++++++--- |
13 | target/arm/cpu.c | 1 - | 39 | 2 files changed, 55 insertions(+), 3 deletions(-) |
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(-) | ||
19 | 40 | ||
20 | diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c | ||
21 | index XXXXXXX..XXXXXXX 100644 | ||
22 | --- a/hw/intc/armv7m_nvic.c | ||
23 | +++ b/hw/intc/armv7m_nvic.c | ||
24 | @@ -XXX,XX +XXX,XX @@ | ||
25 | #include "cpu.h" | ||
26 | #include "hw/sysbus.h" | ||
27 | #include "qemu/timer.h" | ||
28 | -#include "hw/arm/arm.h" | ||
29 | #include "hw/intc/armv7m_nvic.h" | ||
30 | #include "target/arm/cpu.h" | ||
31 | #include "exec/exec-all.h" | ||
32 | diff --git a/target/arm/arm-semi.c b/target/arm/arm-semi.c | ||
33 | index XXXXXXX..XXXXXXX 100644 | ||
34 | --- a/target/arm/arm-semi.c | ||
35 | +++ b/target/arm/arm-semi.c | ||
36 | @@ -XXX,XX +XXX,XX @@ | ||
37 | #else | ||
38 | #include "qemu-common.h" | ||
39 | #include "exec/gdbstub.h" | ||
40 | -#include "hw/arm/arm.h" | ||
41 | #include "qemu/cutils.h" | ||
42 | #endif | ||
43 | |||
44 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c | 41 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c |
45 | index XXXXXXX..XXXXXXX 100644 | 42 | index XXXXXXX..XXXXXXX 100644 |
46 | --- a/target/arm/cpu.c | 43 | --- a/target/arm/cpu.c |
47 | +++ b/target/arm/cpu.c | 44 | +++ b/target/arm/cpu.c |
48 | @@ -XXX,XX +XXX,XX @@ | 45 | @@ -XXX,XX +XXX,XX @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) |
49 | #if !defined(CONFIG_USER_ONLY) | 46 | return; |
50 | #include "hw/loader.h" | 47 | } |
51 | #endif | 48 | |
52 | -#include "hw/arm/arm.h" | 49 | +#ifdef CONFIG_USER_ONLY |
53 | #include "sysemu/sysemu.h" | 50 | + /* |
54 | #include "sysemu/hw_accel.h" | 51 | + * User mode relies on IC IVAU instructions to catch modification of |
55 | #include "kvm_arm.h" | 52 | + * dual-mapped code. |
56 | diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c | 53 | + * |
54 | + * Clear CTR_EL0.DIC to ensure that software that honors these flags uses | ||
55 | + * IC IVAU even if the emulated processor does not normally require it. | ||
56 | + */ | ||
57 | + cpu->ctr = FIELD_DP64(cpu->ctr, CTR_EL0, DIC, 0); | ||
58 | +#endif | ||
59 | + | ||
60 | if (arm_feature(env, ARM_FEATURE_AARCH64) && | ||
61 | cpu->has_vfp != cpu->has_neon) { | ||
62 | /* | ||
63 | diff --git a/target/arm/helper.c b/target/arm/helper.c | ||
57 | index XXXXXXX..XXXXXXX 100644 | 64 | index XXXXXXX..XXXXXXX 100644 |
58 | --- a/target/arm/cpu64.c | 65 | --- a/target/arm/helper.c |
59 | +++ b/target/arm/cpu64.c | 66 | +++ b/target/arm/helper.c |
60 | @@ -XXX,XX +XXX,XX @@ | 67 | @@ -XXX,XX +XXX,XX @@ static void mdcr_el2_write(CPUARMState *env, const ARMCPRegInfo *ri, |
61 | #if !defined(CONFIG_USER_ONLY) | 68 | } |
62 | #include "hw/loader.h" | 69 | } |
63 | #endif | 70 | |
64 | -#include "hw/arm/arm.h" | 71 | +#ifdef CONFIG_USER_ONLY |
65 | #include "sysemu/sysemu.h" | 72 | +/* |
66 | #include "sysemu/kvm.h" | 73 | + * `IC IVAU` is handled to improve compatibility with JITs that dual-map their |
67 | #include "kvm_arm.h" | 74 | + * code to get around W^X restrictions, where one region is writable and the |
68 | diff --git a/target/arm/kvm.c b/target/arm/kvm.c | 75 | + * other is executable. |
69 | index XXXXXXX..XXXXXXX 100644 | 76 | + * |
70 | --- a/target/arm/kvm.c | 77 | + * Since the executable region is never written to we cannot detect code |
71 | +++ b/target/arm/kvm.c | 78 | + * changes when running in user mode, and rely on the emulated JIT telling us |
72 | @@ -XXX,XX +XXX,XX @@ | 79 | + * that the code has changed by executing this instruction. |
73 | #include "cpu.h" | 80 | + */ |
74 | #include "trace.h" | 81 | +static void ic_ivau_write(CPUARMState *env, const ARMCPRegInfo *ri, |
75 | #include "internals.h" | 82 | + uint64_t value) |
76 | -#include "hw/arm/arm.h" | 83 | +{ |
77 | #include "hw/pci/pci.h" | 84 | + uint64_t icache_line_mask, start_address, end_address; |
78 | #include "exec/memattrs.h" | 85 | + const ARMCPU *cpu; |
79 | #include "exec/address-spaces.h" | 86 | + |
80 | diff --git a/target/arm/kvm32.c b/target/arm/kvm32.c | 87 | + cpu = env_archcpu(env); |
81 | index XXXXXXX..XXXXXXX 100644 | 88 | + |
82 | --- a/target/arm/kvm32.c | 89 | + icache_line_mask = (4 << extract32(cpu->ctr, 0, 4)) - 1; |
83 | +++ b/target/arm/kvm32.c | 90 | + start_address = value & ~icache_line_mask; |
84 | @@ -XXX,XX +XXX,XX @@ | 91 | + end_address = value | icache_line_mask; |
85 | #include "sysemu/kvm.h" | 92 | + |
86 | #include "kvm_arm.h" | 93 | + mmap_lock(); |
87 | #include "internals.h" | 94 | + |
88 | -#include "hw/arm/arm.h" | 95 | + tb_invalidate_phys_range(start_address, end_address); |
89 | #include "qemu/log.h" | 96 | + |
90 | 97 | + mmap_unlock(); | |
91 | static inline void set_feature(uint64_t *features, int feature) | 98 | +} |
92 | diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c | 99 | +#endif |
93 | index XXXXXXX..XXXXXXX 100644 | 100 | + |
94 | --- a/target/arm/kvm64.c | 101 | static const ARMCPRegInfo v8_cp_reginfo[] = { |
95 | +++ b/target/arm/kvm64.c | 102 | /* |
96 | @@ -XXX,XX +XXX,XX @@ | 103 | * Minimal set of EL0-visible registers. This will need to be expanded |
97 | #include "sysemu/kvm.h" | 104 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo v8_cp_reginfo[] = { |
98 | #include "kvm_arm.h" | 105 | { .name = "CURRENTEL", .state = ARM_CP_STATE_AA64, |
99 | #include "internals.h" | 106 | .opc0 = 3, .opc1 = 0, .opc2 = 2, .crn = 4, .crm = 2, |
100 | -#include "hw/arm/arm.h" | 107 | .access = PL1_R, .type = ARM_CP_CURRENTEL }, |
101 | 108 | - /* Cache ops: all NOPs since we don't emulate caches */ | |
102 | static bool have_guest_debug; | 109 | + /* |
103 | 110 | + * Instruction cache ops. All of these except `IC IVAU` NOP because we | |
111 | + * don't emulate caches. | ||
112 | + */ | ||
113 | { .name = "IC_IALLUIS", .state = ARM_CP_STATE_AA64, | ||
114 | .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 1, .opc2 = 0, | ||
115 | .access = PL1_W, .type = ARM_CP_NOP, | ||
116 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo v8_cp_reginfo[] = { | ||
117 | .accessfn = access_tocu }, | ||
118 | { .name = "IC_IVAU", .state = ARM_CP_STATE_AA64, | ||
119 | .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 5, .opc2 = 1, | ||
120 | - .access = PL0_W, .type = ARM_CP_NOP, | ||
121 | + .access = PL0_W, | ||
122 | .fgt = FGT_ICIVAU, | ||
123 | - .accessfn = access_tocu }, | ||
124 | + .accessfn = access_tocu, | ||
125 | +#ifdef CONFIG_USER_ONLY | ||
126 | + .type = ARM_CP_NO_RAW, | ||
127 | + .writefn = ic_ivau_write | ||
128 | +#else | ||
129 | + .type = ARM_CP_NOP | ||
130 | +#endif | ||
131 | + }, | ||
132 | + /* Cache ops: all NOPs since we don't emulate caches */ | ||
133 | { .name = "DC_IVAC", .state = ARM_CP_STATE_AA64, | ||
134 | .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 1, | ||
135 | .access = PL1_W, .accessfn = aa64_cacheop_poc_access, | ||
104 | -- | 136 | -- |
105 | 2.20.1 | 137 | 2.34.1 |
106 | 138 | ||
107 | 139 | diff view generated by jsdifflib |
1 | From: Alistair Francis <alistair.francis@wdc.com> | 1 | From: John Högberg <john.hogberg@ericsson.com> |
---|---|---|---|
2 | 2 | ||
3 | Commit 89e68b575 "target/arm: Use vector operations for saturation" | 3 | https://gitlab.com/qemu-project/qemu/-/issues/1034 |
4 | causes this abort() when booting QEMU ARM with a Cortex-A15: | 4 | |
5 | 5 | Signed-off-by: John Högberg <john.hogberg@ericsson.com> | |
6 | 0 0x00007ffff4c2382f in raise () at /usr/lib/libc.so.6 | 6 | Message-id: 168778890374.24232.3402138851538068785-2@git.sr.ht |
7 | 1 0x00007ffff4c0e672 in abort () at /usr/lib/libc.so.6 | 7 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
8 | 2 0x00005555559c1839 in disas_neon_data_insn (insn=<optimized out>, s=<optimized out>) at ./target/arm/translate.c:6673 | 8 | [PMM: fixed typo in comment] |
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 | ||
32 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
33 | --- | 10 | --- |
34 | target/arm/translate.c | 4 ++-- | 11 | tests/tcg/aarch64/icivau.c | 189 ++++++++++++++++++++++++++++++ |
35 | 1 file changed, 2 insertions(+), 2 deletions(-) | 12 | tests/tcg/aarch64/Makefile.target | 3 +- |
36 | 13 | 2 files changed, 191 insertions(+), 1 deletion(-) | |
37 | diff --git a/target/arm/translate.c b/target/arm/translate.c | 14 | create mode 100644 tests/tcg/aarch64/icivau.c |
15 | |||
16 | diff --git a/tests/tcg/aarch64/icivau.c b/tests/tcg/aarch64/icivau.c | ||
17 | new file mode 100644 | ||
18 | index XXXXXXX..XXXXXXX | ||
19 | --- /dev/null | ||
20 | +++ b/tests/tcg/aarch64/icivau.c | ||
21 | @@ -XXX,XX +XXX,XX @@ | ||
22 | +/* | ||
23 | + * Tests the IC IVAU-driven workaround for catching changes made to dual-mapped | ||
24 | + * code that would otherwise go unnoticed in user mode. | ||
25 | + * | ||
26 | + * Copyright (c) 2023 Ericsson AB | ||
27 | + * SPDX-License-Identifier: GPL-2.0-or-later | ||
28 | + */ | ||
29 | + | ||
30 | +#include <sys/mman.h> | ||
31 | +#include <sys/stat.h> | ||
32 | +#include <string.h> | ||
33 | +#include <stdint.h> | ||
34 | +#include <stdlib.h> | ||
35 | +#include <unistd.h> | ||
36 | +#include <fcntl.h> | ||
37 | + | ||
38 | +#define MAX_CODE_SIZE 128 | ||
39 | + | ||
40 | +typedef int (SelfModTest)(uint32_t, uint32_t*); | ||
41 | +typedef int (BasicTest)(int); | ||
42 | + | ||
43 | +static void mark_code_modified(const uint32_t *exec_data, size_t length) | ||
44 | +{ | ||
45 | + int dc_required, ic_required; | ||
46 | + unsigned long ctr_el0; | ||
47 | + | ||
48 | + /* | ||
49 | + * Clear the data/instruction cache, as indicated by the CTR_ELO.{DIC,IDC} | ||
50 | + * flags. | ||
51 | + * | ||
52 | + * For completeness we might be tempted to assert that we should fail when | ||
53 | + * the whole code update sequence is omitted, but that would make the test | ||
54 | + * flaky as it can succeed by coincidence on actual hardware. | ||
55 | + */ | ||
56 | + asm ("mrs %0, ctr_el0\n" : "=r"(ctr_el0)); | ||
57 | + | ||
58 | + /* CTR_EL0.IDC */ | ||
59 | + dc_required = !((ctr_el0 >> 28) & 1); | ||
60 | + | ||
61 | + /* CTR_EL0.DIC */ | ||
62 | + ic_required = !((ctr_el0 >> 29) & 1); | ||
63 | + | ||
64 | + if (dc_required) { | ||
65 | + size_t dcache_stride, i; | ||
66 | + | ||
67 | + /* | ||
68 | + * Step according to the minimum cache size, as the cache maintenance | ||
69 | + * instructions operate on the cache line of the given address. | ||
70 | + * | ||
71 | + * We assume that exec_data is properly aligned. | ||
72 | + */ | ||
73 | + dcache_stride = (4 << ((ctr_el0 >> 16) & 0xF)); | ||
74 | + | ||
75 | + for (i = 0; i < length; i += dcache_stride) { | ||
76 | + const char *dc_addr = &((const char *)exec_data)[i]; | ||
77 | + asm volatile ("dc cvau, %x[dc_addr]\n" | ||
78 | + : /* no outputs */ | ||
79 | + : [dc_addr] "r"(dc_addr) | ||
80 | + : "memory"); | ||
81 | + } | ||
82 | + | ||
83 | + asm volatile ("dmb ish\n"); | ||
84 | + } | ||
85 | + | ||
86 | + if (ic_required) { | ||
87 | + size_t icache_stride, i; | ||
88 | + | ||
89 | + icache_stride = (4 << (ctr_el0 & 0xF)); | ||
90 | + | ||
91 | + for (i = 0; i < length; i += icache_stride) { | ||
92 | + const char *ic_addr = &((const char *)exec_data)[i]; | ||
93 | + asm volatile ("ic ivau, %x[ic_addr]\n" | ||
94 | + : /* no outputs */ | ||
95 | + : [ic_addr] "r"(ic_addr) | ||
96 | + : "memory"); | ||
97 | + } | ||
98 | + | ||
99 | + asm volatile ("dmb ish\n"); | ||
100 | + } | ||
101 | + | ||
102 | + asm volatile ("isb sy\n"); | ||
103 | +} | ||
104 | + | ||
105 | +static int basic_test(uint32_t *rw_data, const uint32_t *exec_data) | ||
106 | +{ | ||
107 | + /* | ||
108 | + * As user mode only misbehaved for dual-mapped code when previously | ||
109 | + * translated code had been changed, we'll start off with this basic test | ||
110 | + * function to ensure that there's already some translated code at | ||
111 | + * exec_data before the next test. This should cause the next test to fail | ||
112 | + * if `mark_code_modified` fails to invalidate the code. | ||
113 | + * | ||
114 | + * Note that the payload is in binary form instead of inline assembler | ||
115 | + * because we cannot use __attribute__((naked)) on this platform and the | ||
116 | + * workarounds are at least as ugly as this is. | ||
117 | + */ | ||
118 | + static const uint32_t basic_payload[] = { | ||
119 | + 0xD65F03C0 /* 0x00: RET */ | ||
120 | + }; | ||
121 | + | ||
122 | + BasicTest *copied_ptr = (BasicTest *)exec_data; | ||
123 | + | ||
124 | + memcpy(rw_data, basic_payload, sizeof(basic_payload)); | ||
125 | + mark_code_modified(exec_data, sizeof(basic_payload)); | ||
126 | + | ||
127 | + return copied_ptr(1234) == 1234; | ||
128 | +} | ||
129 | + | ||
130 | +static int self_modification_test(uint32_t *rw_data, const uint32_t *exec_data) | ||
131 | +{ | ||
132 | + /* | ||
133 | + * This test is self-modifying in an attempt to cover an edge case where | ||
134 | + * the IC IVAU instruction invalidates itself. | ||
135 | + * | ||
136 | + * Note that the IC IVAU instruction is 16 bytes into the function, in what | ||
137 | + * will be the same cache line as the modified instruction on machines with | ||
138 | + * a cache line size >= 16 bytes. | ||
139 | + */ | ||
140 | + static const uint32_t self_mod_payload[] = { | ||
141 | + /* Overwrite the placeholder instruction with the new one. */ | ||
142 | + 0xB9001C20, /* 0x00: STR w0, [x1, 0x1C] */ | ||
143 | + | ||
144 | + /* Get the executable address of the modified instruction. */ | ||
145 | + 0x100000A8, /* 0x04: ADR x8, <0x1C> */ | ||
146 | + | ||
147 | + /* Mark the modified instruction as updated. */ | ||
148 | + 0xD50B7B28, /* 0x08: DC CVAU x8 */ | ||
149 | + 0xD5033BBF, /* 0x0C: DMB ISH */ | ||
150 | + 0xD50B7528, /* 0x10: IC IVAU x8 */ | ||
151 | + 0xD5033BBF, /* 0x14: DMB ISH */ | ||
152 | + 0xD5033FDF, /* 0x18: ISB */ | ||
153 | + | ||
154 | + /* Placeholder instruction, overwritten above. */ | ||
155 | + 0x52800000, /* 0x1C: MOV w0, 0 */ | ||
156 | + | ||
157 | + 0xD65F03C0 /* 0x20: RET */ | ||
158 | + }; | ||
159 | + | ||
160 | + SelfModTest *copied_ptr = (SelfModTest *)exec_data; | ||
161 | + int i; | ||
162 | + | ||
163 | + memcpy(rw_data, self_mod_payload, sizeof(self_mod_payload)); | ||
164 | + mark_code_modified(exec_data, sizeof(self_mod_payload)); | ||
165 | + | ||
166 | + for (i = 1; i < 10; i++) { | ||
167 | + /* Replace the placeholder instruction with `MOV w0, i` */ | ||
168 | + uint32_t new_instr = 0x52800000 | (i << 5); | ||
169 | + | ||
170 | + if (copied_ptr(new_instr, rw_data) != i) { | ||
171 | + return 0; | ||
172 | + } | ||
173 | + } | ||
174 | + | ||
175 | + return 1; | ||
176 | +} | ||
177 | + | ||
178 | +int main(int argc, char **argv) | ||
179 | +{ | ||
180 | + const char *shm_name = "qemu-test-tcg-aarch64-icivau"; | ||
181 | + int fd; | ||
182 | + | ||
183 | + fd = shm_open(shm_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); | ||
184 | + | ||
185 | + if (fd < 0) { | ||
186 | + return EXIT_FAILURE; | ||
187 | + } | ||
188 | + | ||
189 | + /* Unlink early to avoid leaving garbage in case the test crashes. */ | ||
190 | + shm_unlink(shm_name); | ||
191 | + | ||
192 | + if (ftruncate(fd, MAX_CODE_SIZE) == 0) { | ||
193 | + const uint32_t *exec_data; | ||
194 | + uint32_t *rw_data; | ||
195 | + | ||
196 | + rw_data = mmap(0, MAX_CODE_SIZE, PROT_READ | PROT_WRITE, | ||
197 | + MAP_SHARED, fd, 0); | ||
198 | + exec_data = mmap(0, MAX_CODE_SIZE, PROT_READ | PROT_EXEC, | ||
199 | + MAP_SHARED, fd, 0); | ||
200 | + | ||
201 | + if (rw_data && exec_data) { | ||
202 | + if (basic_test(rw_data, exec_data) && | ||
203 | + self_modification_test(rw_data, exec_data)) { | ||
204 | + return EXIT_SUCCESS; | ||
205 | + } | ||
206 | + } | ||
207 | + } | ||
208 | + | ||
209 | + return EXIT_FAILURE; | ||
210 | +} | ||
211 | diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target | ||
38 | index XXXXXXX..XXXXXXX 100644 | 212 | index XXXXXXX..XXXXXXX 100644 |
39 | --- a/target/arm/translate.c | 213 | --- a/tests/tcg/aarch64/Makefile.target |
40 | +++ b/target/arm/translate.c | 214 | +++ b/tests/tcg/aarch64/Makefile.target |
41 | @@ -XXX,XX +XXX,XX @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) | 215 | @@ -XXX,XX +XXX,XX @@ AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64 |
42 | tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc), | 216 | VPATH += $(AARCH64_SRC) |
43 | rn_ofs, rm_ofs, vec_size, vec_size, | 217 | |
44 | (u ? uqadd_op : sqadd_op) + size); | 218 | # Base architecture tests |
45 | - break; | 219 | -AARCH64_TESTS=fcvt pcalign-a64 |
46 | + return 0; | 220 | +AARCH64_TESTS=fcvt pcalign-a64 icivau |
47 | 221 | ||
48 | case NEON_3R_VQSUB: | 222 | fcvt: LDFLAGS+=-lm |
49 | tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc), | 223 | +icivau: LDFLAGS+=-lrt |
50 | rn_ofs, rm_ofs, vec_size, vec_size, | 224 | |
51 | (u ? uqsub_op : sqsub_op) + size); | 225 | run-fcvt: fcvt |
52 | - break; | 226 | $(call run-test,$<,$(QEMU) $<, "$< on $(TARGET_NAME)") |
53 | + return 0; | ||
54 | |||
55 | case NEON_3R_VMUL: /* VMUL */ | ||
56 | if (u) { | ||
57 | -- | 227 | -- |
58 | 2.20.1 | 228 | 2.34.1 |
59 | 229 | ||
60 | 230 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The system_clock_scale global is used only by the armv7m systick | ||
2 | device; move the extern declaration to the armv7m_systick.h header, | ||
3 | and expand the comment to explain what it is and that it should | ||
4 | ideally be replaced with a different approach. | ||
5 | 1 | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
7 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
8 | Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
9 | Message-id: 20190516163857.6430-2-peter.maydell@linaro.org | ||
10 | --- | ||
11 | include/hw/arm/arm.h | 4 ---- | ||
12 | include/hw/timer/armv7m_systick.h | 22 ++++++++++++++++++++++ | ||
13 | 2 files changed, 22 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h | ||
16 | index XXXXXXX..XXXXXXX 100644 | ||
17 | --- a/include/hw/arm/arm.h | ||
18 | +++ b/include/hw/arm/arm.h | ||
19 | @@ -XXX,XX +XXX,XX @@ void arm_write_secure_board_setup_dummy_smc(ARMCPU *cpu, | ||
20 | const struct arm_boot_info *info, | ||
21 | hwaddr mvbar_addr); | ||
22 | |||
23 | -/* Multiplication factor to convert from system clock ticks to qemu timer | ||
24 | - ticks. */ | ||
25 | -extern int system_clock_scale; | ||
26 | - | ||
27 | #endif /* HW_ARM_H */ | ||
28 | diff --git a/include/hw/timer/armv7m_systick.h b/include/hw/timer/armv7m_systick.h | ||
29 | index XXXXXXX..XXXXXXX 100644 | ||
30 | --- a/include/hw/timer/armv7m_systick.h | ||
31 | +++ b/include/hw/timer/armv7m_systick.h | ||
32 | @@ -XXX,XX +XXX,XX @@ typedef struct SysTickState { | ||
33 | qemu_irq irq; | ||
34 | } SysTickState; | ||
35 | |||
36 | +/* | ||
37 | + * Multiplication factor to convert from system clock ticks to qemu timer | ||
38 | + * ticks. This should be set (by board code, usually) to a value | ||
39 | + * equal to NANOSECONDS_PER_SECOND / frq, where frq is the clock frequency | ||
40 | + * in Hz of the CPU. | ||
41 | + * | ||
42 | + * This value is used by the systick device when it is running in | ||
43 | + * its "use the CPU clock" mode (ie when SYST_CSR.CLKSOURCE == 1) to | ||
44 | + * set how fast the timer should tick. | ||
45 | + * | ||
46 | + * TODO: we should refactor this so that rather than using a global | ||
47 | + * we use a device property or something similar. This is complicated | ||
48 | + * because (a) the property would need to be plumbed through from the | ||
49 | + * board code down through various layers to the systick device | ||
50 | + * and (b) the property needs to be modifiable after realize, because | ||
51 | + * the stellaris board uses this to implement the behaviour where the | ||
52 | + * guest can reprogram the PLL registers to downclock the CPU, and the | ||
53 | + * systick device needs to react accordingly. Possibly this should | ||
54 | + * be deferred until we have a good API for modelling clock trees. | ||
55 | + */ | ||
56 | +extern int system_clock_scale; | ||
57 | + | ||
58 | #endif | ||
59 | -- | ||
60 | 2.20.1 | ||
61 | |||
62 | diff view generated by jsdifflib |
1 | The ICC_CTLR_EL3 register includes some bits which are aliases | 1 | From: Vikram Garhwal <vikram.garhwal@amd.com> |
---|---|---|---|
2 | of bits in the ICC_CTLR_EL1(S) and (NS) registers. QEMU chooses | ||
3 | to keep those bits in the cs->icc_ctlr_el1[] struct fields. | ||
4 | Unfortunately a missing '~' in the code to update the bits | ||
5 | in those fields meant that writing to ICC_CTLR_EL3 would corrupt | ||
6 | the ICC_CLTR_EL1 register values. | ||
7 | 2 | ||
3 | Following are done to fix the coverity issues: | ||
4 | 1. Change read_data to fix the CID 1512899: Out-of-bounds access (OVERRUN) | ||
5 | 2. Fix match_rx_tx_data to fix CID 1512900: Logically dead code (DEADCODE) | ||
6 | 3. Replace rand() in generate_random_data() with g_rand_int() | ||
7 | |||
8 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
9 | Message-id: 20230628202758.16398-1-vikram.garhwal@amd.com | ||
10 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 11 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
9 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
10 | Message-id: 20190520162809.2677-5-peter.maydell@linaro.org | ||
11 | --- | 12 | --- |
12 | hw/intc/arm_gicv3_cpuif.c | 4 ++-- | 13 | tests/qtest/xlnx-canfd-test.c | 33 +++++++++++---------------------- |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | 14 | 1 file changed, 11 insertions(+), 22 deletions(-) |
14 | 15 | ||
15 | diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c | 16 | diff --git a/tests/qtest/xlnx-canfd-test.c b/tests/qtest/xlnx-canfd-test.c |
16 | index XXXXXXX..XXXXXXX 100644 | 17 | index XXXXXXX..XXXXXXX 100644 |
17 | --- a/hw/intc/arm_gicv3_cpuif.c | 18 | --- a/tests/qtest/xlnx-canfd-test.c |
18 | +++ b/hw/intc/arm_gicv3_cpuif.c | 19 | +++ b/tests/qtest/xlnx-canfd-test.c |
19 | @@ -XXX,XX +XXX,XX @@ static void icc_ctlr_el3_write(CPUARMState *env, const ARMCPRegInfo *ri, | 20 | @@ -XXX,XX +XXX,XX @@ static void generate_random_data(uint32_t *buf_tx, bool is_canfd_frame) |
20 | trace_gicv3_icc_ctlr_el3_write(gicv3_redist_affid(cs), value); | 21 | /* Generate random TX data for CANFD frame. */ |
21 | 22 | if (is_canfd_frame) { | |
22 | /* *_EL1NS and *_EL1S bits are aliases into the ICC_CTLR_EL1 bits. */ | 23 | for (int i = 0; i < CANFD_FRAME_SIZE - 2; i++) { |
23 | - cs->icc_ctlr_el1[GICV3_NS] &= (ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE); | 24 | - buf_tx[2 + i] = rand(); |
24 | + cs->icc_ctlr_el1[GICV3_NS] &= ~(ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE); | 25 | + buf_tx[2 + i] = g_random_int(); |
25 | if (value & ICC_CTLR_EL3_EOIMODE_EL1NS) { | 26 | } |
26 | cs->icc_ctlr_el1[GICV3_NS] |= ICC_CTLR_EL1_EOIMODE; | 27 | } else { |
28 | /* Generate random TX data for CAN frame. */ | ||
29 | for (int i = 0; i < CAN_FRAME_SIZE - 2; i++) { | ||
30 | - buf_tx[2 + i] = rand(); | ||
31 | + buf_tx[2 + i] = g_random_int(); | ||
32 | } | ||
27 | } | 33 | } |
28 | @@ -XXX,XX +XXX,XX @@ static void icc_ctlr_el3_write(CPUARMState *env, const ARMCPRegInfo *ri, | 34 | } |
29 | cs->icc_ctlr_el1[GICV3_NS] |= ICC_CTLR_EL1_CBPR; | 35 | |
36 | -static void read_data(QTestState *qts, uint64_t can_base_addr, uint32_t *buf_rx) | ||
37 | +static void read_data(QTestState *qts, uint64_t can_base_addr, uint32_t *buf_rx, | ||
38 | + uint32_t frame_size) | ||
39 | { | ||
40 | uint32_t int_status; | ||
41 | uint32_t fifo_status_reg_value; | ||
42 | /* At which RX FIFO the received data is stored. */ | ||
43 | uint8_t store_ind = 0; | ||
44 | - bool is_canfd_frame = false; | ||
45 | |||
46 | /* Read the interrupt on CANFD rx. */ | ||
47 | int_status = qtest_readl(qts, can_base_addr + R_ISR_OFFSET) & ISR_RXOK; | ||
48 | @@ -XXX,XX +XXX,XX @@ static void read_data(QTestState *qts, uint64_t can_base_addr, uint32_t *buf_rx) | ||
49 | buf_rx[0] = qtest_readl(qts, can_base_addr + R_RX0_ID_OFFSET); | ||
50 | buf_rx[1] = qtest_readl(qts, can_base_addr + R_RX0_DLC_OFFSET); | ||
51 | |||
52 | - is_canfd_frame = (buf_rx[1] >> DLC_FD_BIT_SHIFT) & 1; | ||
53 | - | ||
54 | - if (is_canfd_frame) { | ||
55 | - for (int i = 0; i < CANFD_FRAME_SIZE - 2; i++) { | ||
56 | - buf_rx[i + 2] = qtest_readl(qts, | ||
57 | - can_base_addr + R_RX0_DATA1_OFFSET + 4 * i); | ||
58 | - } | ||
59 | - } else { | ||
60 | - buf_rx[2] = qtest_readl(qts, can_base_addr + R_RX0_DATA1_OFFSET); | ||
61 | - buf_rx[3] = qtest_readl(qts, can_base_addr + R_RX0_DATA2_OFFSET); | ||
62 | + for (int i = 0; i < frame_size - 2; i++) { | ||
63 | + buf_rx[i + 2] = qtest_readl(qts, | ||
64 | + can_base_addr + R_RX0_DATA1_OFFSET + 4 * i); | ||
30 | } | 65 | } |
31 | 66 | ||
32 | - cs->icc_ctlr_el1[GICV3_S] &= (ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE); | 67 | /* Clear the RX interrupt. */ |
33 | + cs->icc_ctlr_el1[GICV3_S] &= ~(ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE); | 68 | @@ -XXX,XX +XXX,XX @@ static void match_rx_tx_data(const uint32_t *buf_tx, const uint32_t *buf_rx, |
34 | if (value & ICC_CTLR_EL3_EOIMODE_EL1S) { | 69 | g_assert_cmpint((buf_rx[size] & DLC_FD_BIT_MASK), ==, |
35 | cs->icc_ctlr_el1[GICV3_S] |= ICC_CTLR_EL1_EOIMODE; | 70 | (buf_tx[size] & DLC_FD_BIT_MASK)); |
36 | } | 71 | } else { |
72 | - if (!is_canfd_frame && size == 4) { | ||
73 | - break; | ||
74 | - } | ||
75 | - | ||
76 | g_assert_cmpint(buf_rx[size], ==, buf_tx[size]); | ||
77 | } | ||
78 | |||
79 | @@ -XXX,XX +XXX,XX @@ static void test_can_data_transfer(void) | ||
80 | write_data(qts, CANFD0_BASE_ADDR, buf_tx, false); | ||
81 | |||
82 | send_data(qts, CANFD0_BASE_ADDR); | ||
83 | - read_data(qts, CANFD1_BASE_ADDR, buf_rx); | ||
84 | + read_data(qts, CANFD1_BASE_ADDR, buf_rx, CAN_FRAME_SIZE); | ||
85 | match_rx_tx_data(buf_tx, buf_rx, false); | ||
86 | |||
87 | qtest_quit(qts); | ||
88 | @@ -XXX,XX +XXX,XX @@ static void test_canfd_data_transfer(void) | ||
89 | write_data(qts, CANFD0_BASE_ADDR, buf_tx, true); | ||
90 | |||
91 | send_data(qts, CANFD0_BASE_ADDR); | ||
92 | - read_data(qts, CANFD1_BASE_ADDR, buf_rx); | ||
93 | + read_data(qts, CANFD1_BASE_ADDR, buf_rx, CANFD_FRAME_SIZE); | ||
94 | match_rx_tx_data(buf_tx, buf_rx, true); | ||
95 | |||
96 | qtest_quit(qts); | ||
97 | @@ -XXX,XX +XXX,XX @@ static void test_can_loopback(void) | ||
98 | write_data(qts, CANFD0_BASE_ADDR, buf_tx, true); | ||
99 | |||
100 | send_data(qts, CANFD0_BASE_ADDR); | ||
101 | - read_data(qts, CANFD0_BASE_ADDR, buf_rx); | ||
102 | + read_data(qts, CANFD0_BASE_ADDR, buf_rx, CANFD_FRAME_SIZE); | ||
103 | match_rx_tx_data(buf_tx, buf_rx, true); | ||
104 | |||
105 | generate_random_data(buf_tx, true); | ||
106 | @@ -XXX,XX +XXX,XX @@ static void test_can_loopback(void) | ||
107 | write_data(qts, CANFD1_BASE_ADDR, buf_tx, true); | ||
108 | |||
109 | send_data(qts, CANFD1_BASE_ADDR); | ||
110 | - read_data(qts, CANFD1_BASE_ADDR, buf_rx); | ||
111 | + read_data(qts, CANFD1_BASE_ADDR, buf_rx, CANFD_FRAME_SIZE); | ||
112 | match_rx_tx_data(buf_tx, buf_rx, true); | ||
113 | |||
114 | qtest_quit(qts); | ||
37 | -- | 115 | -- |
38 | 2.20.1 | 116 | 2.34.1 |
39 | |||
40 | diff view generated by jsdifflib |
1 | From: Guenter Roeck <linux@roeck-us.net> | 1 | From: Fabiano Rosas <farosas@suse.de> |
---|---|---|---|
2 | 2 | ||
3 | QEMU already supports pl330. Instantiate it for Exynos4210. | 3 | This code is only relevant when TCG is present in the build. Building |
4 | with --disable-tcg --enable-xen on an x86 host we get: | ||
4 | 5 | ||
5 | Relevant part of Linux arch/arm/boot/dts/exynos4.dtsi: | 6 | $ ../configure --target-list=x86_64-softmmu,aarch64-softmmu --disable-tcg --enable-xen |
7 | $ make -j$(nproc) | ||
8 | ... | ||
9 | libqemu-aarch64-softmmu.fa.p/target_arm_gdbstub.c.o: in function `m_sysreg_ptr': | ||
10 | ../target/arm/gdbstub.c:358: undefined reference to `arm_v7m_get_sp_ptr' | ||
11 | ../target/arm/gdbstub.c:361: undefined reference to `arm_v7m_get_sp_ptr' | ||
6 | 12 | ||
7 | / { | 13 | libqemu-aarch64-softmmu.fa.p/target_arm_gdbstub.c.o: in function `arm_gdb_get_m_systemreg': |
8 | soc: soc { | 14 | ../target/arm/gdbstub.c:405: undefined reference to `arm_v7m_mrs_control' |
9 | amba { | ||
10 | pdma0: pdma@12680000 { | ||
11 | compatible = "arm,pl330", "arm,primecell"; | ||
12 | reg = <0x12680000 0x1000>; | ||
13 | interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; | ||
14 | clocks = <&clock CLK_PDMA0>; | ||
15 | clock-names = "apb_pclk"; | ||
16 | #dma-cells = <1>; | ||
17 | #dma-channels = <8>; | ||
18 | #dma-requests = <32>; | ||
19 | }; | ||
20 | pdma1: pdma@12690000 { | ||
21 | compatible = "arm,pl330", "arm,primecell"; | ||
22 | reg = <0x12690000 0x1000>; | ||
23 | interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; | ||
24 | clocks = <&clock CLK_PDMA1>; | ||
25 | clock-names = "apb_pclk"; | ||
26 | #dma-cells = <1>; | ||
27 | #dma-channels = <8>; | ||
28 | #dma-requests = <32>; | ||
29 | }; | ||
30 | mdma1: mdma@12850000 { | ||
31 | compatible = "arm,pl330", "arm,primecell"; | ||
32 | reg = <0x12850000 0x1000>; | ||
33 | interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; | ||
34 | clocks = <&clock CLK_MDMA>; | ||
35 | clock-names = "apb_pclk"; | ||
36 | #dma-cells = <1>; | ||
37 | #dma-channels = <8>; | ||
38 | #dma-requests = <1>; | ||
39 | }; | ||
40 | }; | ||
41 | }; | ||
42 | }; | ||
43 | 15 | ||
44 | Signed-off-by: Guenter Roeck <linux@roeck-us.net> | 16 | Signed-off-by: Fabiano Rosas <farosas@suse.de> |
45 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 17 | Message-id: 20230628164821.16771-1-farosas@suse.de |
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> | 18 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
54 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 19 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
55 | --- | 20 | --- |
56 | hw/arm/exynos4210.c | 26 ++++++++++++++++++++++++++ | 21 | target/arm/gdbstub.c | 4 ++++ |
57 | 1 file changed, 26 insertions(+) | 22 | 1 file changed, 4 insertions(+) |
58 | 23 | ||
59 | diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c | 24 | diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c |
60 | index XXXXXXX..XXXXXXX 100644 | 25 | index XXXXXXX..XXXXXXX 100644 |
61 | --- a/hw/arm/exynos4210.c | 26 | --- a/target/arm/gdbstub.c |
62 | +++ b/hw/arm/exynos4210.c | 27 | +++ b/target/arm/gdbstub.c |
63 | @@ -XXX,XX +XXX,XX @@ | 28 | @@ -XXX,XX +XXX,XX @@ static int arm_gen_dynamic_sysreg_xml(CPUState *cs, int base_reg) |
64 | /* EHCI */ | 29 | return cpu->dyn_sysreg_xml.num; |
65 | #define EXYNOS4210_EHCI_BASE_ADDR 0x12580000 | ||
66 | |||
67 | +/* DMA */ | ||
68 | +#define EXYNOS4210_PL330_BASE0_ADDR 0x12680000 | ||
69 | +#define EXYNOS4210_PL330_BASE1_ADDR 0x12690000 | ||
70 | +#define EXYNOS4210_PL330_BASE2_ADDR 0x12850000 | ||
71 | + | ||
72 | static uint8_t chipid_and_omr[] = { 0x11, 0x02, 0x21, 0x43, | ||
73 | 0x09, 0x00, 0x00, 0x00 }; | ||
74 | |||
75 | @@ -XXX,XX +XXX,XX @@ static uint64_t exynos4210_calc_affinity(int cpu) | ||
76 | return (0x9 << ARM_AFF1_SHIFT) | cpu; | ||
77 | } | 30 | } |
78 | 31 | ||
79 | +static void pl330_create(uint32_t base, qemu_irq irq, int nreq) | 32 | +#ifdef CONFIG_TCG |
80 | +{ | 33 | typedef enum { |
81 | + SysBusDevice *busdev; | 34 | M_SYSREG_MSP, |
82 | + DeviceState *dev; | 35 | M_SYSREG_PSP, |
83 | + | 36 | @@ -XXX,XX +XXX,XX @@ static int arm_gen_dynamic_m_secextreg_xml(CPUState *cs, int orig_base_reg) |
84 | + dev = qdev_create(NULL, "pl330"); | 37 | return cpu->dyn_m_secextreg_xml.num; |
85 | + qdev_prop_set_uint8(dev, "num_periph_req", nreq); | 38 | } |
86 | + qdev_init_nofail(dev); | 39 | #endif |
87 | + busdev = SYS_BUS_DEVICE(dev); | 40 | +#endif /* CONFIG_TCG */ |
88 | + sysbus_mmio_map(busdev, 0, base); | 41 | |
89 | + sysbus_connect_irq(busdev, 0, irq); | 42 | const char *arm_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname) |
90 | +} | ||
91 | + | ||
92 | Exynos4210State *exynos4210_init(MemoryRegion *system_mem) | ||
93 | { | 43 | { |
94 | Exynos4210State *s = g_new0(Exynos4210State, 1); | 44 | @@ -XXX,XX +XXX,XX @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) |
95 | @@ -XXX,XX +XXX,XX @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem) | 45 | arm_gen_dynamic_sysreg_xml(cs, cs->gdb_num_regs), |
96 | sysbus_create_simple(TYPE_EXYNOS4210_EHCI, EXYNOS4210_EHCI_BASE_ADDR, | 46 | "system-registers.xml", 0); |
97 | s->irq_table[exynos4210_get_irq(28, 3)]); | 47 | |
98 | 48 | +#ifdef CONFIG_TCG | |
99 | + /*** DMA controllers ***/ | 49 | if (arm_feature(env, ARM_FEATURE_M) && tcg_enabled()) { |
100 | + pl330_create(EXYNOS4210_PL330_BASE0_ADDR, | 50 | gdb_register_coprocessor(cs, |
101 | + qemu_irq_invert(s->irq_table[exynos4210_get_irq(35, 1)]), 32); | 51 | arm_gdb_get_m_systemreg, arm_gdb_set_m_systemreg, |
102 | + pl330_create(EXYNOS4210_PL330_BASE1_ADDR, | 52 | @@ -XXX,XX +XXX,XX @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) |
103 | + qemu_irq_invert(s->irq_table[exynos4210_get_irq(36, 1)]), 32); | 53 | } |
104 | + pl330_create(EXYNOS4210_PL330_BASE2_ADDR, | 54 | #endif |
105 | + qemu_irq_invert(s->irq_table[exynos4210_get_irq(34, 1)]), 1); | 55 | } |
106 | + | 56 | +#endif /* CONFIG_TCG */ |
107 | return s; | ||
108 | } | 57 | } |
109 | -- | 58 | -- |
110 | 2.20.1 | 59 | 2.34.1 |
111 | |||
112 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | 1 | From: Akihiko Odaki <akihiko.odaki@daynix.com> |
---|---|---|---|
2 | 2 | ||
3 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 3 | AwSRAMCClass is larger than SysBusDeviceClass so the class size must be |
4 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 4 | advertised accordingly. |
5 | Message-id: 20190520214342.13709-2-philmd@redhat.com | 5 | |
6 | Fixes: 05def917e1 ("hw: arm: allwinner-sramc: Add SRAM Controller support for R40") | ||
7 | Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> | ||
8 | Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> | ||
9 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
10 | Message-id: 20230628110905.38125-1-akihiko.odaki@daynix.com | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 11 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
7 | --- | 12 | --- |
8 | hw/arm/exynos4_boards.c | 24 ------------------------ | 13 | hw/misc/allwinner-sramc.c | 1 + |
9 | 1 file changed, 24 deletions(-) | 14 | 1 file changed, 1 insertion(+) |
10 | 15 | ||
11 | diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c | 16 | diff --git a/hw/misc/allwinner-sramc.c b/hw/misc/allwinner-sramc.c |
12 | index XXXXXXX..XXXXXXX 100644 | 17 | index XXXXXXX..XXXXXXX 100644 |
13 | --- a/hw/arm/exynos4_boards.c | 18 | --- a/hw/misc/allwinner-sramc.c |
14 | +++ b/hw/arm/exynos4_boards.c | 19 | +++ b/hw/misc/allwinner-sramc.c |
15 | @@ -XXX,XX +XXX,XX @@ | 20 | @@ -XXX,XX +XXX,XX @@ static const TypeInfo allwinner_sramc_info = { |
16 | #include "hw/net/lan9118.h" | 21 | .parent = TYPE_SYS_BUS_DEVICE, |
17 | #include "hw/boards.h" | 22 | .instance_init = allwinner_sramc_init, |
18 | 23 | .instance_size = sizeof(AwSRAMCState), | |
19 | -#undef DEBUG | 24 | + .class_size = sizeof(AwSRAMCClass), |
20 | - | 25 | .class_init = allwinner_sramc_class_init, |
21 | -//#define DEBUG | 26 | }; |
22 | - | ||
23 | -#ifdef DEBUG | ||
24 | - #undef PRINT_DEBUG | ||
25 | - #define PRINT_DEBUG(fmt, args...) \ | ||
26 | - do { \ | ||
27 | - fprintf(stderr, " [%s:%d] "fmt, __func__, __LINE__, ##args); \ | ||
28 | - } while (0) | ||
29 | -#else | ||
30 | - #define PRINT_DEBUG(fmt, args...) do {} while (0) | ||
31 | -#endif | ||
32 | - | ||
33 | #define SMDK_LAN9118_BASE_ADDR 0x05000000 | ||
34 | |||
35 | typedef enum Exynos4BoardType { | ||
36 | @@ -XXX,XX +XXX,XX @@ exynos4_boards_init_common(MachineState *machine, | ||
37 | exynos4_board_binfo.gic_cpu_if_addr = | ||
38 | EXYNOS4210_SMP_PRIVATE_BASE_ADDR + 0x100; | ||
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]); | ||
52 | 27 | ||
53 | -- | 28 | -- |
54 | 2.20.1 | 29 | 2.34.1 |
55 | 30 | ||
56 | 31 | diff view generated by jsdifflib |
1 | The header file hw/arm/arm.h now includes only declarations | 1 | In handle_interrupt() we use level as an index into the interrupt_vector[] |
---|---|---|---|
2 | relating to hw/arm/boot.c functionality. Rename it accordingly, | 2 | array. This is safe because we have checked it against env->config->nlevel, |
3 | and adjust its header comment. | 3 | but Coverity can't see that (and it is only true because each CPU config |
4 | sets its XCHAL_NUM_INTLEVELS to something less than MAX_NLEVELS), so it | ||
5 | complains about a possible array overrun (CID 1507131) | ||
4 | 6 | ||
5 | The bulk of this commit was created via | 7 | Add an assert() which will make Coverity happy and catch the unlikely |
6 | perl -pi -e 's|hw/arm/arm.h|hw/arm/boot.h|' hw/arm/*.c include/hw/arm/*.h | 8 | case of a mis-set XCHAL_NUM_INTLEVELS in future. |
7 | |||
8 | In a few cases we can just delete the #include: | ||
9 | hw/arm/msf2-soc.c, include/hw/arm/aspeed_soc.h and | ||
10 | include/hw/arm/bcm2836.h did not require it. | ||
11 | 9 | ||
12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
13 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 11 | Acked-by: Max Filippov <jcmvbkbc@gmail.com> |
14 | Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 12 | Message-id: 20230623154135.1930261-1-peter.maydell@linaro.org |
15 | Message-id: 20190516163857.6430-4-peter.maydell@linaro.org | ||
16 | --- | 13 | --- |
17 | include/hw/arm/allwinner-a10.h | 2 +- | 14 | target/xtensa/exc_helper.c | 3 +++ |
18 | include/hw/arm/aspeed_soc.h | 1 - | 15 | 1 file changed, 3 insertions(+) |
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%) | ||
68 | 16 | ||
69 | diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h | 17 | diff --git a/target/xtensa/exc_helper.c b/target/xtensa/exc_helper.c |
70 | index XXXXXXX..XXXXXXX 100644 | 18 | index XXXXXXX..XXXXXXX 100644 |
71 | --- a/include/hw/arm/allwinner-a10.h | 19 | --- a/target/xtensa/exc_helper.c |
72 | +++ b/include/hw/arm/allwinner-a10.h | 20 | +++ b/target/xtensa/exc_helper.c |
73 | @@ -XXX,XX +XXX,XX @@ | 21 | @@ -XXX,XX +XXX,XX @@ static void handle_interrupt(CPUXtensaState *env) |
74 | #include "qemu-common.h" | 22 | CPUState *cs = env_cpu(env); |
75 | #include "qemu/error-report.h" | 23 | |
76 | #include "hw/char/serial.h" | 24 | if (level > 1) { |
77 | -#include "hw/arm/arm.h" | 25 | + /* env->config->nlevel check should have ensured this */ |
78 | +#include "hw/arm/boot.h" | 26 | + assert(level < sizeof(env->config->interrupt_vector)); |
79 | #include "hw/timer/allwinner-a10-pit.h" | 27 | + |
80 | #include "hw/intc/allwinner-a10-pic.h" | 28 | env->sregs[EPC1 + level - 1] = env->pc; |
81 | #include "hw/net/allwinner_emac.h" | 29 | env->sregs[EPS2 + level - 2] = env->sregs[PS]; |
82 | diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h | 30 | env->sregs[PS] = |
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" | ||
669 | diff --git a/hw/arm/virt.c b/hw/arm/virt.c | ||
670 | index XXXXXXX..XXXXXXX 100644 | ||
671 | --- a/hw/arm/virt.c | ||
672 | +++ b/hw/arm/virt.c | ||
673 | @@ -XXX,XX +XXX,XX @@ | ||
674 | #include "qemu/option.h" | ||
675 | #include "qapi/error.h" | ||
676 | #include "hw/sysbus.h" | ||
677 | -#include "hw/arm/arm.h" | ||
678 | +#include "hw/arm/boot.h" | ||
679 | #include "hw/arm/primecell.h" | ||
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" | ||
721 | -- | 31 | -- |
722 | 2.20.1 | 32 | 2.34.1 |
723 | |||
724 | diff view generated by jsdifflib |