1 | target-arm queue for rc1 -- these are all bug fixes. | 1 | Last few changes before rc0: a few bug fixes, but mostly |
---|---|---|---|
2 | docs stuff. | ||
2 | 3 | ||
3 | thanks | ||
4 | -- PMM | 4 | -- PMM |
5 | 5 | ||
6 | The following changes since commit b9404bf592e7ba74180e1a54ed7a266ec6ee67f2: | 6 | The following changes since commit a97fca4ceb9d9b10aa8b582e817a5ee6c42ffbaf: |
7 | 7 | ||
8 | Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20190715' into staging (2019-07-15 12:22:07 +0100) | 8 | Merge remote-tracking branch 'remotes/mst/tags/for_upstream3' into staging (2021-07-16 16:34:42 +0100) |
9 | 9 | ||
10 | are available in the Git repository at: | 10 | are available in the Git repository at: |
11 | 11 | ||
12 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20190715 | 12 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210718 |
13 | 13 | ||
14 | for you to fetch changes up to 51c9122e92b776a3f16af0b9282f1dc5012e2a19: | 14 | for you to fetch changes up to 8fe612a183dec4c63afdc57537079bc742d024ca: |
15 | 15 | ||
16 | target/arm: NS BusFault on vector table fetch escalates to NS HardFault (2019-07-15 14:17:04 +0100) | 16 | target/arm: Remove duplicate 'plus1' function from Neon and SVE decode (2021-07-18 10:59:47 +0100) |
17 | 17 | ||
18 | ---------------------------------------------------------------- | 18 | ---------------------------------------------------------------- |
19 | target-arm queue: | 19 | target-arm queue: |
20 | * report ARMv8-A FP support for AArch32 -cpu max | 20 | * Remove duplicate 'plus1' function from Neon and SVE decode |
21 | * hw/ssi/xilinx_spips: Avoid AXI writes to the LQSPI linear memory | 21 | * Fix offsets for TTBCR for big-endian hosts |
22 | * hw/ssi/xilinx_spips: Avoid out-of-bound access to lqspi_buf[] | 22 | * docs: fix copyright date |
23 | * hw/ssi/mss-spi: Avoid crash when reading empty RX FIFO | 23 | * docs: add license/version info to HTML footers |
24 | * hw/display/xlnx_dp: Avoid crash when reading empty RX FIFO | 24 | * docs: add an About section |
25 | * hw/arm/virt: Fix non-secure flash mode | 25 | * docs: document some more arm boards |
26 | * pl031: Correctly migrate state when using -rtc clock=host | ||
27 | * fix regression that meant arm926 and arm1026 lost VFP | ||
28 | double-precision support | ||
29 | * v8M: NS BusFault on vector table fetch escalates to NS HardFault | ||
30 | 26 | ||
31 | ---------------------------------------------------------------- | 27 | ---------------------------------------------------------------- |
32 | Alex Bennée (1): | 28 | Peter Maydell (11): |
33 | target/arm: report ARMv8-A FP support for AArch32 -cpu max | 29 | docs: Fix documentation Copyright date |
30 | docs: Stop calling the top level subsections of our manual 'manuals' | ||
31 | docs: Remove "Contents:" lines from top-level subsections | ||
32 | docs: Move deprecation, build and license info out of system/ | ||
33 | docs: Add some actual About text to about/index.rst | ||
34 | docs: Add license note to the HTML page footer | ||
35 | docs: Add QEMU version information to HTML footer | ||
36 | docs: Add skeletal documentation of cubieboard | ||
37 | docs: Add skeletal documentation of the emcraft-sf2 | ||
38 | docs: Add skeletal documentation of highbank and midway | ||
39 | target/arm: Remove duplicate 'plus1' function from Neon and SVE decode | ||
34 | 40 | ||
35 | David Engraf (1): | 41 | Richard Henderson (1): |
36 | hw/arm/virt: Fix non-secure flash mode | 42 | target/arm: Fix offsets for TTBCR |
37 | 43 | ||
38 | Peter Maydell (3): | 44 | docs/_templates/footer.html | 14 ++++++++++++++ |
39 | pl031: Correctly migrate state when using -rtc clock=host | 45 | docs/{system => about}/build-platforms.rst | 0 |
40 | target/arm: Set VFP-related MVFR0 fields for arm926 and arm1026 | 46 | docs/{system => about}/deprecated.rst | 0 |
41 | target/arm: NS BusFault on vector table fetch escalates to NS HardFault | 47 | docs/about/index.rst | 27 +++++++++++++++++++++++++++ |
48 | docs/{system => about}/license.rst | 0 | ||
49 | docs/{system => about}/removed-features.rst | 0 | ||
50 | docs/conf.py | 2 +- | ||
51 | docs/devel/index.rst | 7 +------ | ||
52 | docs/index.rst | 1 + | ||
53 | docs/interop/index.rst | 9 ++------- | ||
54 | docs/meson.build | 3 ++- | ||
55 | docs/specs/index.rst | 7 ++----- | ||
56 | docs/system/arm/cubieboard.rst | 16 ++++++++++++++++ | ||
57 | docs/system/arm/emcraft-sf2.rst | 15 +++++++++++++++ | ||
58 | docs/system/arm/highbank.rst | 19 +++++++++++++++++++ | ||
59 | docs/system/index.rst | 11 +---------- | ||
60 | docs/system/target-arm.rst | 3 +++ | ||
61 | docs/tools/index.rst | 7 ++----- | ||
62 | docs/user/index.rst | 7 +------ | ||
63 | target/arm/neon-ls.decode | 4 ++-- | ||
64 | target/arm/neon-shared.decode | 2 +- | ||
65 | target/arm/sve.decode | 2 +- | ||
66 | target/arm/helper.c | 11 +++++++---- | ||
67 | target/arm/translate-neon.c | 5 ----- | ||
68 | target/arm/translate-sve.c | 5 ----- | ||
69 | MAINTAINERS | 4 ++++ | ||
70 | 26 files changed, 122 insertions(+), 59 deletions(-) | ||
71 | create mode 100644 docs/_templates/footer.html | ||
72 | rename docs/{system => about}/build-platforms.rst (100%) | ||
73 | rename docs/{system => about}/deprecated.rst (100%) | ||
74 | create mode 100644 docs/about/index.rst | ||
75 | rename docs/{system => about}/license.rst (100%) | ||
76 | rename docs/{system => about}/removed-features.rst (100%) | ||
77 | create mode 100644 docs/system/arm/cubieboard.rst | ||
78 | create mode 100644 docs/system/arm/emcraft-sf2.rst | ||
79 | create mode 100644 docs/system/arm/highbank.rst | ||
42 | 80 | ||
43 | Philippe Mathieu-Daudé (5): | ||
44 | hw/ssi/xilinx_spips: Convert lqspi_read() to read_with_attrs | ||
45 | hw/ssi/xilinx_spips: Avoid AXI writes to the LQSPI linear memory | ||
46 | hw/ssi/xilinx_spips: Avoid out-of-bound access to lqspi_buf[] | ||
47 | hw/ssi/mss-spi: Avoid crash when reading empty RX FIFO | ||
48 | hw/display/xlnx_dp: Avoid crash when reading empty RX FIFO | ||
49 | |||
50 | include/hw/timer/pl031.h | 2 ++ | ||
51 | hw/arm/virt.c | 2 +- | ||
52 | hw/core/machine.c | 1 + | ||
53 | hw/display/xlnx_dp.c | 15 +++++--- | ||
54 | hw/ssi/mss-spi.c | 8 ++++- | ||
55 | hw/ssi/xilinx_spips.c | 43 +++++++++++++++------- | ||
56 | hw/timer/pl031.c | 92 +++++++++++++++++++++++++++++++++++++++++++++--- | ||
57 | target/arm/cpu.c | 16 +++++++++ | ||
58 | target/arm/m_helper.c | 21 ++++++++--- | ||
59 | 9 files changed, 174 insertions(+), 26 deletions(-) | ||
60 | diff view generated by jsdifflib |
1 | From: David Engraf <david.engraf@sysgo.com> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | Using the whole 128 MiB flash in non-secure mode is not working because | 3 | The functions vmsa_ttbcr_write and vmsa_ttbcr_raw_write expect |
4 | virt_flash_fdt() expects the same address for secure_sysmem and sysmem. | 4 | the offset to be for the complete TCR structure, not the offset |
5 | This is not correctly handled by caller because it forwards NULL for | 5 | to the low 32-bits of a uint64_t. Using offsetoflow32 in this |
6 | secure_sysmem in non-secure flash mode. | 6 | case breaks big-endian hosts. |
7 | 7 | ||
8 | Fixed by using sysmem when secure_sysmem is NULL. | 8 | For TTBCR2, we do want the high 32-bits of a uint64_t. |
9 | Use cp15.tcr_el[*].raw_tcr as the offsetofhigh32 argument to | ||
10 | clarify this. | ||
9 | 11 | ||
10 | Signed-off-by: David Engraf <david.engraf@sysgo.com> | 12 | Buglink: https://gitlab.com/qemu-project/qemu/-/issues/187 |
11 | Message-id: 20190712075002.14326-1-david.engraf@sysgo.com | 13 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
14 | Message-id: 20210709230621.938821-2-richard.henderson@linaro.org | ||
12 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 15 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 16 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
14 | --- | 17 | --- |
15 | hw/arm/virt.c | 2 +- | 18 | target/arm/helper.c | 11 +++++++---- |
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | 19 | 1 file changed, 7 insertions(+), 4 deletions(-) |
17 | 20 | ||
18 | diff --git a/hw/arm/virt.c b/hw/arm/virt.c | 21 | diff --git a/target/arm/helper.c b/target/arm/helper.c |
19 | index XXXXXXX..XXXXXXX 100644 | 22 | index XXXXXXX..XXXXXXX 100644 |
20 | --- a/hw/arm/virt.c | 23 | --- a/target/arm/helper.c |
21 | +++ b/hw/arm/virt.c | 24 | +++ b/target/arm/helper.c |
22 | @@ -XXX,XX +XXX,XX @@ static void machvirt_init(MachineState *machine) | 25 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo vmsa_cp_reginfo[] = { |
23 | &machine->device_memory->mr); | 26 | .access = PL1_RW, .accessfn = access_tvm_trvm, |
24 | } | 27 | .type = ARM_CP_ALIAS, .writefn = vmsa_ttbcr_write, |
25 | 28 | .raw_writefn = vmsa_ttbcr_raw_write, | |
26 | - virt_flash_fdt(vms, sysmem, secure_sysmem); | 29 | - .bank_fieldoffsets = { offsetoflow32(CPUARMState, cp15.tcr_el[3]), |
27 | + virt_flash_fdt(vms, sysmem, secure_sysmem ?: sysmem); | 30 | - offsetoflow32(CPUARMState, cp15.tcr_el[1])} }, |
28 | 31 | + /* No offsetoflow32 -- pass the entire TCR to writefn/raw_writefn. */ | |
29 | create_gic(vms, pic); | 32 | + .bank_fieldoffsets = { offsetof(CPUARMState, cp15.tcr_el[3]), |
30 | 33 | + offsetof(CPUARMState, cp15.tcr_el[1])} }, | |
34 | REGINFO_SENTINEL | ||
35 | }; | ||
36 | |||
37 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo ttbcr2_reginfo = { | ||
38 | .name = "TTBCR2", .cp = 15, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 3, | ||
39 | .access = PL1_RW, .accessfn = access_tvm_trvm, | ||
40 | .type = ARM_CP_ALIAS, | ||
41 | - .bank_fieldoffsets = { offsetofhigh32(CPUARMState, cp15.tcr_el[3]), | ||
42 | - offsetofhigh32(CPUARMState, cp15.tcr_el[1]) }, | ||
43 | + .bank_fieldoffsets = { | ||
44 | + offsetofhigh32(CPUARMState, cp15.tcr_el[3].raw_tcr), | ||
45 | + offsetofhigh32(CPUARMState, cp15.tcr_el[1].raw_tcr), | ||
46 | + }, | ||
47 | }; | ||
48 | |||
49 | static void omap_ticonfig_write(CPUARMState *env, const ARMCPRegInfo *ri, | ||
31 | -- | 50 | -- |
32 | 2.20.1 | 51 | 2.20.1 |
33 | 52 | ||
34 | 53 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | In commit 6d8980a38fa we updated the copyright string we present to | ||
2 | the user in -version output, About dialogs, etc, but we forgot that | ||
3 | the Sphinx manuals have a separate copyright string setting. Update | ||
4 | that one too. | ||
1 | 5 | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
7 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
8 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
9 | Message-id: 20210705095547.15790-2-peter.maydell@linaro.org | ||
10 | --- | ||
11 | docs/conf.py | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/docs/conf.py b/docs/conf.py | ||
15 | index XXXXXXX..XXXXXXX 100644 | ||
16 | --- a/docs/conf.py | ||
17 | +++ b/docs/conf.py | ||
18 | @@ -XXX,XX +XXX,XX @@ | ||
19 | |||
20 | # General information about the project. | ||
21 | project = u'QEMU' | ||
22 | -copyright = u'2020, The QEMU Project Developers' | ||
23 | +copyright = u'2021, The QEMU Project Developers' | ||
24 | author = u'The QEMU Project Developers' | ||
25 | |||
26 | # The version info for the project you're documenting, acts as replacement for | ||
27 | -- | ||
28 | 2.20.1 | ||
29 | |||
30 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | We merged our previous multiple-manual setup into a single Sphinx | ||
2 | manual, but we left some text in the various index.rst lines that | ||
3 | still calls the top level subsections separate 'manuals'. Update | ||
4 | them to talk about "this section of the manual" instead, and remove | ||
5 | now-obsolete comments about how the index.rst files are the "top | ||
6 | level page for the 'foo' manual". | ||
1 | 7 | ||
8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
9 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
10 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
11 | Message-id: 20210705095547.15790-3-peter.maydell@linaro.org | ||
12 | --- | ||
13 | docs/devel/index.rst | 5 +---- | ||
14 | docs/interop/index.rst | 7 ++----- | ||
15 | docs/specs/index.rst | 5 ++--- | ||
16 | docs/system/index.rst | 5 +---- | ||
17 | docs/tools/index.rst | 5 ++--- | ||
18 | docs/user/index.rst | 5 +---- | ||
19 | 6 files changed, 9 insertions(+), 23 deletions(-) | ||
20 | |||
21 | diff --git a/docs/devel/index.rst b/docs/devel/index.rst | ||
22 | index XXXXXXX..XXXXXXX 100644 | ||
23 | --- a/docs/devel/index.rst | ||
24 | +++ b/docs/devel/index.rst | ||
25 | @@ -XXX,XX +XXX,XX @@ | ||
26 | -.. This is the top level page for the 'devel' manual. | ||
27 | - | ||
28 | - | ||
29 | Developer Information | ||
30 | ===================== | ||
31 | |||
32 | -This manual documents various parts of the internals of QEMU. | ||
33 | +This section of the manual documents various parts of the internals of QEMU. | ||
34 | You only need to read it if you are interested in reading or | ||
35 | modifying QEMU's source code. | ||
36 | |||
37 | diff --git a/docs/interop/index.rst b/docs/interop/index.rst | ||
38 | index XXXXXXX..XXXXXXX 100644 | ||
39 | --- a/docs/interop/index.rst | ||
40 | +++ b/docs/interop/index.rst | ||
41 | @@ -XXX,XX +XXX,XX @@ | ||
42 | -.. This is the top level page for the 'interop' manual. | ||
43 | - | ||
44 | - | ||
45 | System Emulation Management and Interoperability | ||
46 | ================================================ | ||
47 | |||
48 | -This manual contains documents and specifications that are useful | ||
49 | -for making QEMU interoperate with other software. | ||
50 | +This section of the manual contains documents and specifications that | ||
51 | +are useful for making QEMU interoperate with other software. | ||
52 | |||
53 | Contents: | ||
54 | |||
55 | diff --git a/docs/specs/index.rst b/docs/specs/index.rst | ||
56 | index XXXXXXX..XXXXXXX 100644 | ||
57 | --- a/docs/specs/index.rst | ||
58 | +++ b/docs/specs/index.rst | ||
59 | @@ -XXX,XX +XXX,XX @@ | ||
60 | -.. This is the top level page for the 'specs' manual | ||
61 | - | ||
62 | - | ||
63 | System Emulation Guest Hardware Specifications | ||
64 | ============================================== | ||
65 | |||
66 | +This section of the manual contains specifications of | ||
67 | +guest hardware that is specific to QEMU. | ||
68 | |||
69 | Contents: | ||
70 | |||
71 | diff --git a/docs/system/index.rst b/docs/system/index.rst | ||
72 | index XXXXXXX..XXXXXXX 100644 | ||
73 | --- a/docs/system/index.rst | ||
74 | +++ b/docs/system/index.rst | ||
75 | @@ -XXX,XX +XXX,XX @@ | ||
76 | -.. This is the top level page for the 'system' manual. | ||
77 | - | ||
78 | - | ||
79 | System Emulation | ||
80 | ================ | ||
81 | |||
82 | -This manual is the overall guide for users using QEMU | ||
83 | +This section of the manual is the overall guide for users using QEMU | ||
84 | for full system emulation (as opposed to user-mode emulation). | ||
85 | This includes working with hypervisors such as KVM, Xen, Hax | ||
86 | or Hypervisor.Framework. | ||
87 | diff --git a/docs/tools/index.rst b/docs/tools/index.rst | ||
88 | index XXXXXXX..XXXXXXX 100644 | ||
89 | --- a/docs/tools/index.rst | ||
90 | +++ b/docs/tools/index.rst | ||
91 | @@ -XXX,XX +XXX,XX @@ | ||
92 | -.. This is the top level page for the 'tools' manual | ||
93 | - | ||
94 | - | ||
95 | Tools | ||
96 | ===== | ||
97 | |||
98 | +This section of the manual documents QEMU's "tools": its | ||
99 | +command line utilities and other standalone programs. | ||
100 | |||
101 | Contents: | ||
102 | |||
103 | diff --git a/docs/user/index.rst b/docs/user/index.rst | ||
104 | index XXXXXXX..XXXXXXX 100644 | ||
105 | --- a/docs/user/index.rst | ||
106 | +++ b/docs/user/index.rst | ||
107 | @@ -XXX,XX +XXX,XX @@ | ||
108 | -.. This is the top level page for the 'user' manual. | ||
109 | - | ||
110 | - | ||
111 | User Mode Emulation | ||
112 | =================== | ||
113 | |||
114 | -This manual is the overall guide for users using QEMU | ||
115 | +This section of the manual is the overall guide for users using QEMU | ||
116 | for user-mode emulation. In this mode, QEMU can launch | ||
117 | processes compiled for one CPU on another CPU. | ||
118 | |||
119 | -- | ||
120 | 2.20.1 | ||
121 | |||
122 | diff view generated by jsdifflib |
1 | In the M-profile architecture, when we do a vector table fetch and it | 1 | Since the top-level subsections aren't self-contained manuals |
---|---|---|---|
2 | fails, we need to report a HardFault. Whether this is a Secure HF or | 2 | any more, the "Contents:" lines at the top of each of their |
3 | a NonSecure HF depends on several things. If AIRCR.BFHFNMINS is 0 | 3 | index pages look a bit odd; remove them. |
4 | then HF is always Secure, because there is no NonSecure HardFault. | ||
5 | Otherwise, the answer depends on whether the 'underlying exception' | ||
6 | (MemManage, BusFault, SecureFault) targets Secure or NonSecure. (In | ||
7 | the pseudocode, this is handled in the Vector() function: the final | ||
8 | exc.isSecure is calculated by looking at the exc.isSecure from the | ||
9 | exception returned from the memory access, not the isSecure input | ||
10 | argument.) | ||
11 | |||
12 | We weren't doing this correctly, because we were looking at | ||
13 | the target security domain of the exception we were trying to | ||
14 | load the vector table entry for. This produces errors of two kinds: | ||
15 | * a load from the NS vector table which hits the "NS access | ||
16 | to S memory" SecureFault should end up as a Secure HardFault, | ||
17 | but we were raising an NS HardFault | ||
18 | * a load from the S vector table which causes a BusFault | ||
19 | should raise an NS HardFault if BFHFNMINS == 1 (because | ||
20 | in that case all BusFaults are NonSecure), but we were raising | ||
21 | a Secure HardFault | ||
22 | |||
23 | Correct the logic. | ||
24 | |||
25 | We also fix a comment error where we claimed that we might | ||
26 | be escalating MemManage to HardFault, and forgot about SecureFault. | ||
27 | (Vector loads can never hit MPU access faults, because they're | ||
28 | always aligned and always use the default address map.) | ||
29 | 4 | ||
30 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
31 | Message-id: 20190705094823.28905-1-peter.maydell@linaro.org | 6 | Acked-by: Markus Armbruster <armbru@redhat.com> |
7 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
8 | Message-id: 20210705095547.15790-4-peter.maydell@linaro.org | ||
32 | --- | 9 | --- |
33 | target/arm/m_helper.c | 21 +++++++++++++++++---- | 10 | docs/devel/index.rst | 2 -- |
34 | 1 file changed, 17 insertions(+), 4 deletions(-) | 11 | docs/interop/index.rst | 2 -- |
12 | docs/specs/index.rst | 2 -- | ||
13 | docs/system/index.rst | 2 -- | ||
14 | docs/tools/index.rst | 2 -- | ||
15 | docs/user/index.rst | 2 -- | ||
16 | 6 files changed, 12 deletions(-) | ||
35 | 17 | ||
36 | diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c | 18 | diff --git a/docs/devel/index.rst b/docs/devel/index.rst |
37 | index XXXXXXX..XXXXXXX 100644 | 19 | index XXXXXXX..XXXXXXX 100644 |
38 | --- a/target/arm/m_helper.c | 20 | --- a/docs/devel/index.rst |
39 | +++ b/target/arm/m_helper.c | 21 | +++ b/docs/devel/index.rst |
40 | @@ -XXX,XX +XXX,XX @@ static bool arm_v7m_load_vector(ARMCPU *cpu, int exc, bool targets_secure, | 22 | @@ -XXX,XX +XXX,XX @@ This section of the manual documents various parts of the internals of QEMU. |
41 | if (sattrs.ns) { | 23 | You only need to read it if you are interested in reading or |
42 | attrs.secure = false; | 24 | modifying QEMU's source code. |
43 | } else if (!targets_secure) { | 25 | |
44 | - /* NS access to S memory */ | 26 | -Contents: |
45 | + /* | 27 | - |
46 | + * NS access to S memory: the underlying exception which we escalate | 28 | .. toctree:: |
47 | + * to HardFault is SecureFault, which always targets Secure. | 29 | :maxdepth: 2 |
48 | + */ | 30 | :includehidden: |
49 | + exc_secure = true; | 31 | diff --git a/docs/interop/index.rst b/docs/interop/index.rst |
50 | goto load_fail; | 32 | index XXXXXXX..XXXXXXX 100644 |
51 | } | 33 | --- a/docs/interop/index.rst |
52 | } | 34 | +++ b/docs/interop/index.rst |
53 | @@ -XXX,XX +XXX,XX @@ static bool arm_v7m_load_vector(ARMCPU *cpu, int exc, bool targets_secure, | 35 | @@ -XXX,XX +XXX,XX @@ System Emulation Management and Interoperability |
54 | vector_entry = address_space_ldl(arm_addressspace(cs, attrs), addr, | 36 | This section of the manual contains documents and specifications that |
55 | attrs, &result); | 37 | are useful for making QEMU interoperate with other software. |
56 | if (result != MEMTX_OK) { | 38 | |
57 | + /* | 39 | -Contents: |
58 | + * Underlying exception is BusFault: its target security state | 40 | - |
59 | + * depends on BFHFNMINS. | 41 | .. toctree:: |
60 | + */ | 42 | :maxdepth: 2 |
61 | + exc_secure = !(cpu->env.v7m.aircr & R_V7M_AIRCR_BFHFNMINS_MASK); | 43 | |
62 | goto load_fail; | 44 | diff --git a/docs/specs/index.rst b/docs/specs/index.rst |
63 | } | 45 | index XXXXXXX..XXXXXXX 100644 |
64 | *pvec = vector_entry; | 46 | --- a/docs/specs/index.rst |
65 | @@ -XXX,XX +XXX,XX @@ load_fail: | 47 | +++ b/docs/specs/index.rst |
66 | /* | 48 | @@ -XXX,XX +XXX,XX @@ System Emulation Guest Hardware Specifications |
67 | * All vector table fetch fails are reported as HardFault, with | 49 | This section of the manual contains specifications of |
68 | * HFSR.VECTTBL and .FORCED set. (FORCED is set because | 50 | guest hardware that is specific to QEMU. |
69 | - * technically the underlying exception is a MemManage or BusFault | 51 | |
70 | + * technically the underlying exception is a SecureFault or BusFault | 52 | -Contents: |
71 | * that is escalated to HardFault.) This is a terminal exception, | 53 | - |
72 | * so we will either take the HardFault immediately or else enter | 54 | .. toctree:: |
73 | * lockup (the latter case is handled in armv7m_nvic_set_pending_derived()). | 55 | :maxdepth: 2 |
74 | + * The HardFault is Secure if BFHFNMINS is 0 (meaning that all HFs are | 56 | |
75 | + * secure); otherwise it targets the same security state as the | 57 | diff --git a/docs/system/index.rst b/docs/system/index.rst |
76 | + * underlying exception. | 58 | index XXXXXXX..XXXXXXX 100644 |
77 | */ | 59 | --- a/docs/system/index.rst |
78 | - exc_secure = targets_secure || | 60 | +++ b/docs/system/index.rst |
79 | - !(cpu->env.v7m.aircr & R_V7M_AIRCR_BFHFNMINS_MASK); | 61 | @@ -XXX,XX +XXX,XX @@ for full system emulation (as opposed to user-mode emulation). |
80 | + if (!(cpu->env.v7m.aircr & R_V7M_AIRCR_BFHFNMINS_MASK)) { | 62 | This includes working with hypervisors such as KVM, Xen, Hax |
81 | + exc_secure = true; | 63 | or Hypervisor.Framework. |
82 | + } | 64 | |
83 | env->v7m.hfsr |= R_V7M_HFSR_VECTTBL_MASK | R_V7M_HFSR_FORCED_MASK; | 65 | -Contents: |
84 | armv7m_nvic_set_pending_derived(env->nvic, ARMV7M_EXCP_HARD, exc_secure); | 66 | - |
85 | return false; | 67 | .. toctree:: |
68 | :maxdepth: 3 | ||
69 | |||
70 | diff --git a/docs/tools/index.rst b/docs/tools/index.rst | ||
71 | index XXXXXXX..XXXXXXX 100644 | ||
72 | --- a/docs/tools/index.rst | ||
73 | +++ b/docs/tools/index.rst | ||
74 | @@ -XXX,XX +XXX,XX @@ Tools | ||
75 | This section of the manual documents QEMU's "tools": its | ||
76 | command line utilities and other standalone programs. | ||
77 | |||
78 | -Contents: | ||
79 | - | ||
80 | .. toctree:: | ||
81 | :maxdepth: 2 | ||
82 | |||
83 | diff --git a/docs/user/index.rst b/docs/user/index.rst | ||
84 | index XXXXXXX..XXXXXXX 100644 | ||
85 | --- a/docs/user/index.rst | ||
86 | +++ b/docs/user/index.rst | ||
87 | @@ -XXX,XX +XXX,XX @@ This section of the manual is the overall guide for users using QEMU | ||
88 | for user-mode emulation. In this mode, QEMU can launch | ||
89 | processes compiled for one CPU on another CPU. | ||
90 | |||
91 | -Contents: | ||
92 | - | ||
93 | .. toctree:: | ||
94 | :maxdepth: 2 | ||
95 | |||
86 | -- | 96 | -- |
87 | 2.20.1 | 97 | 2.20.1 |
88 | 98 | ||
89 | 99 | diff view generated by jsdifflib |
1 | The PL031 RTC tracks the difference between the guest RTC | 1 | Now that we have a single Sphinx manual rather than multiple manuals, |
---|---|---|---|
2 | and the host RTC using a tick_offset field. For migration, | 2 | we can provide a better place for "common to all of QEMU" information |
3 | however, we currently always migrate the offset between | 3 | like the deprecation notices, build platforms, license information, |
4 | the guest and the vm_clock, even if the RTC clock is not | 4 | which we currently have in the system/ manual even though it applies |
5 | the same as the vm_clock; this was an attempt to retain | 5 | to all of QEMU. |
6 | migration backwards compatibility. | ||
7 | 6 | ||
8 | Unfortunately this results in the RTC behaving oddly across | 7 | Create a new directory about/ on the same level as system/, user/, |
9 | a VM state save and restore -- since the VM clock stands still | 8 | etc, and move these documents there. |
10 | across save-then-restore, regardless of how much real world | ||
11 | time has elapsed, the guest RTC ends up out of sync with the | ||
12 | host RTC in the restored VM. | ||
13 | 9 | ||
14 | Fix this by migrating the raw tick_offset. To retain migration | 10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
15 | compatibility as far as possible, we have a new property | 11 | Acked-by: Markus Armbruster <armbru@redhat.com> |
16 | migrate-tick-offset; by default this is 'true' and we will | 12 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
17 | migrate the true tick offset in a new subsection; if the | 13 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
18 | incoming data has no subsection we fall back to the old | 14 | Message-id: 20210705095547.15790-5-peter.maydell@linaro.org |
19 | vm_clock-based offset information, so old->new migration | 15 | --- |
20 | compatibility is preserved. For complete new->old migration | 16 | docs/{system => about}/build-platforms.rst | 0 |
21 | compatibility, the property is set to 'false' for 4.0 and | 17 | docs/{system => about}/deprecated.rst | 0 |
22 | earlier machine types (this will only affect 'virt-4.0' | 18 | docs/about/index.rst | 10 ++++++++++ |
23 | and below, as none of the other pl031-using machines are | 19 | docs/{system => about}/license.rst | 0 |
24 | versioned). | 20 | docs/{system => about}/removed-features.rst | 0 |
21 | docs/index.rst | 1 + | ||
22 | docs/system/index.rst | 4 ---- | ||
23 | 7 files changed, 11 insertions(+), 4 deletions(-) | ||
24 | rename docs/{system => about}/build-platforms.rst (100%) | ||
25 | rename docs/{system => about}/deprecated.rst (100%) | ||
26 | create mode 100644 docs/about/index.rst | ||
27 | rename docs/{system => about}/license.rst (100%) | ||
28 | rename docs/{system => about}/removed-features.rst (100%) | ||
25 | 29 | ||
26 | Reported-by: Russell King <rmk@armlinux.org.uk> | 30 | diff --git a/docs/system/build-platforms.rst b/docs/about/build-platforms.rst |
27 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 31 | similarity index 100% |
28 | Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> | 32 | rename from docs/system/build-platforms.rst |
29 | Message-id: 20190709143912.28905-1-peter.maydell@linaro.org | 33 | rename to docs/about/build-platforms.rst |
30 | --- | 34 | diff --git a/docs/system/deprecated.rst b/docs/about/deprecated.rst |
31 | include/hw/timer/pl031.h | 2 + | 35 | similarity index 100% |
32 | hw/core/machine.c | 1 + | 36 | rename from docs/system/deprecated.rst |
33 | hw/timer/pl031.c | 92 ++++++++++++++++++++++++++++++++++++++-- | 37 | rename to docs/about/deprecated.rst |
34 | 3 files changed, 91 insertions(+), 4 deletions(-) | 38 | diff --git a/docs/about/index.rst b/docs/about/index.rst |
35 | 39 | new file mode 100644 | |
36 | diff --git a/include/hw/timer/pl031.h b/include/hw/timer/pl031.h | 40 | index XXXXXXX..XXXXXXX |
41 | --- /dev/null | ||
42 | +++ b/docs/about/index.rst | ||
43 | @@ -XXX,XX +XXX,XX @@ | ||
44 | +About QEMU | ||
45 | +========== | ||
46 | + | ||
47 | +.. toctree:: | ||
48 | + :maxdepth: 2 | ||
49 | + | ||
50 | + build-platforms | ||
51 | + deprecated | ||
52 | + removed-features | ||
53 | + license | ||
54 | diff --git a/docs/system/license.rst b/docs/about/license.rst | ||
55 | similarity index 100% | ||
56 | rename from docs/system/license.rst | ||
57 | rename to docs/about/license.rst | ||
58 | diff --git a/docs/system/removed-features.rst b/docs/about/removed-features.rst | ||
59 | similarity index 100% | ||
60 | rename from docs/system/removed-features.rst | ||
61 | rename to docs/about/removed-features.rst | ||
62 | diff --git a/docs/index.rst b/docs/index.rst | ||
37 | index XXXXXXX..XXXXXXX 100644 | 63 | index XXXXXXX..XXXXXXX 100644 |
38 | --- a/include/hw/timer/pl031.h | 64 | --- a/docs/index.rst |
39 | +++ b/include/hw/timer/pl031.h | 65 | +++ b/docs/index.rst |
40 | @@ -XXX,XX +XXX,XX @@ typedef struct PL031State { | 66 | @@ -XXX,XX +XXX,XX @@ Welcome to QEMU's documentation! |
41 | */ | 67 | :maxdepth: 2 |
42 | uint32_t tick_offset_vmstate; | 68 | :caption: Contents: |
43 | uint32_t tick_offset; | 69 | |
44 | + bool tick_offset_migrated; | 70 | + about/index |
45 | + bool migrate_tick_offset; | 71 | system/index |
46 | 72 | user/index | |
47 | uint32_t mr; | 73 | tools/index |
48 | uint32_t lr; | 74 | diff --git a/docs/system/index.rst b/docs/system/index.rst |
49 | diff --git a/hw/core/machine.c b/hw/core/machine.c | ||
50 | index XXXXXXX..XXXXXXX 100644 | 75 | index XXXXXXX..XXXXXXX 100644 |
51 | --- a/hw/core/machine.c | 76 | --- a/docs/system/index.rst |
52 | +++ b/hw/core/machine.c | 77 | +++ b/docs/system/index.rst |
53 | @@ -XXX,XX +XXX,XX @@ GlobalProperty hw_compat_4_0[] = { | 78 | @@ -XXX,XX +XXX,XX @@ or Hypervisor.Framework. |
54 | { "virtio-gpu-pci", "edid", "false" }, | 79 | targets |
55 | { "virtio-device", "use-started", "false" }, | 80 | security |
56 | { "virtio-balloon-device", "qemu-4-0-config-size", "true" }, | 81 | multi-process |
57 | + { "pl031", "migrate-tick-offset", "false" }, | 82 | - deprecated |
58 | }; | 83 | - removed-features |
59 | const size_t hw_compat_4_0_len = G_N_ELEMENTS(hw_compat_4_0); | 84 | - build-platforms |
60 | 85 | - license | |
61 | diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c | ||
62 | index XXXXXXX..XXXXXXX 100644 | ||
63 | --- a/hw/timer/pl031.c | ||
64 | +++ b/hw/timer/pl031.c | ||
65 | @@ -XXX,XX +XXX,XX @@ static int pl031_pre_save(void *opaque) | ||
66 | { | ||
67 | PL031State *s = opaque; | ||
68 | |||
69 | - /* tick_offset is base_time - rtc_clock base time. Instead, we want to | ||
70 | - * store the base time relative to the QEMU_CLOCK_VIRTUAL for backwards-compatibility. */ | ||
71 | + /* | ||
72 | + * The PL031 device model code uses the tick_offset field, which is | ||
73 | + * the offset between what the guest RTC should read and what the | ||
74 | + * QEMU rtc_clock reads: | ||
75 | + * guest_rtc = rtc_clock + tick_offset | ||
76 | + * and so | ||
77 | + * tick_offset = guest_rtc - rtc_clock | ||
78 | + * | ||
79 | + * We want to migrate this offset, which sounds straightforward. | ||
80 | + * Unfortunately older versions of QEMU migrated a conversion of this | ||
81 | + * offset into an offset from the vm_clock. (This was in turn an | ||
82 | + * attempt to be compatible with even older QEMU versions, but it | ||
83 | + * has incorrect behaviour if the rtc_clock is not the same as the | ||
84 | + * vm_clock.) So we put the actual tick_offset into a migration | ||
85 | + * subsection, and the backwards-compatible time-relative-to-vm_clock | ||
86 | + * in the main migration state. | ||
87 | + * | ||
88 | + * Calculate base time relative to QEMU_CLOCK_VIRTUAL: | ||
89 | + */ | ||
90 | int64_t delta = qemu_clock_get_ns(rtc_clock) - qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); | ||
91 | s->tick_offset_vmstate = s->tick_offset + delta / NANOSECONDS_PER_SECOND; | ||
92 | |||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | +static int pl031_pre_load(void *opaque) | ||
97 | +{ | ||
98 | + PL031State *s = opaque; | ||
99 | + | ||
100 | + s->tick_offset_migrated = false; | ||
101 | + return 0; | ||
102 | +} | ||
103 | + | ||
104 | static int pl031_post_load(void *opaque, int version_id) | ||
105 | { | ||
106 | PL031State *s = opaque; | ||
107 | |||
108 | - int64_t delta = qemu_clock_get_ns(rtc_clock) - qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); | ||
109 | - s->tick_offset = s->tick_offset_vmstate - delta / NANOSECONDS_PER_SECOND; | ||
110 | + /* | ||
111 | + * If we got the tick_offset subsection, then we can just use | ||
112 | + * the value in that. Otherwise the source is an older QEMU and | ||
113 | + * has given us the offset from the vm_clock; convert it back to | ||
114 | + * an offset from the rtc_clock. This will cause time to incorrectly | ||
115 | + * go backwards compared to the host RTC, but this is unavoidable. | ||
116 | + */ | ||
117 | + | ||
118 | + if (!s->tick_offset_migrated) { | ||
119 | + int64_t delta = qemu_clock_get_ns(rtc_clock) - | ||
120 | + qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); | ||
121 | + s->tick_offset = s->tick_offset_vmstate - | ||
122 | + delta / NANOSECONDS_PER_SECOND; | ||
123 | + } | ||
124 | pl031_set_alarm(s); | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | +static int pl031_tick_offset_post_load(void *opaque, int version_id) | ||
129 | +{ | ||
130 | + PL031State *s = opaque; | ||
131 | + | ||
132 | + s->tick_offset_migrated = true; | ||
133 | + return 0; | ||
134 | +} | ||
135 | + | ||
136 | +static bool pl031_tick_offset_needed(void *opaque) | ||
137 | +{ | ||
138 | + PL031State *s = opaque; | ||
139 | + | ||
140 | + return s->migrate_tick_offset; | ||
141 | +} | ||
142 | + | ||
143 | +static const VMStateDescription vmstate_pl031_tick_offset = { | ||
144 | + .name = "pl031/tick-offset", | ||
145 | + .version_id = 1, | ||
146 | + .minimum_version_id = 1, | ||
147 | + .needed = pl031_tick_offset_needed, | ||
148 | + .post_load = pl031_tick_offset_post_load, | ||
149 | + .fields = (VMStateField[]) { | ||
150 | + VMSTATE_UINT32(tick_offset, PL031State), | ||
151 | + VMSTATE_END_OF_LIST() | ||
152 | + } | ||
153 | +}; | ||
154 | + | ||
155 | static const VMStateDescription vmstate_pl031 = { | ||
156 | .name = "pl031", | ||
157 | .version_id = 1, | ||
158 | .minimum_version_id = 1, | ||
159 | .pre_save = pl031_pre_save, | ||
160 | + .pre_load = pl031_pre_load, | ||
161 | .post_load = pl031_post_load, | ||
162 | .fields = (VMStateField[]) { | ||
163 | VMSTATE_UINT32(tick_offset_vmstate, PL031State), | ||
164 | @@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_pl031 = { | ||
165 | VMSTATE_UINT32(im, PL031State), | ||
166 | VMSTATE_UINT32(is, PL031State), | ||
167 | VMSTATE_END_OF_LIST() | ||
168 | + }, | ||
169 | + .subsections = (const VMStateDescription*[]) { | ||
170 | + &vmstate_pl031_tick_offset, | ||
171 | + NULL | ||
172 | } | ||
173 | }; | ||
174 | |||
175 | +static Property pl031_properties[] = { | ||
176 | + /* | ||
177 | + * True to correctly migrate the tick offset of the RTC. False to | ||
178 | + * obtain backward migration compatibility with older QEMU versions, | ||
179 | + * at the expense of the guest RTC going backwards compared with the | ||
180 | + * host RTC when the VM is saved/restored if using -rtc host. | ||
181 | + * (Even if set to 'true' older QEMU can migrate forward to newer QEMU; | ||
182 | + * 'false' also permits newer QEMU to migrate to older QEMU.) | ||
183 | + */ | ||
184 | + DEFINE_PROP_BOOL("migrate-tick-offset", | ||
185 | + PL031State, migrate_tick_offset, true), | ||
186 | + DEFINE_PROP_END_OF_LIST() | ||
187 | +}; | ||
188 | + | ||
189 | static void pl031_class_init(ObjectClass *klass, void *data) | ||
190 | { | ||
191 | DeviceClass *dc = DEVICE_CLASS(klass); | ||
192 | |||
193 | dc->vmsd = &vmstate_pl031; | ||
194 | + dc->props = pl031_properties; | ||
195 | } | ||
196 | |||
197 | static const TypeInfo pl031_info = { | ||
198 | -- | 86 | -- |
199 | 2.20.1 | 87 | 2.20.1 |
200 | 88 | ||
201 | 89 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | 1 | Add some text to About to act as a brief introduction to the QEMU |
---|---|---|---|
2 | manual and to make the about page a bit less of an abrupt start to | ||
3 | it. | ||
2 | 4 | ||
3 | In the previous commit we fixed a crash when the guest read a | 5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | register that pop from an empty FIFO. | 6 | Acked-by: Markus Armbruster <armbru@redhat.com> |
5 | By auditing the repository, we found another similar use with | 7 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
6 | an easy way to reproduce: | 8 | Message-id: 20210705095547.15790-6-peter.maydell@linaro.org |
9 | --- | ||
10 | docs/about/index.rst | 17 +++++++++++++++++ | ||
11 | 1 file changed, 17 insertions(+) | ||
7 | 12 | ||
8 | $ qemu-system-aarch64 -M xlnx-zcu102 -monitor stdio -S | 13 | diff --git a/docs/about/index.rst b/docs/about/index.rst |
9 | QEMU 4.0.50 monitor - type 'help' for more information | ||
10 | (qemu) xp/b 0xfd4a0134 | ||
11 | Aborted (core dumped) | ||
12 | |||
13 | (gdb) bt | ||
14 | #0 0x00007f6936dea57f in raise () at /lib64/libc.so.6 | ||
15 | #1 0x00007f6936dd4895 in abort () at /lib64/libc.so.6 | ||
16 | #2 0x0000561ad32975ec in xlnx_dp_aux_pop_rx_fifo (s=0x7f692babee70) at hw/display/xlnx_dp.c:431 | ||
17 | #3 0x0000561ad3297dc0 in xlnx_dp_read (opaque=0x7f692babee70, offset=77, size=4) at hw/display/xlnx_dp.c:667 | ||
18 | #4 0x0000561ad321b896 in memory_region_read_accessor (mr=0x7f692babf620, addr=308, value=0x7ffe05c1db88, size=4, shift=0, mask=4294967295, attrs=...) at memory.c:439 | ||
19 | #5 0x0000561ad321bd70 in access_with_adjusted_size (addr=308, value=0x7ffe05c1db88, size=1, access_size_min=4, access_size_max=4, access_fn=0x561ad321b858 <memory_region_read_accessor>, mr=0x7f692babf620, attrs=...) at memory.c:569 | ||
20 | #6 0x0000561ad321e9d5 in memory_region_dispatch_read1 (mr=0x7f692babf620, addr=308, pval=0x7ffe05c1db88, size=1, attrs=...) at memory.c:1420 | ||
21 | #7 0x0000561ad321ea9d in memory_region_dispatch_read (mr=0x7f692babf620, addr=308, pval=0x7ffe05c1db88, size=1, attrs=...) at memory.c:1447 | ||
22 | #8 0x0000561ad31bd742 in flatview_read_continue (fv=0x561ad69c04f0, addr=4249485620, attrs=..., buf=0x7ffe05c1dcf0 "\020\335\301\005\376\177", len=1, addr1=308, l=1, mr=0x7f692babf620) at exec.c:3385 | ||
23 | #9 0x0000561ad31bd895 in flatview_read (fv=0x561ad69c04f0, addr=4249485620, attrs=..., buf=0x7ffe05c1dcf0 "\020\335\301\005\376\177", len=1) at exec.c:3423 | ||
24 | #10 0x0000561ad31bd90b in address_space_read_full (as=0x561ad5bb3020, addr=4249485620, attrs=..., buf=0x7ffe05c1dcf0 "\020\335\301\005\376\177", len=1) at exec.c:3436 | ||
25 | #11 0x0000561ad33b1c42 in address_space_read (len=1, buf=0x7ffe05c1dcf0 "\020\335\301\005\376\177", attrs=..., addr=4249485620, as=0x561ad5bb3020) at include/exec/memory.h:2131 | ||
26 | #12 0x0000561ad33b1c42 in memory_dump (mon=0x561ad59c4530, count=1, format=120, wsize=1, addr=4249485620, is_physical=1) at monitor/misc.c:723 | ||
27 | #13 0x0000561ad33b1fc1 in hmp_physical_memory_dump (mon=0x561ad59c4530, qdict=0x561ad6c6fd00) at monitor/misc.c:795 | ||
28 | #14 0x0000561ad37b4a9f in handle_hmp_command (mon=0x561ad59c4530, cmdline=0x561ad59d0f22 "/b 0x00000000fd4a0134") at monitor/hmp.c:1082 | ||
29 | |||
30 | Fix by checking the FIFO is not empty before popping from it. | ||
31 | |||
32 | The datasheet is not clear about the reset value of this register, | ||
33 | we choose to return '0'. | ||
34 | |||
35 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
36 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | ||
37 | Message-id: 20190709113715.7761-4-philmd@redhat.com | ||
38 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
39 | --- | ||
40 | hw/display/xlnx_dp.c | 15 +++++++++++---- | ||
41 | 1 file changed, 11 insertions(+), 4 deletions(-) | ||
42 | |||
43 | diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c | ||
44 | index XXXXXXX..XXXXXXX 100644 | 14 | index XXXXXXX..XXXXXXX 100644 |
45 | --- a/hw/display/xlnx_dp.c | 15 | --- a/docs/about/index.rst |
46 | +++ b/hw/display/xlnx_dp.c | 16 | +++ b/docs/about/index.rst |
47 | @@ -XXX,XX +XXX,XX @@ static uint8_t xlnx_dp_aux_pop_rx_fifo(XlnxDPState *s) | 17 | @@ -XXX,XX +XXX,XX @@ |
48 | uint8_t ret; | 18 | About QEMU |
49 | 19 | ========== | |
50 | if (fifo8_is_empty(&s->rx_fifo)) { | 20 | |
51 | - DPRINTF("rx_fifo underflow..\n"); | 21 | +QEMU is a generic and open source machine emulator and virtualizer. |
52 | - abort(); | 22 | + |
53 | + qemu_log_mask(LOG_GUEST_ERROR, | 23 | +QEMU can be used in several different ways. The most common is for |
54 | + "%s: Reading empty RX_FIFO\n", | 24 | +"system emulation", where it provides a virtual model of an |
55 | + __func__); | 25 | +entire machine (CPU, memory and emulated devices) to run a guest OS. |
56 | + /* | 26 | +In this mode the CPU may be fully emulated, or it may work with |
57 | + * The datasheet is not clear about the reset value, it seems | 27 | +a hypervisor such as KVM, Xen, Hax or Hypervisor.Framework to |
58 | + * to be unspecified. We choose to return '0'. | 28 | +allow the guest to run directly on the host CPU. |
59 | + */ | 29 | + |
60 | + ret = 0; | 30 | +The second supported way to use QEMU is "user mode emulation", |
61 | + } else { | 31 | +where QEMU can launch processes compiled for one CPU on another CPU. |
62 | + ret = fifo8_pop(&s->rx_fifo); | 32 | +In this mode the CPU is always emulated. |
63 | + DPRINTF("pop 0x%" PRIX8 " from rx_fifo.\n", ret); | 33 | + |
64 | } | 34 | +QEMU also provides a number of standalone commandline utilities, |
65 | - ret = fifo8_pop(&s->rx_fifo); | 35 | +such as the `qemu-img` disk image utility that allows you to create, |
66 | - DPRINTF("pop 0x%" PRIX8 " from rx_fifo.\n", ret); | 36 | +convert and modify disk images. |
67 | return ret; | 37 | + |
68 | } | 38 | .. toctree:: |
39 | :maxdepth: 2 | ||
69 | 40 | ||
70 | -- | 41 | -- |
71 | 2.20.1 | 42 | 2.20.1 |
72 | 43 | ||
73 | 44 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | 1 | The standard Sphinx/RTD HTML page footer gives a copyright line |
---|---|---|---|
2 | (based on the 'copyright' variable set in conf.py) and a line "Built | ||
3 | with Sphinx using a theme provided by Read the Docs" (which can be | ||
4 | disabled via the html_show_sphinx variable, but we leave it enabled). | ||
5 | As a free software project, we'd like to also mention the license | ||
6 | QEMU and its manual are released under. | ||
2 | 7 | ||
3 | Reading the RX_DATA register when the RX_FIFO is empty triggers | 8 | Add a template footer.html which defines the 'extrafooter' block that |
4 | an abort. This can be easily reproduced: | 9 | the RtD theme provides for this purpose. The new line of text will |
10 | go below the existing copyright and sphinx-acknowledgement lines. | ||
11 | (Unfortunately the RTD footer template does not permit putting it | ||
12 | after the copyright but before the sphinx-acknowledgement.) | ||
5 | 13 | ||
6 | $ qemu-system-arm -M emcraft-sf2 -monitor stdio -S | 14 | We use the templating functionality to make the new text also be a |
7 | QEMU 4.0.50 monitor - type 'help' for more information | 15 | hyperlink to the about/license.html page of the manual. |
8 | (qemu) x 0x40001010 | ||
9 | Aborted (core dumped) | ||
10 | 16 | ||
11 | (gdb) bt | 17 | Unlike rst files, HTML template files are not reported to our depfile |
12 | #1 0x00007f035874f895 in abort () at /lib64/libc.so.6 | 18 | plugin, so we maintain a manual list in meson.build. New template |
13 | #2 0x00005628686591ff in fifo8_pop (fifo=0x56286a9a4c68) at util/fifo8.c:66 | 19 | files should be rare, so not being able to auto-generate the |
14 | #3 0x00005628683e0b8e in fifo32_pop (fifo=0x56286a9a4c68) at include/qemu/fifo32.h:137 | 20 | dependency info is not too awkward. |
15 | #4 0x00005628683e0efb in spi_read (opaque=0x56286a9a4850, addr=4, size=4) at hw/ssi/mss-spi.c:168 | ||
16 | #5 0x0000562867f96801 in memory_region_read_accessor (mr=0x56286a9a4b60, addr=16, value=0x7ffeecb0c5c8, size=4, shift=0, mask=4294967295, attrs=...) at memory.c:439 | ||
17 | #6 0x0000562867f96cdb in access_with_adjusted_size (addr=16, value=0x7ffeecb0c5c8, size=4, access_size_min=1, access_size_max=4, access_fn=0x562867f967c3 <memory_region_read_accessor>, mr=0x56286a9a4b60, attrs=...) at memory.c:569 | ||
18 | #7 0x0000562867f99940 in memory_region_dispatch_read1 (mr=0x56286a9a4b60, addr=16, pval=0x7ffeecb0c5c8, size=4, attrs=...) at memory.c:1420 | ||
19 | #8 0x0000562867f99a08 in memory_region_dispatch_read (mr=0x56286a9a4b60, addr=16, pval=0x7ffeecb0c5c8, size=4, attrs=...) at memory.c:1447 | ||
20 | #9 0x0000562867f38721 in flatview_read_continue (fv=0x56286aec6360, addr=1073745936, attrs=..., buf=0x7ffeecb0c7c0 "\340ǰ\354\376\177", len=4, addr1=16, l=4, mr=0x56286a9a4b60) at exec.c:3385 | ||
21 | #10 0x0000562867f38874 in flatview_read (fv=0x56286aec6360, addr=1073745936, attrs=..., buf=0x7ffeecb0c7c0 "\340ǰ\354\376\177", len=4) at exec.c:3423 | ||
22 | #11 0x0000562867f388ea in address_space_read_full (as=0x56286aa3e890, addr=1073745936, attrs=..., buf=0x7ffeecb0c7c0 "\340ǰ\354\376\177", len=4) at exec.c:3436 | ||
23 | #12 0x0000562867f389c5 in address_space_rw (as=0x56286aa3e890, addr=1073745936, attrs=..., buf=0x7ffeecb0c7c0 "\340ǰ\354\376\177", len=4, is_write=false) at exec.c:3466 | ||
24 | #13 0x0000562867f3bdd7 in cpu_memory_rw_debug (cpu=0x56286aa19d00, addr=1073745936, buf=0x7ffeecb0c7c0 "\340ǰ\354\376\177", len=4, is_write=0) at exec.c:3976 | ||
25 | #14 0x000056286811ed51 in memory_dump (mon=0x56286a8c32d0, count=1, format=120, wsize=4, addr=1073745936, is_physical=0) at monitor/misc.c:730 | ||
26 | #15 0x000056286811eff1 in hmp_memory_dump (mon=0x56286a8c32d0, qdict=0x56286b15c400) at monitor/misc.c:785 | ||
27 | #16 0x00005628684740ee in handle_hmp_command (mon=0x56286a8c32d0, cmdline=0x56286a8caeb2 "0x40001010") at monitor/hmp.c:1082 | ||
28 | 21 | ||
29 | From the datasheet "Actel SmartFusion Microcontroller Subsystem | 22 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
30 | User's Guide" Rev.1, Table 13-3 "SPI Register Summary", this | 23 | Acked-by: Markus Armbruster <armbru@redhat.com> |
31 | register has a reset value of 0. | 24 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
25 | Message-id: 20210705095547.15790-7-peter.maydell@linaro.org | ||
26 | --- | ||
27 | docs/_templates/footer.html | 12 ++++++++++++ | ||
28 | docs/meson.build | 3 ++- | ||
29 | MAINTAINERS | 1 + | ||
30 | 3 files changed, 15 insertions(+), 1 deletion(-) | ||
31 | create mode 100644 docs/_templates/footer.html | ||
32 | 32 | ||
33 | Check the FIFO is not empty before accessing it, else log an | 33 | diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html |
34 | error message. | 34 | new file mode 100644 |
35 | 35 | index XXXXXXX..XXXXXXX | |
36 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 36 | --- /dev/null |
37 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 37 | +++ b/docs/_templates/footer.html |
38 | Message-id: 20190709113715.7761-3-philmd@redhat.com | 38 | @@ -XXX,XX +XXX,XX @@ |
39 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 39 | +{% extends "!footer.html" %} |
40 | --- | 40 | +{% block extrafooter %} |
41 | hw/ssi/mss-spi.c | 8 +++++++- | 41 | + |
42 | 1 file changed, 7 insertions(+), 1 deletion(-) | 42 | +<!-- Empty para to force a blank line after "Built with Sphinx ..." --> |
43 | 43 | +<p></p> | |
44 | diff --git a/hw/ssi/mss-spi.c b/hw/ssi/mss-spi.c | 44 | + |
45 | +{% trans path=pathto('about/license') %} | ||
46 | +<p><a href="{{ path }}">QEMU and this manual are released under the | ||
47 | +GNU General Public License, version 2.</a></p> | ||
48 | +{% endtrans %} | ||
49 | +{{ super() }} | ||
50 | +{% endblock %} | ||
51 | diff --git a/docs/meson.build b/docs/meson.build | ||
45 | index XXXXXXX..XXXXXXX 100644 | 52 | index XXXXXXX..XXXXXXX 100644 |
46 | --- a/hw/ssi/mss-spi.c | 53 | --- a/docs/meson.build |
47 | +++ b/hw/ssi/mss-spi.c | 54 | +++ b/docs/meson.build |
48 | @@ -XXX,XX +XXX,XX @@ spi_read(void *opaque, hwaddr addr, unsigned int size) | 55 | @@ -XXX,XX +XXX,XX @@ if build_docs |
49 | case R_SPI_RX: | 56 | meson.source_root() / 'docs/sphinx/qapidoc.py', |
50 | s->regs[R_SPI_STATUS] &= ~S_RXFIFOFUL; | 57 | meson.source_root() / 'docs/sphinx/qmp_lexer.py', |
51 | s->regs[R_SPI_STATUS] &= ~S_RXCHOVRF; | 58 | qapi_gen_depends ] |
52 | - ret = fifo32_pop(&s->rx_fifo); | 59 | + sphinx_template_files = [ meson.source_root() / 'docs/_templates/footer.html' ] |
53 | + if (fifo32_is_empty(&s->rx_fifo)) { | 60 | |
54 | + qemu_log_mask(LOG_GUEST_ERROR, | 61 | have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT') |
55 | + "%s: Reading empty RX_FIFO\n", | 62 | |
56 | + __func__); | 63 | @@ -XXX,XX +XXX,XX @@ if build_docs |
57 | + } else { | 64 | output: 'docs.stamp', |
58 | + ret = fifo32_pop(&s->rx_fifo); | 65 | input: files('conf.py'), |
59 | + } | 66 | depfile: 'docs.d', |
60 | if (fifo32_is_empty(&s->rx_fifo)) { | 67 | - depend_files: sphinx_extn_depends, |
61 | s->regs[R_SPI_STATUS] |= S_RXFIFOEMP; | 68 | + depend_files: [ sphinx_extn_depends, sphinx_template_files ], |
62 | } | 69 | command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@', |
70 | '-Ddepfile_stamp=@OUTPUT0@', | ||
71 | '-b', 'html', '-d', private_dir, | ||
72 | diff --git a/MAINTAINERS b/MAINTAINERS | ||
73 | index XXXXXXX..XXXXXXX 100644 | ||
74 | --- a/MAINTAINERS | ||
75 | +++ b/MAINTAINERS | ||
76 | @@ -XXX,XX +XXX,XX @@ S: Maintained | ||
77 | F: docs/conf.py | ||
78 | F: docs/*/conf.py | ||
79 | F: docs/sphinx/ | ||
80 | +F: docs/_templates/ | ||
81 | |||
82 | Miscellaneous | ||
83 | ------------- | ||
63 | -- | 84 | -- |
64 | 2.20.1 | 85 | 2.20.1 |
65 | 86 | ||
66 | 87 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | 1 | Add a line to the HTML document footer mentioning the QEMU version. |
---|---|---|---|
2 | The version information is already provided in very faint text below | ||
3 | the QEMU logo in the sidebar, but that is rather inconspicious, so | ||
4 | repeating it in the footer seems useful. | ||
2 | 5 | ||
3 | Both lqspi_read() and lqspi_load_cache() expect a 32-bit | 6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | aligned address. | 7 | Acked-by: Markus Armbruster <armbru@redhat.com> |
8 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
9 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
10 | Message-id: 20210705095547.15790-8-peter.maydell@linaro.org | ||
11 | --- | ||
12 | docs/_templates/footer.html | 2 ++ | ||
13 | 1 file changed, 2 insertions(+) | ||
5 | 14 | ||
6 | >From UG1085 datasheet [*] chapter on 'Quad-SPI Controller': | 15 | diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html |
7 | |||
8 | Transfer Size Limitations | ||
9 | |||
10 | Because of the 32-bit wide TX, RX, and generic FIFO, all | ||
11 | APB/AXI transfers must be an integer multiple of 4-bytes. | ||
12 | Shorter transfers are not possible. | ||
13 | |||
14 | Set MemoryRegionOps.impl values to force 32-bit accesses, | ||
15 | this way we are sure we do not access the lqspi_buf[] array | ||
16 | out of bound. | ||
17 | |||
18 | [*] https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf | ||
19 | |||
20 | Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com> | ||
21 | Tested-by: Francisco Iglesias <frasse.iglesias@gmail.com> | ||
22 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
23 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
24 | --- | ||
25 | hw/ssi/xilinx_spips.c | 4 ++++ | ||
26 | 1 file changed, 4 insertions(+) | ||
27 | |||
28 | diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c | ||
29 | index XXXXXXX..XXXXXXX 100644 | 16 | index XXXXXXX..XXXXXXX 100644 |
30 | --- a/hw/ssi/xilinx_spips.c | 17 | --- a/docs/_templates/footer.html |
31 | +++ b/hw/ssi/xilinx_spips.c | 18 | +++ b/docs/_templates/footer.html |
32 | @@ -XXX,XX +XXX,XX @@ static const MemoryRegionOps lqspi_ops = { | 19 | @@ -XXX,XX +XXX,XX @@ |
33 | .read_with_attrs = lqspi_read, | 20 | <!-- Empty para to force a blank line after "Built with Sphinx ..." --> |
34 | .write_with_attrs = lqspi_write, | 21 | <p></p> |
35 | .endianness = DEVICE_NATIVE_ENDIAN, | 22 | |
36 | + .impl = { | 23 | +<p>This documentation is for QEMU version {{ version }}.</p> |
37 | + .min_access_size = 4, | 24 | + |
38 | + .max_access_size = 4, | 25 | {% trans path=pathto('about/license') %} |
39 | + }, | 26 | <p><a href="{{ path }}">QEMU and this manual are released under the |
40 | .valid = { | 27 | GNU General Public License, version 2.</a></p> |
41 | .min_access_size = 1, | ||
42 | .max_access_size = 4 | ||
43 | -- | 28 | -- |
44 | 2.20.1 | 29 | 2.20.1 |
45 | 30 | ||
46 | 31 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | 1 | Add skeletal documentation of the cubieboard machine. |
---|---|---|---|
2 | 2 | ||
3 | Lei Sun found while auditing the code that a CPU write would | 3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | trigger a NULL pointer dereference. | 4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
6 | Message-id: 20210713142226.19155-2-peter.maydell@linaro.org | ||
7 | --- | ||
8 | docs/system/arm/cubieboard.rst | 16 ++++++++++++++++ | ||
9 | docs/system/target-arm.rst | 1 + | ||
10 | MAINTAINERS | 1 + | ||
11 | 3 files changed, 18 insertions(+) | ||
12 | create mode 100644 docs/system/arm/cubieboard.rst | ||
5 | 13 | ||
6 | >From UG1085 datasheet [*] AXI writes in this region are ignored | 14 | diff --git a/docs/system/arm/cubieboard.rst b/docs/system/arm/cubieboard.rst |
7 | and generates an AXI Slave Error (SLVERR). | 15 | new file mode 100644 |
8 | 16 | index XXXXXXX..XXXXXXX | |
9 | Fix by implementing the write_with_attrs() handler. | 17 | --- /dev/null |
10 | Return MEMTX_ERROR when the region is accessed (this error maps | 18 | +++ b/docs/system/arm/cubieboard.rst |
11 | to an AXI slave error). | 19 | @@ -XXX,XX +XXX,XX @@ |
12 | 20 | +Cubietech Cubieboard (``cubieboard``) | |
13 | [*] https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf | 21 | +===================================== |
14 | 22 | + | |
15 | Reported-by: Lei Sun <slei.casper@gmail.com> | 23 | +The ``cubieboard`` model emulates the Cubietech Cubieboard, |
16 | Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com> | 24 | +which is a Cortex-A8 based single-board computer using |
17 | Tested-by: Francisco Iglesias <frasse.iglesias@gmail.com> | 25 | +the AllWinner A10 SoC. |
18 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 26 | + |
19 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 27 | +Emulated devices: |
20 | --- | 28 | + |
21 | hw/ssi/xilinx_spips.c | 16 ++++++++++++++++ | 29 | +- Timer |
22 | 1 file changed, 16 insertions(+) | 30 | +- UART |
23 | 31 | +- RTC | |
24 | diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c | 32 | +- EMAC |
33 | +- SDHCI | ||
34 | +- USB controller | ||
35 | +- SATA controller | ||
36 | diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst | ||
25 | index XXXXXXX..XXXXXXX 100644 | 37 | index XXXXXXX..XXXXXXX 100644 |
26 | --- a/hw/ssi/xilinx_spips.c | 38 | --- a/docs/system/target-arm.rst |
27 | +++ b/hw/ssi/xilinx_spips.c | 39 | +++ b/docs/system/target-arm.rst |
28 | @@ -XXX,XX +XXX,XX @@ static MemTxResult lqspi_read(void *opaque, hwaddr addr, uint64_t *value, | 40 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running |
29 | return lqspi_read(opaque, addr, value, size, attrs); | 41 | arm/aspeed |
30 | } | 42 | arm/sabrelite |
31 | 43 | arm/digic | |
32 | +static MemTxResult lqspi_write(void *opaque, hwaddr offset, uint64_t value, | 44 | + arm/cubieboard |
33 | + unsigned size, MemTxAttrs attrs) | 45 | arm/musicpal |
34 | +{ | 46 | arm/gumstix |
35 | + /* | 47 | arm/nrf |
36 | + * From UG1085, Chapter 24 (Quad-SPI controllers): | 48 | diff --git a/MAINTAINERS b/MAINTAINERS |
37 | + * - Writes are ignored | 49 | index XXXXXXX..XXXXXXX 100644 |
38 | + * - AXI writes generate an external AXI slave error (SLVERR) | 50 | --- a/MAINTAINERS |
39 | + */ | 51 | +++ b/MAINTAINERS |
40 | + qemu_log_mask(LOG_GUEST_ERROR, "%s Unexpected %u-bit access to 0x%" PRIx64 | 52 | @@ -XXX,XX +XXX,XX @@ S: Odd Fixes |
41 | + " (value: 0x%" PRIx64 "\n", | 53 | F: hw/*/allwinner* |
42 | + __func__, size << 3, offset, value); | 54 | F: include/hw/*/allwinner* |
43 | + | 55 | F: hw/arm/cubieboard.c |
44 | + return MEMTX_ERROR; | 56 | +F: docs/system/arm/cubieboard.rst |
45 | +} | 57 | |
46 | + | 58 | Allwinner-h3 |
47 | static const MemoryRegionOps lqspi_ops = { | 59 | M: Niek Linnenbank <nieklinnenbank@gmail.com> |
48 | .read_with_attrs = lqspi_read, | ||
49 | + .write_with_attrs = lqspi_write, | ||
50 | .endianness = DEVICE_NATIVE_ENDIAN, | ||
51 | .valid = { | ||
52 | .min_access_size = 1, | ||
53 | -- | 60 | -- |
54 | 2.20.1 | 61 | 2.20.1 |
55 | 62 | ||
56 | 63 | diff view generated by jsdifflib |
1 | The ARMv5 architecture didn't specify detailed per-feature ID | 1 | Add skeletal documentation of the emcraft-sf2 machine. |
---|---|---|---|
2 | registers. Now that we're using the MVFR0 register fields to | ||
3 | gate the existence of VFP instructions, we need to set up | ||
4 | the correct values in the cpu->isar structure so that we still | ||
5 | provide an FPU to the guest. | ||
6 | 2 | ||
7 | This fixes a regression in the arm926 and arm1026 CPUs, which | ||
8 | are the only ones that both have VFP and are ARMv5 or earlier. | ||
9 | This regression was introduced by the VFP refactoring, and more | ||
10 | specifically by commits 1120827fa182f0e76 and 266bd25c485597c, | ||
11 | which accidentally disabled VFP short-vector support and | ||
12 | double-precision support on these CPUs. | ||
13 | |||
14 | Fixes: 1120827fa182f0e | ||
15 | Fixes: 266bd25c485597c | ||
16 | Fixes: https://bugs.launchpad.net/qemu/+bug/1836192 | ||
17 | Reported-by: Christophe Lyon <christophe.lyon@linaro.org> | ||
18 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
19 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
20 | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> | 5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
21 | Tested-by: Christophe Lyon <christophe.lyon@linaro.org> | 6 | Message-id: 20210713142226.19155-3-peter.maydell@linaro.org |
22 | Message-id: 20190711131241.22231-1-peter.maydell@linaro.org | ||
23 | --- | 7 | --- |
24 | target/arm/cpu.c | 12 ++++++++++++ | 8 | docs/system/arm/emcraft-sf2.rst | 15 +++++++++++++++ |
25 | 1 file changed, 12 insertions(+) | 9 | docs/system/target-arm.rst | 1 + |
10 | MAINTAINERS | 1 + | ||
11 | 3 files changed, 17 insertions(+) | ||
12 | create mode 100644 docs/system/arm/emcraft-sf2.rst | ||
26 | 13 | ||
27 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c | 14 | diff --git a/docs/system/arm/emcraft-sf2.rst b/docs/system/arm/emcraft-sf2.rst |
15 | new file mode 100644 | ||
16 | index XXXXXXX..XXXXXXX | ||
17 | --- /dev/null | ||
18 | +++ b/docs/system/arm/emcraft-sf2.rst | ||
19 | @@ -XXX,XX +XXX,XX @@ | ||
20 | +Emcraft SmartFusion2 SOM kit (``emcraft-sf2``) | ||
21 | +============================================== | ||
22 | + | ||
23 | +The ``emcraft-sf2`` board emulates the SmartFusion2 SOM kit from | ||
24 | +Emcraft (M2S010). This is a System-on-Module from EmCraft systems, | ||
25 | +based on the SmartFusion2 SoC FPGA from Microsemi Corporation. | ||
26 | +The SoC is based on a Cortex-M4 processor. | ||
27 | + | ||
28 | +Emulated devices: | ||
29 | + | ||
30 | +- System timer | ||
31 | +- System registers | ||
32 | +- SPI controller | ||
33 | +- UART | ||
34 | +- EMAC | ||
35 | diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst | ||
28 | index XXXXXXX..XXXXXXX 100644 | 36 | index XXXXXXX..XXXXXXX 100644 |
29 | --- a/target/arm/cpu.c | 37 | --- a/docs/system/target-arm.rst |
30 | +++ b/target/arm/cpu.c | 38 | +++ b/docs/system/target-arm.rst |
31 | @@ -XXX,XX +XXX,XX @@ static void arm926_initfn(Object *obj) | 39 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running |
32 | * set the field to indicate Jazelle support within QEMU. | 40 | arm/sabrelite |
33 | */ | 41 | arm/digic |
34 | cpu->isar.id_isar1 = FIELD_DP32(cpu->isar.id_isar1, ID_ISAR1, JAZELLE, 1); | 42 | arm/cubieboard |
35 | + /* | 43 | + arm/emcraft-sf2 |
36 | + * Similarly, we need to set MVFR0 fields to enable double precision | 44 | arm/musicpal |
37 | + * and short vector support even though ARMv5 doesn't have this register. | 45 | arm/gumstix |
38 | + */ | 46 | arm/nrf |
39 | + cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSHVEC, 1); | 47 | diff --git a/MAINTAINERS b/MAINTAINERS |
40 | + cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPDP, 1); | 48 | index XXXXXXX..XXXXXXX 100644 |
41 | } | 49 | --- a/MAINTAINERS |
42 | 50 | +++ b/MAINTAINERS | |
43 | static void arm946_initfn(Object *obj) | 51 | @@ -XXX,XX +XXX,XX @@ M: Peter Maydell <peter.maydell@linaro.org> |
44 | @@ -XXX,XX +XXX,XX @@ static void arm1026_initfn(Object *obj) | 52 | L: qemu-arm@nongnu.org |
45 | * set the field to indicate Jazelle support within QEMU. | 53 | S: Maintained |
46 | */ | 54 | F: hw/arm/msf2-som.c |
47 | cpu->isar.id_isar1 = FIELD_DP32(cpu->isar.id_isar1, ID_ISAR1, JAZELLE, 1); | 55 | +F: docs/system/arm/emcraft-sf2.rst |
48 | + /* | 56 | |
49 | + * Similarly, we need to set MVFR0 fields to enable double precision | 57 | ASPEED BMCs |
50 | + * and short vector support even though ARMv5 doesn't have this register. | 58 | M: Cédric Le Goater <clg@kaod.org> |
51 | + */ | ||
52 | + cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSHVEC, 1); | ||
53 | + cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPDP, 1); | ||
54 | |||
55 | { | ||
56 | /* The 1026 had an IFAR at c6,c0,0,1 rather than the ARMv6 c6,c0,0,2 */ | ||
57 | -- | 59 | -- |
58 | 2.20.1 | 60 | 2.20.1 |
59 | 61 | ||
60 | 62 | diff view generated by jsdifflib |
1 | From: Alex Bennée <alex.bennee@linaro.org> | 1 | Add skeletal documentation for the highbank and midway machines. |
---|---|---|---|
2 | 2 | ||
3 | When we converted to using feature bits in 602f6e42cfbf we missed out | 3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | the fact (dp && arm_dc_feature(s, ARM_FEATURE_V8)) was supported for | 4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
5 | -cpu max configurations. This caused a regression in the GCC test | 5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
6 | suite. Fix this by setting the appropriate bits in mvfr1.FPHP to | 6 | Message-id: 20210713142226.19155-4-peter.maydell@linaro.org |
7 | report ARMv8-A with FP support (but not ARMv8.2-FP16). | 7 | --- |
8 | docs/system/arm/highbank.rst | 19 +++++++++++++++++++ | ||
9 | docs/system/target-arm.rst | 1 + | ||
10 | MAINTAINERS | 1 + | ||
11 | 3 files changed, 21 insertions(+) | ||
12 | create mode 100644 docs/system/arm/highbank.rst | ||
8 | 13 | ||
9 | Fixes: https://bugs.launchpad.net/qemu/+bug/1836078 | 14 | diff --git a/docs/system/arm/highbank.rst b/docs/system/arm/highbank.rst |
10 | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> | 15 | new file mode 100644 |
11 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 16 | index XXXXXXX..XXXXXXX |
12 | Message-id: 20190711103737.10017-1-alex.bennee@linaro.org | 17 | --- /dev/null |
13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 18 | +++ b/docs/system/arm/highbank.rst |
14 | --- | 19 | @@ -XXX,XX +XXX,XX @@ |
15 | target/arm/cpu.c | 4 ++++ | 20 | +Calxeda Highbank and Midway (``highbank``, ``midway``) |
16 | 1 file changed, 4 insertions(+) | 21 | +====================================================== |
17 | 22 | + | |
18 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c | 23 | +``highbank`` is a model of the Calxeda Highbank (ECX-1000) system, |
24 | +which has four Cortex-A9 cores. | ||
25 | + | ||
26 | +``midway`` is a model of the Calxeda Midway (ECX-2000) system, | ||
27 | +which has four Cortex-A15 cores. | ||
28 | + | ||
29 | +Emulated devices: | ||
30 | + | ||
31 | +- L2x0 cache controller | ||
32 | +- SP804 dual timer | ||
33 | +- PL011 UART | ||
34 | +- PL061 GPIOs | ||
35 | +- PL031 RTC | ||
36 | +- PL022 synchronous serial port controller | ||
37 | +- AHCI | ||
38 | +- XGMAC ethernet controllers | ||
39 | diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst | ||
19 | index XXXXXXX..XXXXXXX 100644 | 40 | index XXXXXXX..XXXXXXX 100644 |
20 | --- a/target/arm/cpu.c | 41 | --- a/docs/system/target-arm.rst |
21 | +++ b/target/arm/cpu.c | 42 | +++ b/docs/system/target-arm.rst |
22 | @@ -XXX,XX +XXX,XX @@ static void arm_max_initfn(Object *obj) | 43 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running |
23 | t = FIELD_DP32(t, ID_ISAR6, SPECRES, 1); | 44 | arm/digic |
24 | cpu->isar.id_isar6 = t; | 45 | arm/cubieboard |
25 | 46 | arm/emcraft-sf2 | |
26 | + t = cpu->isar.mvfr1; | 47 | + arm/highbank |
27 | + t = FIELD_DP32(t, MVFR1, FPHP, 2); /* v8.0 FP support */ | 48 | arm/musicpal |
28 | + cpu->isar.mvfr1 = t; | 49 | arm/gumstix |
29 | + | 50 | arm/nrf |
30 | t = cpu->isar.mvfr2; | 51 | diff --git a/MAINTAINERS b/MAINTAINERS |
31 | t = FIELD_DP32(t, MVFR2, SIMDMISC, 3); /* SIMD MaxNum */ | 52 | index XXXXXXX..XXXXXXX 100644 |
32 | t = FIELD_DP32(t, MVFR2, FPMISC, 4); /* FP MaxNum */ | 53 | --- a/MAINTAINERS |
54 | +++ b/MAINTAINERS | ||
55 | @@ -XXX,XX +XXX,XX @@ L: qemu-arm@nongnu.org | ||
56 | S: Odd Fixes | ||
57 | F: hw/arm/highbank.c | ||
58 | F: hw/net/xgmac.c | ||
59 | +F: docs/system/arm/highbank.rst | ||
60 | |||
61 | Canon DIGIC | ||
62 | M: Antony Pavlov <antonynpavlov@gmail.com> | ||
33 | -- | 63 | -- |
34 | 2.20.1 | 64 | 2.20.1 |
35 | 65 | ||
36 | 66 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | 1 | The Neon and SVE decoders use private 'plus1' functions to implement |
---|---|---|---|
2 | "add one" for the !function decoder syntax. We have a generic | ||
3 | "plus_1" function in translate.h, so use that instead. | ||
2 | 4 | ||
3 | In the next commit we will implement the write_with_attrs() | 5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | handler. To avoid using different APIs, convert the read() | 6 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
5 | handler first. | 7 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
8 | Message-id: 20210715095341.701-1-peter.maydell@linaro.org | ||
9 | --- | ||
10 | target/arm/neon-ls.decode | 4 ++-- | ||
11 | target/arm/neon-shared.decode | 2 +- | ||
12 | target/arm/sve.decode | 2 +- | ||
13 | target/arm/translate-neon.c | 5 ----- | ||
14 | target/arm/translate-sve.c | 5 ----- | ||
15 | 5 files changed, 4 insertions(+), 14 deletions(-) | ||
6 | 16 | ||
7 | Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com> | 17 | diff --git a/target/arm/neon-ls.decode b/target/arm/neon-ls.decode |
8 | Tested-by: Francisco Iglesias <frasse.iglesias@gmail.com> | ||
9 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
11 | --- | ||
12 | hw/ssi/xilinx_spips.c | 23 +++++++++++------------ | ||
13 | 1 file changed, 11 insertions(+), 12 deletions(-) | ||
14 | |||
15 | diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c | ||
16 | index XXXXXXX..XXXXXXX 100644 | 18 | index XXXXXXX..XXXXXXX 100644 |
17 | --- a/hw/ssi/xilinx_spips.c | 19 | --- a/target/arm/neon-ls.decode |
18 | +++ b/hw/ssi/xilinx_spips.c | 20 | +++ b/target/arm/neon-ls.decode |
19 | @@ -XXX,XX +XXX,XX @@ static void lqspi_load_cache(void *opaque, hwaddr addr) | 21 | @@ -XXX,XX +XXX,XX @@ VLD_all_lanes 1111 0100 1 . 1 0 rn:4 .... 11 n:2 size:2 t:1 a:1 rm:4 \ |
20 | } | 22 | vd=%vd_dp |
23 | |||
24 | # Neon load/store single structure to one lane | ||
25 | -%imm1_5_p1 5:1 !function=plus1 | ||
26 | -%imm1_6_p1 6:1 !function=plus1 | ||
27 | +%imm1_5_p1 5:1 !function=plus_1 | ||
28 | +%imm1_6_p1 6:1 !function=plus_1 | ||
29 | |||
30 | VLDST_single 1111 0100 1 . l:1 0 rn:4 .... 00 n:2 reg_idx:3 align:1 rm:4 \ | ||
31 | vd=%vd_dp size=0 stride=1 | ||
32 | diff --git a/target/arm/neon-shared.decode b/target/arm/neon-shared.decode | ||
33 | index XXXXXXX..XXXXXXX 100644 | ||
34 | --- a/target/arm/neon-shared.decode | ||
35 | +++ b/target/arm/neon-shared.decode | ||
36 | @@ -XXX,XX +XXX,XX @@ | ||
37 | # which is 0 for fp16 and 1 for fp32 into a MO_* constant. | ||
38 | # (Note that this is the reverse of the sense of the 1-bit size | ||
39 | # field in the 3same_fp Neon insns.) | ||
40 | -%vcadd_size 20:1 !function=plus1 | ||
41 | +%vcadd_size 20:1 !function=plus_1 | ||
42 | |||
43 | VCMLA 1111 110 rot:2 . 1 . .... .... 1000 . q:1 . 0 .... \ | ||
44 | vm=%vm_dp vn=%vn_dp vd=%vd_dp size=%vcadd_size | ||
45 | diff --git a/target/arm/sve.decode b/target/arm/sve.decode | ||
46 | index XXXXXXX..XXXXXXX 100644 | ||
47 | --- a/target/arm/sve.decode | ||
48 | +++ b/target/arm/sve.decode | ||
49 | @@ -XXX,XX +XXX,XX @@ | ||
50 | ########################################################################### | ||
51 | # Named fields. These are primarily for disjoint fields. | ||
52 | |||
53 | -%imm4_16_p1 16:4 !function=plus1 | ||
54 | +%imm4_16_p1 16:4 !function=plus_1 | ||
55 | %imm6_22_5 22:1 5:5 | ||
56 | %imm7_22_16 22:2 16:5 | ||
57 | %imm8_16_10 16:5 10:3 | ||
58 | diff --git a/target/arm/translate-neon.c b/target/arm/translate-neon.c | ||
59 | index XXXXXXX..XXXXXXX 100644 | ||
60 | --- a/target/arm/translate-neon.c | ||
61 | +++ b/target/arm/translate-neon.c | ||
62 | @@ -XXX,XX +XXX,XX @@ | ||
63 | #include "translate.h" | ||
64 | #include "translate-a32.h" | ||
65 | |||
66 | -static inline int plus1(DisasContext *s, int x) | ||
67 | -{ | ||
68 | - return x + 1; | ||
69 | -} | ||
70 | - | ||
71 | static inline int neon_3same_fp_size(DisasContext *s, int x) | ||
72 | { | ||
73 | /* Convert 0==fp32, 1==fp16 into a MO_* value */ | ||
74 | diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c | ||
75 | index XXXXXXX..XXXXXXX 100644 | ||
76 | --- a/target/arm/translate-sve.c | ||
77 | +++ b/target/arm/translate-sve.c | ||
78 | @@ -XXX,XX +XXX,XX @@ static int tszimm_shl(DisasContext *s, int x) | ||
79 | return x - (8 << tszimm_esz(s, x)); | ||
21 | } | 80 | } |
22 | 81 | ||
23 | -static uint64_t | 82 | -static inline int plus1(DisasContext *s, int x) |
24 | -lqspi_read(void *opaque, hwaddr addr, unsigned int size) | 83 | -{ |
25 | +static MemTxResult lqspi_read(void *opaque, hwaddr addr, uint64_t *value, | 84 | - return x + 1; |
26 | + unsigned size, MemTxAttrs attrs) | 85 | -} |
86 | - | ||
87 | /* The SH bit is in bit 8. Extract the low 8 and shift. */ | ||
88 | static inline int expand_imm_sh8s(DisasContext *s, int x) | ||
27 | { | 89 | { |
28 | - XilinxQSPIPS *q = opaque; | ||
29 | - uint32_t ret; | ||
30 | + XilinxQSPIPS *q = XILINX_QSPIPS(opaque); | ||
31 | |||
32 | if (addr >= q->lqspi_cached_addr && | ||
33 | addr <= q->lqspi_cached_addr + LQSPI_CACHE_SIZE - 4) { | ||
34 | uint8_t *retp = &q->lqspi_buf[addr - q->lqspi_cached_addr]; | ||
35 | - ret = cpu_to_le32(*(uint32_t *)retp); | ||
36 | - DB_PRINT_L(1, "addr: %08x, data: %08x\n", (unsigned)addr, | ||
37 | - (unsigned)ret); | ||
38 | - return ret; | ||
39 | - } else { | ||
40 | - lqspi_load_cache(opaque, addr); | ||
41 | - return lqspi_read(opaque, addr, size); | ||
42 | + *value = cpu_to_le32(*(uint32_t *)retp); | ||
43 | + DB_PRINT_L(1, "addr: %08" HWADDR_PRIx ", data: %08" PRIx64 "\n", | ||
44 | + addr, *value); | ||
45 | + return MEMTX_OK; | ||
46 | } | ||
47 | + | ||
48 | + lqspi_load_cache(opaque, addr); | ||
49 | + return lqspi_read(opaque, addr, value, size, attrs); | ||
50 | } | ||
51 | |||
52 | static const MemoryRegionOps lqspi_ops = { | ||
53 | - .read = lqspi_read, | ||
54 | + .read_with_attrs = lqspi_read, | ||
55 | .endianness = DEVICE_NATIVE_ENDIAN, | ||
56 | .valid = { | ||
57 | .min_access_size = 1, | ||
58 | -- | 90 | -- |
59 | 2.20.1 | 91 | 2.20.1 |
60 | 92 | ||
61 | 93 | diff view generated by jsdifflib |