1 | Handful of bugfixes for rc2. None of these are particularly critical | 1 | Last few changes before rc0: a few bug fixes, but mostly |
---|---|---|---|
2 | or exciting. | 2 | docs stuff. |
3 | 3 | ||
4 | -- PMM | 4 | -- PMM |
5 | 5 | ||
6 | The following changes since commit 45a150aa2b3492acf6691c7bdbeb25a8545d8345: | 6 | The following changes since commit a97fca4ceb9d9b10aa8b582e817a5ee6c42ffbaf: |
7 | 7 | ||
8 | Merge remote-tracking branch 'remotes/ericb/tags/pull-bitmaps-2020-08-03' into staging (2020-08-03 15:13:49 +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-20200803 | 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 13557fd392890cbd985bceba7f717e01efd674b8: | 14 | for you to fetch changes up to 8fe612a183dec4c63afdc57537079bc742d024ca: |
15 | 15 | ||
16 | hw/timer/imx_epit: Avoid assertion when CR.SWR is written (2020-08-03 17:56:11 +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 | * hw/timer/imx_epit: Avoid assertion when CR.SWR is written | 20 | * Remove duplicate 'plus1' function from Neon and SVE decode |
21 | * netduino2, netduinoplus2, microbit: set system_clock_scale so that | 21 | * Fix offsets for TTBCR for big-endian hosts |
22 | SysTick running on the CPU clock works | 22 | * docs: fix copyright date |
23 | * target/arm: Avoid maybe-uninitialized warning with gcc 4.9 | 23 | * docs: add license/version info to HTML footers |
24 | * target/arm: Fix AddPAC error indication | 24 | * docs: add an About section |
25 | * Make AIRCR.SYSRESETREQ actually reset the system for the | 25 | * docs: document some more arm boards |
26 | microbit, mps2-*, musca-*, netduino* boards | ||
27 | 26 | ||
28 | ---------------------------------------------------------------- | 27 | ---------------------------------------------------------------- |
29 | Kaige Li (1): | 28 | Peter Maydell (11): |
30 | target/arm: Avoid maybe-uninitialized warning with gcc 4.9 | 29 | docs: Fix documentation Copyright date |
31 | 30 | docs: Stop calling the top level subsections of our manual 'manuals' | |
32 | Peter Maydell (6): | 31 | docs: Remove "Contents:" lines from top-level subsections |
33 | hw/arm/netduino2, netduinoplus2: Set system_clock_scale | 32 | docs: Move deprecation, build and license info out of system/ |
34 | include/hw/irq.h: New function qemu_irq_is_connected() | 33 | docs: Add some actual About text to about/index.rst |
35 | hw/intc/armv7m_nvic: Provide default "reset the system" behaviour for SYSRESETREQ | 34 | docs: Add license note to the HTML page footer |
36 | msf2-soc, stellaris: Don't wire up SYSRESETREQ | 35 | docs: Add QEMU version information to HTML footer |
37 | hw/arm/nrf51_soc: Set system_clock_scale | 36 | docs: Add skeletal documentation of cubieboard |
38 | hw/timer/imx_epit: Avoid assertion when CR.SWR is written | 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 | ||
39 | 40 | ||
40 | Richard Henderson (1): | 41 | Richard Henderson (1): |
41 | target/arm: Fix AddPAC error indication | 42 | target/arm: Fix offsets for TTBCR |
42 | 43 | ||
43 | include/hw/arm/armv7m.h | 4 +++- | 44 | docs/_templates/footer.html | 14 ++++++++++++++ |
44 | include/hw/irq.h | 18 ++++++++++++++++++ | 45 | docs/{system => about}/build-platforms.rst | 0 |
45 | hw/arm/msf2-soc.c | 11 ----------- | 46 | docs/{system => about}/deprecated.rst | 0 |
46 | hw/arm/netduino2.c | 10 ++++++++++ | 47 | docs/about/index.rst | 27 +++++++++++++++++++++++++++ |
47 | hw/arm/netduinoplus2.c | 10 ++++++++++ | 48 | docs/{system => about}/license.rst | 0 |
48 | hw/arm/nrf51_soc.c | 5 +++++ | 49 | docs/{system => about}/removed-features.rst | 0 |
49 | hw/arm/stellaris.c | 12 ------------ | 50 | docs/conf.py | 2 +- |
50 | hw/intc/armv7m_nvic.c | 17 ++++++++++++++++- | 51 | docs/devel/index.rst | 7 +------ |
51 | hw/timer/imx_epit.c | 13 ++++++++++--- | 52 | docs/index.rst | 1 + |
52 | target/arm/pauth_helper.c | 6 +++++- | 53 | docs/interop/index.rst | 9 ++------- |
53 | target/arm/translate-a64.c | 2 +- | 54 | docs/meson.build | 3 ++- |
54 | tests/tcg/aarch64/pauth-5.c | 33 +++++++++++++++++++++++++++++++++ | 55 | docs/specs/index.rst | 7 ++----- |
55 | tests/tcg/aarch64/Makefile.target | 2 +- | 56 | docs/system/arm/cubieboard.rst | 16 ++++++++++++++++ |
56 | 13 files changed, 112 insertions(+), 31 deletions(-) | 57 | docs/system/arm/emcraft-sf2.rst | 15 +++++++++++++++ |
57 | create mode 100644 tests/tcg/aarch64/pauth-5.c | 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 | ||
58 | 80 | diff view generated by jsdifflib |
1 | From: Kaige Li <likaige@loongson.cn> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | GCC version 4.9.4 isn't clever enough to figure out that all | 3 | The functions vmsa_ttbcr_write and vmsa_ttbcr_raw_write expect |
4 | execution paths in disas_ldst() that use 'fn' will have initialized | 4 | the offset to be for the complete TCR structure, not the offset |
5 | it first, and so it warns: | 5 | to the low 32-bits of a uint64_t. Using offsetoflow32 in this |
6 | case breaks big-endian hosts. | ||
6 | 7 | ||
7 | /home/LiKaige/qemu/target/arm/translate-a64.c: In function ‘disas_ldst’: | 8 | For TTBCR2, we do want the high 32-bits of a uint64_t. |
8 | /home/LiKaige/qemu/target/arm/translate-a64.c:3392:5: error: ‘fn’ may be used uninitialized in this function [-Werror=maybe-uninitialized] | 9 | Use cp15.tcr_el[*].raw_tcr as the offsetofhigh32 argument to |
9 | fn(cpu_reg(s, rt), clean_addr, tcg_rs, get_mem_index(s), | 10 | clarify this. |
10 | ^ | ||
11 | /home/LiKaige/qemu/target/arm/translate-a64.c:3318:22: note: ‘fn’ was declared here | ||
12 | AtomicThreeOpFn *fn; | ||
13 | ^ | ||
14 | 11 | ||
15 | Make it happy by initializing the variable to NULL. | 12 | Buglink: https://gitlab.com/qemu-project/qemu/-/issues/187 |
16 | 13 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | |
17 | Signed-off-by: Kaige Li <likaige@loongson.cn> | 14 | Message-id: 20210709230621.938821-2-richard.henderson@linaro.org |
18 | Message-id: 1596110248-7366-2-git-send-email-likaige@loongson.cn | ||
19 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 15 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
20 | [PMM: Clean up commit message and note which gcc version this was] | ||
21 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 16 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
22 | --- | 17 | --- |
23 | target/arm/translate-a64.c | 2 +- | 18 | target/arm/helper.c | 11 +++++++---- |
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | 19 | 1 file changed, 7 insertions(+), 4 deletions(-) |
25 | 20 | ||
26 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c | 21 | diff --git a/target/arm/helper.c b/target/arm/helper.c |
27 | index XXXXXXX..XXXXXXX 100644 | 22 | index XXXXXXX..XXXXXXX 100644 |
28 | --- a/target/arm/translate-a64.c | 23 | --- a/target/arm/helper.c |
29 | +++ b/target/arm/translate-a64.c | 24 | +++ b/target/arm/helper.c |
30 | @@ -XXX,XX +XXX,XX @@ static void disas_ldst_atomic(DisasContext *s, uint32_t insn, | 25 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo vmsa_cp_reginfo[] = { |
31 | bool r = extract32(insn, 22, 1); | 26 | .access = PL1_RW, .accessfn = access_tvm_trvm, |
32 | bool a = extract32(insn, 23, 1); | 27 | .type = ARM_CP_ALIAS, .writefn = vmsa_ttbcr_write, |
33 | TCGv_i64 tcg_rs, clean_addr; | 28 | .raw_writefn = vmsa_ttbcr_raw_write, |
34 | - AtomicThreeOpFn *fn; | 29 | - .bank_fieldoffsets = { offsetoflow32(CPUARMState, cp15.tcr_el[3]), |
35 | + AtomicThreeOpFn *fn = NULL; | 30 | - offsetoflow32(CPUARMState, cp15.tcr_el[1])} }, |
36 | 31 | + /* No offsetoflow32 -- pass the entire TCR to writefn/raw_writefn. */ | |
37 | if (is_vector || !dc_isar_feature(aa64_atomics, s)) { | 32 | + .bank_fieldoffsets = { offsetof(CPUARMState, cp15.tcr_el[3]), |
38 | unallocated_encoding(s); | 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, | ||
39 | -- | 50 | -- |
40 | 2.20.1 | 51 | 2.20.1 |
41 | 52 | ||
42 | 53 | diff view generated by jsdifflib |
1 | The nrf51 SoC model wasn't setting the system_clock_scale | 1 | In commit 6d8980a38fa we updated the copyright string we present to |
---|---|---|---|
2 | global.which meant that if guest code used the systick timer in "use | 2 | the user in -version output, About dialogs, etc, but we forgot that |
3 | the processor clock" mode it would hang because time never advances. | 3 | the Sphinx manuals have a separate copyright string setting. Update |
4 | 4 | that one too. | |
5 | Set the global to match the documented CPU clock speed for this SoC. | ||
6 | |||
7 | This SoC in fact doesn't have a SysTick timer (which is the only thing | ||
8 | currently that cares about the system_clock_scale), because it's | ||
9 | a configurable option in the Cortex-M0. However our Cortex-M0 and | ||
10 | thus our nrf51 and our micro:bit board do provide a SysTick, so | ||
11 | we ought to provide a functional one rather than a broken one. | ||
12 | 5 | ||
13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
14 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 7 | Acked-by: Markus Armbruster <armbru@redhat.com> |
15 | Message-id: 20200727193458.31250-1-peter.maydell@linaro.org | 8 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
9 | Message-id: 20210705095547.15790-2-peter.maydell@linaro.org | ||
16 | --- | 10 | --- |
17 | hw/arm/nrf51_soc.c | 5 +++++ | 11 | docs/conf.py | 2 +- |
18 | 1 file changed, 5 insertions(+) | 12 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | 13 | ||
20 | diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c | 14 | diff --git a/docs/conf.py b/docs/conf.py |
21 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
22 | --- a/hw/arm/nrf51_soc.c | 16 | --- a/docs/conf.py |
23 | +++ b/hw/arm/nrf51_soc.c | 17 | +++ b/docs/conf.py |
24 | @@ -XXX,XX +XXX,XX @@ | 18 | @@ -XXX,XX +XXX,XX @@ |
25 | 19 | ||
26 | #define BASE_TO_IRQ(base) ((base >> 12) & 0x1F) | 20 | # General information about the project. |
27 | 21 | project = u'QEMU' | |
28 | +/* HCLK (the main CPU clock) on this SoC is always 16MHz */ | 22 | -copyright = u'2020, The QEMU Project Developers' |
29 | +#define HCLK_FRQ 16000000 | 23 | +copyright = u'2021, The QEMU Project Developers' |
30 | + | 24 | author = u'The QEMU Project Developers' |
31 | static uint64_t clock_read(void *opaque, hwaddr addr, unsigned int size) | 25 | |
32 | { | 26 | # The version info for the project you're documenting, acts as replacement for |
33 | qemu_log_mask(LOG_UNIMP, "%s: 0x%" HWADDR_PRIx " [%u]\n", | ||
34 | @@ -XXX,XX +XXX,XX @@ static void nrf51_soc_realize(DeviceState *dev_soc, Error **errp) | ||
35 | return; | ||
36 | } | ||
37 | |||
38 | + system_clock_scale = NANOSECONDS_PER_SECOND / HCLK_FRQ; | ||
39 | + | ||
40 | object_property_set_link(OBJECT(&s->cpu), "memory", OBJECT(&s->container), | ||
41 | &error_abort); | ||
42 | if (!sysbus_realize(SYS_BUS_DEVICE(&s->cpu), errp)) { | ||
43 | -- | 27 | -- |
44 | 2.20.1 | 28 | 2.20.1 |
45 | 29 | ||
46 | 30 | diff view generated by jsdifflib |
1 | The NVIC provides an outbound qemu_irq "SYSRESETREQ" which it signals | 1 | We merged our previous multiple-manual setup into a single Sphinx |
---|---|---|---|
2 | when the guest sets the SYSRESETREQ bit in the AIRCR register. This | 2 | manual, but we left some text in the various index.rst lines that |
3 | matches the hardware design (where the CPU has a signal of this name | 3 | still calls the top level subsections separate 'manuals'. Update |
4 | and it is up to the SoC to connect that up to an actual reset | 4 | them to talk about "this section of the manual" instead, and remove |
5 | mechanism), but in QEMU it mostly results in duplicated code in SoC | 5 | now-obsolete comments about how the index.rst files are the "top |
6 | objects and bugs where SoC model implementors forget to wire up the | 6 | level page for the 'foo' manual". |
7 | SYSRESETREQ line. | ||
8 | |||
9 | Provide a default behaviour for the case where SYSRESETREQ is not | ||
10 | actually connected to anything: use qemu_system_reset_request() to | ||
11 | perform a system reset. This will allow us to remove the | ||
12 | implementations of SYSRESETREQ handling from the boards where that's | ||
13 | exactly what it does, and also fixes the bugs in the board models | ||
14 | which forgot to wire up the signal: | ||
15 | |||
16 | * microbit | ||
17 | * mps2-an385 | ||
18 | * mps2-an505 | ||
19 | * mps2-an511 | ||
20 | * mps2-an521 | ||
21 | * musca-a | ||
22 | * musca-b1 | ||
23 | * netduino | ||
24 | * netduinoplus2 | ||
25 | |||
26 | We still allow the board to wire up the signal if it needs to, in case | ||
27 | we need to model more complicated reset controller logic or to model | ||
28 | buggy SoC hardware which forgot to wire up the line itself. But | ||
29 | defaulting to "reset the system" is more often going to be correct | ||
30 | than defaulting to "do nothing". | ||
31 | 7 | ||
32 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
33 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 9 | Acked-by: Markus Armbruster <armbru@redhat.com> |
34 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 10 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
35 | Message-id: 20200728103744.6909-3-peter.maydell@linaro.org | 11 | Message-id: 20210705095547.15790-3-peter.maydell@linaro.org |
36 | --- | 12 | --- |
37 | include/hw/arm/armv7m.h | 4 +++- | 13 | docs/devel/index.rst | 5 +---- |
38 | hw/intc/armv7m_nvic.c | 17 ++++++++++++++++- | 14 | docs/interop/index.rst | 7 ++----- |
39 | 2 files changed, 19 insertions(+), 2 deletions(-) | 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(-) | ||
40 | 20 | ||
41 | diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h | 21 | diff --git a/docs/devel/index.rst b/docs/devel/index.rst |
42 | index XXXXXXX..XXXXXXX 100644 | 22 | index XXXXXXX..XXXXXXX 100644 |
43 | --- a/include/hw/arm/armv7m.h | 23 | --- a/docs/devel/index.rst |
44 | +++ b/include/hw/arm/armv7m.h | 24 | +++ b/docs/devel/index.rst |
45 | @@ -XXX,XX +XXX,XX @@ typedef struct { | 25 | @@ -XXX,XX +XXX,XX @@ |
46 | 26 | -.. This is the top level page for the 'devel' manual. | |
47 | /* ARMv7M container object. | 27 | - |
48 | * + Unnamed GPIO input lines: external IRQ lines for the NVIC | 28 | - |
49 | - * + Named GPIO output SYSRESETREQ: signalled for guest AIRCR.SYSRESETREQ | 29 | Developer Information |
50 | + * + Named GPIO output SYSRESETREQ: signalled for guest AIRCR.SYSRESETREQ. | 30 | ===================== |
51 | + * If this GPIO is not wired up then the NVIC will default to performing | 31 | |
52 | + * a qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET). | 32 | -This manual documents various parts of the internals of QEMU. |
53 | * + Property "cpu-type": CPU type to instantiate | 33 | +This section of the manual documents various parts of the internals of QEMU. |
54 | * + Property "num-irq": number of external IRQ lines | 34 | You only need to read it if you are interested in reading or |
55 | * + Property "memory": MemoryRegion defining the physical address space | 35 | modifying QEMU's source code. |
56 | diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c | 36 | |
37 | diff --git a/docs/interop/index.rst b/docs/interop/index.rst | ||
57 | index XXXXXXX..XXXXXXX 100644 | 38 | index XXXXXXX..XXXXXXX 100644 |
58 | --- a/hw/intc/armv7m_nvic.c | 39 | --- a/docs/interop/index.rst |
59 | +++ b/hw/intc/armv7m_nvic.c | 40 | +++ b/docs/interop/index.rst |
60 | @@ -XXX,XX +XXX,XX @@ | 41 | @@ -XXX,XX +XXX,XX @@ |
61 | #include "hw/intc/armv7m_nvic.h" | 42 | -.. This is the top level page for the 'interop' manual. |
62 | #include "hw/irq.h" | 43 | - |
63 | #include "hw/qdev-properties.h" | 44 | - |
64 | +#include "sysemu/runstate.h" | 45 | System Emulation Management and Interoperability |
65 | #include "target/arm/cpu.h" | 46 | ================================================ |
66 | #include "exec/exec-all.h" | 47 | |
67 | #include "exec/memop.h" | 48 | -This manual contains documents and specifications that are useful |
68 | @@ -XXX,XX +XXX,XX @@ static const uint8_t nvic_id[] = { | 49 | -for making QEMU interoperate with other software. |
69 | 0x00, 0xb0, 0x1b, 0x00, 0x0d, 0xe0, 0x05, 0xb1 | 50 | +This section of the manual contains documents and specifications that |
70 | }; | 51 | +are useful for making QEMU interoperate with other software. |
71 | 52 | ||
72 | +static void signal_sysresetreq(NVICState *s) | 53 | Contents: |
73 | +{ | 54 | |
74 | + if (qemu_irq_is_connected(s->sysresetreq)) { | 55 | diff --git a/docs/specs/index.rst b/docs/specs/index.rst |
75 | + qemu_irq_pulse(s->sysresetreq); | 56 | index XXXXXXX..XXXXXXX 100644 |
76 | + } else { | 57 | --- a/docs/specs/index.rst |
77 | + /* | 58 | +++ b/docs/specs/index.rst |
78 | + * Default behaviour if the SoC doesn't need to wire up | 59 | @@ -XXX,XX +XXX,XX @@ |
79 | + * SYSRESETREQ (eg to a system reset controller of some kind): | 60 | -.. This is the top level page for the 'specs' manual |
80 | + * perform a system reset via the usual QEMU API. | 61 | - |
81 | + */ | 62 | - |
82 | + qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); | 63 | System Emulation Guest Hardware Specifications |
83 | + } | 64 | ============================================== |
84 | +} | 65 | |
85 | + | 66 | +This section of the manual contains specifications of |
86 | static int nvic_pending_prio(NVICState *s) | 67 | +guest hardware that is specific to QEMU. |
87 | { | 68 | |
88 | /* return the group priority of the current pending interrupt, | 69 | Contents: |
89 | @@ -XXX,XX +XXX,XX @@ static void nvic_writel(NVICState *s, uint32_t offset, uint32_t value, | 70 | |
90 | if (value & R_V7M_AIRCR_SYSRESETREQ_MASK) { | 71 | diff --git a/docs/system/index.rst b/docs/system/index.rst |
91 | if (attrs.secure || | 72 | index XXXXXXX..XXXXXXX 100644 |
92 | !(cpu->env.v7m.aircr & R_V7M_AIRCR_SYSRESETREQS_MASK)) { | 73 | --- a/docs/system/index.rst |
93 | - qemu_irq_pulse(s->sysresetreq); | 74 | +++ b/docs/system/index.rst |
94 | + signal_sysresetreq(s); | 75 | @@ -XXX,XX +XXX,XX @@ |
95 | } | 76 | -.. This is the top level page for the 'system' manual. |
96 | } | 77 | - |
97 | if (value & R_V7M_AIRCR_VECTCLRACTIVE_MASK) { | 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 | |||
98 | -- | 119 | -- |
99 | 2.20.1 | 120 | 2.20.1 |
100 | 121 | ||
101 | 122 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | Since the top-level subsections aren't self-contained manuals | ||
2 | any more, the "Contents:" lines at the top of each of their | ||
3 | index pages look a bit odd; remove them. | ||
1 | 4 | ||
5 | Signed-off-by: Peter Maydell <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 | ||
9 | --- | ||
10 | docs/devel/index.rst | 2 -- | ||
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(-) | ||
17 | |||
18 | diff --git a/docs/devel/index.rst b/docs/devel/index.rst | ||
19 | index XXXXXXX..XXXXXXX 100644 | ||
20 | --- a/docs/devel/index.rst | ||
21 | +++ b/docs/devel/index.rst | ||
22 | @@ -XXX,XX +XXX,XX @@ This section of the manual documents various parts of the internals of QEMU. | ||
23 | You only need to read it if you are interested in reading or | ||
24 | modifying QEMU's source code. | ||
25 | |||
26 | -Contents: | ||
27 | - | ||
28 | .. toctree:: | ||
29 | :maxdepth: 2 | ||
30 | :includehidden: | ||
31 | diff --git a/docs/interop/index.rst b/docs/interop/index.rst | ||
32 | index XXXXXXX..XXXXXXX 100644 | ||
33 | --- a/docs/interop/index.rst | ||
34 | +++ b/docs/interop/index.rst | ||
35 | @@ -XXX,XX +XXX,XX @@ System Emulation Management and Interoperability | ||
36 | This section of the manual contains documents and specifications that | ||
37 | are useful for making QEMU interoperate with other software. | ||
38 | |||
39 | -Contents: | ||
40 | - | ||
41 | .. toctree:: | ||
42 | :maxdepth: 2 | ||
43 | |||
44 | diff --git a/docs/specs/index.rst b/docs/specs/index.rst | ||
45 | index XXXXXXX..XXXXXXX 100644 | ||
46 | --- a/docs/specs/index.rst | ||
47 | +++ b/docs/specs/index.rst | ||
48 | @@ -XXX,XX +XXX,XX @@ System Emulation Guest Hardware Specifications | ||
49 | This section of the manual contains specifications of | ||
50 | guest hardware that is specific to QEMU. | ||
51 | |||
52 | -Contents: | ||
53 | - | ||
54 | .. toctree:: | ||
55 | :maxdepth: 2 | ||
56 | |||
57 | diff --git a/docs/system/index.rst b/docs/system/index.rst | ||
58 | index XXXXXXX..XXXXXXX 100644 | ||
59 | --- a/docs/system/index.rst | ||
60 | +++ b/docs/system/index.rst | ||
61 | @@ -XXX,XX +XXX,XX @@ for full system emulation (as opposed to user-mode emulation). | ||
62 | This includes working with hypervisors such as KVM, Xen, Hax | ||
63 | or Hypervisor.Framework. | ||
64 | |||
65 | -Contents: | ||
66 | - | ||
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 | |||
96 | -- | ||
97 | 2.20.1 | ||
98 | |||
99 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | Now that we have a single Sphinx manual rather than multiple manuals, | ||
2 | we can provide a better place for "common to all of QEMU" information | ||
3 | like the deprecation notices, build platforms, license information, | ||
4 | which we currently have in the system/ manual even though it applies | ||
5 | to all of QEMU. | ||
1 | 6 | ||
7 | Create a new directory about/ on the same level as system/, user/, | ||
8 | etc, and move these documents there. | ||
9 | |||
10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
11 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
12 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
13 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
14 | Message-id: 20210705095547.15790-5-peter.maydell@linaro.org | ||
15 | --- | ||
16 | docs/{system => about}/build-platforms.rst | 0 | ||
17 | docs/{system => about}/deprecated.rst | 0 | ||
18 | docs/about/index.rst | 10 ++++++++++ | ||
19 | docs/{system => about}/license.rst | 0 | ||
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%) | ||
29 | |||
30 | diff --git a/docs/system/build-platforms.rst b/docs/about/build-platforms.rst | ||
31 | similarity index 100% | ||
32 | rename from docs/system/build-platforms.rst | ||
33 | rename to docs/about/build-platforms.rst | ||
34 | diff --git a/docs/system/deprecated.rst b/docs/about/deprecated.rst | ||
35 | similarity index 100% | ||
36 | rename from docs/system/deprecated.rst | ||
37 | rename to docs/about/deprecated.rst | ||
38 | diff --git a/docs/about/index.rst b/docs/about/index.rst | ||
39 | new file mode 100644 | ||
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 | ||
63 | index XXXXXXX..XXXXXXX 100644 | ||
64 | --- a/docs/index.rst | ||
65 | +++ b/docs/index.rst | ||
66 | @@ -XXX,XX +XXX,XX @@ Welcome to QEMU's documentation! | ||
67 | :maxdepth: 2 | ||
68 | :caption: Contents: | ||
69 | |||
70 | + about/index | ||
71 | system/index | ||
72 | user/index | ||
73 | tools/index | ||
74 | diff --git a/docs/system/index.rst b/docs/system/index.rst | ||
75 | index XXXXXXX..XXXXXXX 100644 | ||
76 | --- a/docs/system/index.rst | ||
77 | +++ b/docs/system/index.rst | ||
78 | @@ -XXX,XX +XXX,XX @@ or Hypervisor.Framework. | ||
79 | targets | ||
80 | security | ||
81 | multi-process | ||
82 | - deprecated | ||
83 | - removed-features | ||
84 | - build-platforms | ||
85 | - license | ||
86 | -- | ||
87 | 2.20.1 | ||
88 | |||
89 | diff view generated by jsdifflib |
1 | The imx_epit device has a software-controllable reset triggered by | 1 | Add some text to About to act as a brief introduction to the QEMU |
---|---|---|---|
2 | setting the SWR bit in the CR register. An error in commit cc2722ec83ad9 | 2 | manual and to make the about page a bit less of an abrupt start to |
3 | means that we will end up assert()ing if the guest does this, because | 3 | it. |
4 | the code in imx_epit_write() starts ptimer transactions, and then | ||
5 | imx_epit_reset() also starts ptimer transactions, triggering | ||
6 | "ptimer_transaction_begin: Assertion `!s->in_transaction' failed". | ||
7 | 4 | ||
8 | The cleanest way to avoid this double-transaction is to move the | 5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
9 | start-transaction for the CR write handling down below the check of | 6 | Acked-by: Markus Armbruster <armbru@redhat.com> |
10 | the SWR bit. | 7 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
8 | Message-id: 20210705095547.15790-6-peter.maydell@linaro.org | ||
9 | --- | ||
10 | docs/about/index.rst | 17 +++++++++++++++++ | ||
11 | 1 file changed, 17 insertions(+) | ||
11 | 12 | ||
12 | Fixes: https://bugs.launchpad.net/qemu/+bug/1880424 | 13 | diff --git a/docs/about/index.rst b/docs/about/index.rst |
13 | Fixes: cc2722ec83ad944505fe | ||
14 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
15 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
16 | Message-id: 20200727154550.3409-1-peter.maydell@linaro.org | ||
17 | --- | ||
18 | hw/timer/imx_epit.c | 13 ++++++++++--- | ||
19 | 1 file changed, 10 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c | ||
22 | index XXXXXXX..XXXXXXX 100644 | 14 | index XXXXXXX..XXXXXXX 100644 |
23 | --- a/hw/timer/imx_epit.c | 15 | --- a/docs/about/index.rst |
24 | +++ b/hw/timer/imx_epit.c | 16 | +++ b/docs/about/index.rst |
25 | @@ -XXX,XX +XXX,XX @@ static void imx_epit_write(void *opaque, hwaddr offset, uint64_t value, | 17 | @@ -XXX,XX +XXX,XX @@ |
26 | 18 | About QEMU | |
27 | switch (offset >> 2) { | 19 | ========== |
28 | case 0: /* CR */ | 20 | |
29 | - ptimer_transaction_begin(s->timer_cmp); | 21 | +QEMU is a generic and open source machine emulator and virtualizer. |
30 | - ptimer_transaction_begin(s->timer_reload); | ||
31 | |||
32 | oldcr = s->cr; | ||
33 | s->cr = value & 0x03ffffff; | ||
34 | if (s->cr & CR_SWR) { | ||
35 | /* handle the reset */ | ||
36 | imx_epit_reset(DEVICE(s)); | ||
37 | - } else { | ||
38 | + /* | ||
39 | + * TODO: could we 'break' here? following operations appear | ||
40 | + * to duplicate the work imx_epit_reset() already did. | ||
41 | + */ | ||
42 | + } | ||
43 | + | 22 | + |
44 | + ptimer_transaction_begin(s->timer_cmp); | 23 | +QEMU can be used in several different ways. The most common is for |
45 | + ptimer_transaction_begin(s->timer_reload); | 24 | +"system emulation", where it provides a virtual model of an |
25 | +entire machine (CPU, memory and emulated devices) to run a guest OS. | ||
26 | +In this mode the CPU may be fully emulated, or it may work with | ||
27 | +a hypervisor such as KVM, Xen, Hax or Hypervisor.Framework to | ||
28 | +allow the guest to run directly on the host CPU. | ||
46 | + | 29 | + |
47 | + if (!(s->cr & CR_SWR)) { | 30 | +The second supported way to use QEMU is "user mode emulation", |
48 | imx_epit_set_freq(s); | 31 | +where QEMU can launch processes compiled for one CPU on another CPU. |
49 | } | 32 | +In this mode the CPU is always emulated. |
33 | + | ||
34 | +QEMU also provides a number of standalone commandline utilities, | ||
35 | +such as the `qemu-img` disk image utility that allows you to create, | ||
36 | +convert and modify disk images. | ||
37 | + | ||
38 | .. toctree:: | ||
39 | :maxdepth: 2 | ||
50 | 40 | ||
51 | -- | 41 | -- |
52 | 2.20.1 | 42 | 2.20.1 |
53 | 43 | ||
54 | 44 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
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. | ||
1 | 7 | ||
8 | Add a template footer.html which defines the 'extrafooter' block that | ||
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.) | ||
13 | |||
14 | We use the templating functionality to make the new text also be a | ||
15 | hyperlink to the about/license.html page of the manual. | ||
16 | |||
17 | Unlike rst files, HTML template files are not reported to our depfile | ||
18 | plugin, so we maintain a manual list in meson.build. New template | ||
19 | files should be rare, so not being able to auto-generate the | ||
20 | dependency info is not too awkward. | ||
21 | |||
22 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
23 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
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 | |||
33 | diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html | ||
34 | new file mode 100644 | ||
35 | index XXXXXXX..XXXXXXX | ||
36 | --- /dev/null | ||
37 | +++ b/docs/_templates/footer.html | ||
38 | @@ -XXX,XX +XXX,XX @@ | ||
39 | +{% extends "!footer.html" %} | ||
40 | +{% block extrafooter %} | ||
41 | + | ||
42 | +<!-- Empty para to force a blank line after "Built with Sphinx ..." --> | ||
43 | +<p></p> | ||
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 | ||
52 | index XXXXXXX..XXXXXXX 100644 | ||
53 | --- a/docs/meson.build | ||
54 | +++ b/docs/meson.build | ||
55 | @@ -XXX,XX +XXX,XX @@ if build_docs | ||
56 | meson.source_root() / 'docs/sphinx/qapidoc.py', | ||
57 | meson.source_root() / 'docs/sphinx/qmp_lexer.py', | ||
58 | qapi_gen_depends ] | ||
59 | + sphinx_template_files = [ meson.source_root() / 'docs/_templates/footer.html' ] | ||
60 | |||
61 | have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT') | ||
62 | |||
63 | @@ -XXX,XX +XXX,XX @@ if build_docs | ||
64 | output: 'docs.stamp', | ||
65 | input: files('conf.py'), | ||
66 | depfile: 'docs.d', | ||
67 | - depend_files: sphinx_extn_depends, | ||
68 | + depend_files: [ sphinx_extn_depends, sphinx_template_files ], | ||
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 | ------------- | ||
84 | -- | ||
85 | 2.20.1 | ||
86 | |||
87 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
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. | ||
1 | 5 | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
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(+) | ||
14 | |||
15 | diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html | ||
16 | index XXXXXXX..XXXXXXX 100644 | ||
17 | --- a/docs/_templates/footer.html | ||
18 | +++ b/docs/_templates/footer.html | ||
19 | @@ -XXX,XX +XXX,XX @@ | ||
20 | <!-- Empty para to force a blank line after "Built with Sphinx ..." --> | ||
21 | <p></p> | ||
22 | |||
23 | +<p>This documentation is for QEMU version {{ version }}.</p> | ||
24 | + | ||
25 | {% trans path=pathto('about/license') %} | ||
26 | <p><a href="{{ path }}">QEMU and this manual are released under the | ||
27 | GNU General Public License, version 2.</a></p> | ||
28 | -- | ||
29 | 2.20.1 | ||
30 | |||
31 | diff view generated by jsdifflib |
1 | From: Richard Henderson <richard.henderson@linaro.org> | 1 | Add skeletal documentation of the cubieboard machine. |
---|---|---|---|
2 | 2 | ||
3 | The definition of top_bit used in this function is one higher | 3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | than that used in the Arm ARM psuedo-code, which put the error | 4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
5 | indication at top_bit - 1 at the wrong place, which meant that | 5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
6 | it wasn't visible to Auth. | 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 | ||
7 | 13 | ||
8 | Fixing the definition of top_bit requires more changes, because | 14 | diff --git a/docs/system/arm/cubieboard.rst b/docs/system/arm/cubieboard.rst |
9 | its most common use is for the count of bits in top_bit:bot_bit, | ||
10 | which would then need to be computed as top_bit - bot_bit + 1. | ||
11 | |||
12 | For now, prefer the minimal fix to the error indication alone. | ||
13 | |||
14 | Fixes: 63ff0ca94cb | ||
15 | Reported-by: Derrick McKee <derrick.mckee@gmail.com> | ||
16 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
17 | Message-id: 20200728195706.11087-1-richard.henderson@linaro.org | ||
18 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
19 | [PMM: added comment about the divergence from the pseudocode] | ||
20 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
21 | --- | ||
22 | target/arm/pauth_helper.c | 6 +++++- | ||
23 | tests/tcg/aarch64/pauth-5.c | 33 +++++++++++++++++++++++++++++++ | ||
24 | tests/tcg/aarch64/Makefile.target | 2 +- | ||
25 | 3 files changed, 39 insertions(+), 2 deletions(-) | ||
26 | create mode 100644 tests/tcg/aarch64/pauth-5.c | ||
27 | |||
28 | diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c | ||
29 | index XXXXXXX..XXXXXXX 100644 | ||
30 | --- a/target/arm/pauth_helper.c | ||
31 | +++ b/target/arm/pauth_helper.c | ||
32 | @@ -XXX,XX +XXX,XX @@ static uint64_t pauth_addpac(CPUARMState *env, uint64_t ptr, uint64_t modifier, | ||
33 | */ | ||
34 | test = sextract64(ptr, bot_bit, top_bit - bot_bit); | ||
35 | if (test != 0 && test != -1) { | ||
36 | - pac ^= MAKE_64BIT_MASK(top_bit - 1, 1); | ||
37 | + /* | ||
38 | + * Note that our top_bit is one greater than the pseudocode's | ||
39 | + * version, hence "- 2" here. | ||
40 | + */ | ||
41 | + pac ^= MAKE_64BIT_MASK(top_bit - 2, 1); | ||
42 | } | ||
43 | |||
44 | /* | ||
45 | diff --git a/tests/tcg/aarch64/pauth-5.c b/tests/tcg/aarch64/pauth-5.c | ||
46 | new file mode 100644 | 15 | new file mode 100644 |
47 | index XXXXXXX..XXXXXXX | 16 | index XXXXXXX..XXXXXXX |
48 | --- /dev/null | 17 | --- /dev/null |
49 | +++ b/tests/tcg/aarch64/pauth-5.c | 18 | +++ b/docs/system/arm/cubieboard.rst |
50 | @@ -XXX,XX +XXX,XX @@ | 19 | @@ -XXX,XX +XXX,XX @@ |
51 | +#include <assert.h> | 20 | +Cubietech Cubieboard (``cubieboard``) |
21 | +===================================== | ||
52 | + | 22 | + |
53 | +static int x; | 23 | +The ``cubieboard`` model emulates the Cubietech Cubieboard, |
24 | +which is a Cortex-A8 based single-board computer using | ||
25 | +the AllWinner A10 SoC. | ||
54 | + | 26 | + |
55 | +int main() | 27 | +Emulated devices: |
56 | +{ | ||
57 | + int *p0 = &x, *p1, *p2, *p3; | ||
58 | + unsigned long salt = 0; | ||
59 | + | 28 | + |
60 | + /* | 29 | +- Timer |
61 | + * With TBI enabled and a 48-bit VA, there are 7 bits of auth, and so | 30 | +- UART |
62 | + * a 1/128 chance of auth = pac(ptr,key,salt) producing zero. | 31 | +- RTC |
63 | + * Find a salt that creates auth != 0. | 32 | +- EMAC |
64 | + */ | 33 | +- SDHCI |
65 | + do { | 34 | +- USB controller |
66 | + salt++; | 35 | +- SATA controller |
67 | + asm("pacda %0, %1" : "=r"(p1) : "r"(salt), "0"(p0)); | 36 | diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst |
68 | + } while (p0 == p1); | ||
69 | + | ||
70 | + /* | ||
71 | + * This pac must fail, because the input pointer bears an encryption, | ||
72 | + * and so is not properly extended within bits [55:47]. This will | ||
73 | + * toggle bit 54 in the output... | ||
74 | + */ | ||
75 | + asm("pacda %0, %1" : "=r"(p2) : "r"(salt), "0"(p1)); | ||
76 | + | ||
77 | + /* ... so that the aut must fail, setting bit 53 in the output ... */ | ||
78 | + asm("autda %0, %1" : "=r"(p3) : "r"(salt), "0"(p2)); | ||
79 | + | ||
80 | + /* ... which means this equality must not hold. */ | ||
81 | + assert(p3 != p0); | ||
82 | + return 0; | ||
83 | +} | ||
84 | diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target | ||
85 | index XXXXXXX..XXXXXXX 100644 | 37 | index XXXXXXX..XXXXXXX 100644 |
86 | --- a/tests/tcg/aarch64/Makefile.target | 38 | --- a/docs/system/target-arm.rst |
87 | +++ b/tests/tcg/aarch64/Makefile.target | 39 | +++ b/docs/system/target-arm.rst |
88 | @@ -XXX,XX +XXX,XX @@ run-fcvt: fcvt | 40 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running |
89 | 41 | arm/aspeed | |
90 | # Pauth Tests | 42 | arm/sabrelite |
91 | ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_ARMV8_3),) | 43 | arm/digic |
92 | -AARCH64_TESTS += pauth-1 pauth-2 pauth-4 | 44 | + arm/cubieboard |
93 | +AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 | 45 | arm/musicpal |
94 | pauth-%: CFLAGS += -march=armv8.3-a | 46 | arm/gumstix |
95 | run-pauth-%: QEMU_OPTS += -cpu max | 47 | arm/nrf |
96 | run-plugin-pauth-%: QEMU_OPTS += -cpu max | 48 | diff --git a/MAINTAINERS b/MAINTAINERS |
49 | index XXXXXXX..XXXXXXX 100644 | ||
50 | --- a/MAINTAINERS | ||
51 | +++ b/MAINTAINERS | ||
52 | @@ -XXX,XX +XXX,XX @@ S: Odd Fixes | ||
53 | F: hw/*/allwinner* | ||
54 | F: include/hw/*/allwinner* | ||
55 | F: hw/arm/cubieboard.c | ||
56 | +F: docs/system/arm/cubieboard.rst | ||
57 | |||
58 | Allwinner-h3 | ||
59 | M: Niek Linnenbank <nieklinnenbank@gmail.com> | ||
97 | -- | 60 | -- |
98 | 2.20.1 | 61 | 2.20.1 |
99 | 62 | ||
100 | 63 | diff view generated by jsdifflib |
1 | Mostly devices don't need to care whether one of their output | 1 | Add skeletal documentation of the emcraft-sf2 machine. |
---|---|---|---|
2 | qemu_irq lines is connected, because functions like qemu_set_irq() | ||
3 | silently do nothing if there is nothing on the other end. However | ||
4 | sometimes a device might want to implement default behaviour for the | ||
5 | case where the machine hasn't wired the line up to anywhere. | ||
6 | |||
7 | Provide a function qemu_irq_is_connected() that devices can use for | ||
8 | this purpose. (The test is trivial but encapsulating it in a | ||
9 | function makes it easier to see where we're doing it in case we need | ||
10 | to change the implementation later.) | ||
11 | 2 | ||
12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
13 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
14 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 6 | Message-id: 20210713142226.19155-3-peter.maydell@linaro.org |
15 | Message-id: 20200728103744.6909-2-peter.maydell@linaro.org | ||
16 | --- | 7 | --- |
17 | include/hw/irq.h | 18 ++++++++++++++++++ | 8 | docs/system/arm/emcraft-sf2.rst | 15 +++++++++++++++ |
18 | 1 file changed, 18 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 | ||
19 | 13 | ||
20 | diff --git a/include/hw/irq.h b/include/hw/irq.h | 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 | ||
21 | index XXXXXXX..XXXXXXX 100644 | 36 | index XXXXXXX..XXXXXXX 100644 |
22 | --- a/include/hw/irq.h | 37 | --- a/docs/system/target-arm.rst |
23 | +++ b/include/hw/irq.h | 38 | +++ b/docs/system/target-arm.rst |
24 | @@ -XXX,XX +XXX,XX @@ qemu_irq qemu_irq_split(qemu_irq irq1, qemu_irq irq2); | 39 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running |
25 | on an existing vector of qemu_irq. */ | 40 | arm/sabrelite |
26 | void qemu_irq_intercept_in(qemu_irq *gpio_in, qemu_irq_handler handler, int n); | 41 | arm/digic |
27 | 42 | arm/cubieboard | |
28 | +/** | 43 | + arm/emcraft-sf2 |
29 | + * qemu_irq_is_connected: Return true if IRQ line is wired up | 44 | arm/musicpal |
30 | + * | 45 | arm/gumstix |
31 | + * If a qemu_irq has a device on the other (receiving) end of it, | 46 | arm/nrf |
32 | + * return true; otherwise return false. | 47 | diff --git a/MAINTAINERS b/MAINTAINERS |
33 | + * | 48 | index XXXXXXX..XXXXXXX 100644 |
34 | + * Usually device models don't need to care whether the machine model | 49 | --- a/MAINTAINERS |
35 | + * has wired up their outbound qemu_irq lines, because functions like | 50 | +++ b/MAINTAINERS |
36 | + * qemu_set_irq() silently do nothing if there is nothing on the other | 51 | @@ -XXX,XX +XXX,XX @@ M: Peter Maydell <peter.maydell@linaro.org> |
37 | + * end of the line. However occasionally a device model will want to | 52 | L: qemu-arm@nongnu.org |
38 | + * provide default behaviour if its output is left floating, and | 53 | S: Maintained |
39 | + * it can use this function to identify when that is the case. | 54 | F: hw/arm/msf2-som.c |
40 | + */ | 55 | +F: docs/system/arm/emcraft-sf2.rst |
41 | +static inline bool qemu_irq_is_connected(qemu_irq irq) | 56 | |
42 | +{ | 57 | ASPEED BMCs |
43 | + return irq != NULL; | 58 | M: Cédric Le Goater <clg@kaod.org> |
44 | +} | ||
45 | + | ||
46 | #endif | ||
47 | -- | 59 | -- |
48 | 2.20.1 | 60 | 2.20.1 |
49 | 61 | ||
50 | 62 | diff view generated by jsdifflib |
1 | The netduino2 and netduinoplus2 boards forgot to set the system_clock_scale | 1 | Add skeletal documentation for the highbank and midway machines. |
---|---|---|---|
2 | global, which meant that if guest code used the systick timer in "use | ||
3 | the processor clock" mode it would hang because time never advances. | ||
4 | 2 | ||
5 | Set the global to match the documented CPU clock speed of these boards. | 3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
6 | Judging by the data sheet this is slightly simplistic because the | 4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
7 | SoC allows configuration of the SYSCLK source and frequency via the | 5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
8 | RCC (reset and clock control) module, but we don't model that. | 6 | Message-id: 20210713142226.19155-4-peter.maydell@linaro.org |
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 | ||
9 | 13 | ||
10 | Fixes: https://bugs.launchpad.net/qemu/+bug/1876187 | 14 | diff --git a/docs/system/arm/highbank.rst b/docs/system/arm/highbank.rst |
11 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 15 | new file mode 100644 |
12 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 16 | index XXXXXXX..XXXXXXX |
13 | Message-id: 20200727162617.26227-1-peter.maydell@linaro.org | 17 | --- /dev/null |
14 | --- | 18 | +++ b/docs/system/arm/highbank.rst |
15 | hw/arm/netduino2.c | 10 ++++++++++ | 19 | @@ -XXX,XX +XXX,XX @@ |
16 | hw/arm/netduinoplus2.c | 10 ++++++++++ | 20 | +Calxeda Highbank and Midway (``highbank``, ``midway``) |
17 | 2 files changed, 20 insertions(+) | 21 | +====================================================== |
18 | 22 | + | |
19 | diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.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 | ||
20 | index XXXXXXX..XXXXXXX 100644 | 40 | index XXXXXXX..XXXXXXX 100644 |
21 | --- a/hw/arm/netduino2.c | 41 | --- a/docs/system/target-arm.rst |
22 | +++ b/hw/arm/netduino2.c | 42 | +++ b/docs/system/target-arm.rst |
23 | @@ -XXX,XX +XXX,XX @@ | 43 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running |
24 | #include "hw/arm/stm32f205_soc.h" | 44 | arm/digic |
25 | #include "hw/arm/boot.h" | 45 | arm/cubieboard |
26 | 46 | arm/emcraft-sf2 | |
27 | +/* Main SYSCLK frequency in Hz (120MHz) */ | 47 | + arm/highbank |
28 | +#define SYSCLK_FRQ 120000000ULL | 48 | arm/musicpal |
29 | + | 49 | arm/gumstix |
30 | static void netduino2_init(MachineState *machine) | 50 | arm/nrf |
31 | { | 51 | diff --git a/MAINTAINERS b/MAINTAINERS |
32 | DeviceState *dev; | ||
33 | |||
34 | + /* | ||
35 | + * TODO: ideally we would model the SoC RCC and let it handle | ||
36 | + * system_clock_scale, including its ability to define different | ||
37 | + * possible SYSCLK sources. | ||
38 | + */ | ||
39 | + system_clock_scale = NANOSECONDS_PER_SECOND / SYSCLK_FRQ; | ||
40 | + | ||
41 | dev = qdev_new(TYPE_STM32F205_SOC); | ||
42 | qdev_prop_set_string(dev, "cpu-type", ARM_CPU_TYPE_NAME("cortex-m3")); | ||
43 | sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); | ||
44 | diff --git a/hw/arm/netduinoplus2.c b/hw/arm/netduinoplus2.c | ||
45 | index XXXXXXX..XXXXXXX 100644 | 52 | index XXXXXXX..XXXXXXX 100644 |
46 | --- a/hw/arm/netduinoplus2.c | 53 | --- a/MAINTAINERS |
47 | +++ b/hw/arm/netduinoplus2.c | 54 | +++ b/MAINTAINERS |
48 | @@ -XXX,XX +XXX,XX @@ | 55 | @@ -XXX,XX +XXX,XX @@ L: qemu-arm@nongnu.org |
49 | #include "hw/arm/stm32f405_soc.h" | 56 | S: Odd Fixes |
50 | #include "hw/arm/boot.h" | 57 | F: hw/arm/highbank.c |
51 | 58 | F: hw/net/xgmac.c | |
52 | +/* Main SYSCLK frequency in Hz (168MHz) */ | 59 | +F: docs/system/arm/highbank.rst |
53 | +#define SYSCLK_FRQ 168000000ULL | 60 | |
54 | + | 61 | Canon DIGIC |
55 | static void netduinoplus2_init(MachineState *machine) | 62 | M: Antony Pavlov <antonynpavlov@gmail.com> |
56 | { | ||
57 | DeviceState *dev; | ||
58 | |||
59 | + /* | ||
60 | + * TODO: ideally we would model the SoC RCC and let it handle | ||
61 | + * system_clock_scale, including its ability to define different | ||
62 | + * possible SYSCLK sources. | ||
63 | + */ | ||
64 | + system_clock_scale = NANOSECONDS_PER_SECOND / SYSCLK_FRQ; | ||
65 | + | ||
66 | dev = qdev_new(TYPE_STM32F405_SOC); | ||
67 | qdev_prop_set_string(dev, "cpu-type", ARM_CPU_TYPE_NAME("cortex-m4")); | ||
68 | sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); | ||
69 | -- | 63 | -- |
70 | 2.20.1 | 64 | 2.20.1 |
71 | 65 | ||
72 | 66 | diff view generated by jsdifflib |
1 | The MSF2 SoC model and the Stellaris board code both wire | 1 | The Neon and SVE decoders use private 'plus1' functions to implement |
---|---|---|---|
2 | SYSRESETREQ up to a function that just invokes | 2 | "add one" for the !function decoder syntax. We have a generic |
3 | qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); | 3 | "plus_1" function in translate.h, so use that instead. |
4 | This is now the default action that the NVIC does if the line is | ||
5 | not connected, so we can delete the handling code. | ||
6 | 4 | ||
7 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
6 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
8 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 7 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
9 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 8 | Message-id: 20210715095341.701-1-peter.maydell@linaro.org |
10 | Message-id: 20200728103744.6909-4-peter.maydell@linaro.org | ||
11 | --- | 9 | --- |
12 | hw/arm/msf2-soc.c | 11 ----------- | 10 | target/arm/neon-ls.decode | 4 ++-- |
13 | hw/arm/stellaris.c | 12 ------------ | 11 | target/arm/neon-shared.decode | 2 +- |
14 | 2 files changed, 23 deletions(-) | 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(-) | ||
15 | 16 | ||
16 | diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c | 17 | diff --git a/target/arm/neon-ls.decode b/target/arm/neon-ls.decode |
17 | index XXXXXXX..XXXXXXX 100644 | 18 | index XXXXXXX..XXXXXXX 100644 |
18 | --- a/hw/arm/msf2-soc.c | 19 | --- a/target/arm/neon-ls.decode |
19 | +++ b/hw/arm/msf2-soc.c | 20 | +++ b/target/arm/neon-ls.decode |
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 \ | ||
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 | ||
20 | @@ -XXX,XX +XXX,XX @@ | 36 | @@ -XXX,XX +XXX,XX @@ |
21 | #include "hw/irq.h" | 37 | # which is 0 for fp16 and 1 for fp32 into a MO_* constant. |
22 | #include "hw/arm/msf2-soc.h" | 38 | # (Note that this is the reverse of the sense of the 1-bit size |
23 | #include "hw/misc/unimp.h" | 39 | # field in the 3same_fp Neon insns.) |
24 | -#include "sysemu/runstate.h" | 40 | -%vcadd_size 20:1 !function=plus1 |
25 | #include "sysemu/sysemu.h" | 41 | +%vcadd_size 20:1 !function=plus_1 |
26 | 42 | ||
27 | #define MSF2_TIMER_BASE 0x40004000 | 43 | VCMLA 1111 110 rot:2 . 1 . .... .... 1000 . q:1 . 0 .... \ |
28 | @@ -XXX,XX +XXX,XX @@ static const int spi_irq[MSF2_NUM_SPIS] = { 2, 3 }; | 44 | vm=%vm_dp vn=%vn_dp vd=%vd_dp size=%vcadd_size |
29 | static const int uart_irq[MSF2_NUM_UARTS] = { 10, 11 }; | 45 | diff --git a/target/arm/sve.decode b/target/arm/sve.decode |
30 | static const int timer_irq[MSF2_NUM_TIMERS] = { 14, 15 }; | 46 | index XXXXXXX..XXXXXXX 100644 |
31 | 47 | --- a/target/arm/sve.decode | |
32 | -static void do_sys_reset(void *opaque, int n, int level) | 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) | ||
33 | -{ | 67 | -{ |
34 | - if (level) { | 68 | - return x + 1; |
35 | - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); | ||
36 | - } | ||
37 | -} | 69 | -} |
38 | - | 70 | - |
39 | static void m2sxxx_soc_initfn(Object *obj) | 71 | static inline int neon_3same_fp_size(DisasContext *s, int x) |
40 | { | 72 | { |
41 | MSF2State *s = MSF2_SOC(obj); | 73 | /* Convert 0==fp32, 1==fp16 into a MO_* value */ |
42 | @@ -XXX,XX +XXX,XX @@ static void m2sxxx_soc_realize(DeviceState *dev_soc, Error **errp) | 74 | diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c |
43 | return; | ||
44 | } | ||
45 | |||
46 | - qdev_connect_gpio_out_named(DEVICE(&s->armv7m.nvic), "SYSRESETREQ", 0, | ||
47 | - qemu_allocate_irq(&do_sys_reset, NULL, 0)); | ||
48 | - | ||
49 | system_clock_scale = NANOSECONDS_PER_SECOND / s->m3clk; | ||
50 | |||
51 | for (i = 0; i < MSF2_NUM_UARTS; i++) { | ||
52 | diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c | ||
53 | index XXXXXXX..XXXXXXX 100644 | 75 | index XXXXXXX..XXXXXXX 100644 |
54 | --- a/hw/arm/stellaris.c | 76 | --- a/target/arm/translate-sve.c |
55 | +++ b/hw/arm/stellaris.c | 77 | +++ b/target/arm/translate-sve.c |
56 | @@ -XXX,XX +XXX,XX @@ | 78 | @@ -XXX,XX +XXX,XX @@ static int tszimm_shl(DisasContext *s, int x) |
57 | #include "hw/boards.h" | 79 | return x - (8 << tszimm_esz(s, x)); |
58 | #include "qemu/log.h" | ||
59 | #include "exec/address-spaces.h" | ||
60 | -#include "sysemu/runstate.h" | ||
61 | #include "sysemu/sysemu.h" | ||
62 | #include "hw/arm/armv7m.h" | ||
63 | #include "hw/char/pl011.h" | ||
64 | @@ -XXX,XX +XXX,XX @@ static void stellaris_adc_init(Object *obj) | ||
65 | qdev_init_gpio_in(dev, stellaris_adc_trigger, 1); | ||
66 | } | 80 | } |
67 | 81 | ||
68 | -static | 82 | -static inline int plus1(DisasContext *s, int x) |
69 | -void do_sys_reset(void *opaque, int n, int level) | ||
70 | -{ | 83 | -{ |
71 | - if (level) { | 84 | - return x + 1; |
72 | - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); | ||
73 | - } | ||
74 | -} | 85 | -} |
75 | - | 86 | - |
76 | /* Board init. */ | 87 | /* The SH bit is in bit 8. Extract the low 8 and shift. */ |
77 | static stellaris_board_info stellaris_boards[] = { | 88 | static inline int expand_imm_sh8s(DisasContext *s, int x) |
78 | { "LM3S811EVB", | 89 | { |
79 | @@ -XXX,XX +XXX,XX @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) | ||
80 | /* This will exit with an error if the user passed us a bad cpu_type */ | ||
81 | sysbus_realize_and_unref(SYS_BUS_DEVICE(nvic), &error_fatal); | ||
82 | |||
83 | - qdev_connect_gpio_out_named(nvic, "SYSRESETREQ", 0, | ||
84 | - qemu_allocate_irq(&do_sys_reset, NULL, 0)); | ||
85 | - | ||
86 | if (board->dc1 & (1 << 16)) { | ||
87 | dev = sysbus_create_varargs(TYPE_STELLARIS_ADC, 0x40038000, | ||
88 | qdev_get_gpio_in(nvic, 14), | ||
89 | -- | 90 | -- |
90 | 2.20.1 | 91 | 2.20.1 |
91 | 92 | ||
92 | 93 | diff view generated by jsdifflib |