1 | Couple of minor patches to sneak in before rc0. The PSCI return | 1 | Respin to fix some accidental wrong Author lines, no content |
---|---|---|---|
2 | values fix is the most important one. | 2 | changes. |
3 | 3 | ||
4 | -- PMM | 4 | -- PMM |
5 | 5 | ||
6 | The following changes since commit 94b5d57d2f5a3c849cecd65e424bb6f50b998df9: | 6 | The following changes since commit 0bbba1665ca2e7f1c80d4797077fe57bad58898e: |
7 | 7 | ||
8 | Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170314' into staging (2017-03-14 10:13:19 +0000) | 8 | Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-october-2018-part-4' into staging (2018-10-30 10:45:49 +0000) |
9 | 9 | ||
10 | are available in the git repository at: | 10 | are available in the Git repository at: |
11 | 11 | ||
12 | git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20170314 | 12 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20181030 |
13 | 13 | ||
14 | for you to fetch changes up to d5affb0d8677e1a8a8fe03fa25005b669e7cdc02: | 14 | for you to fetch changes up to 1f5a65a188210509bfb0c025fc91635c8436b98a: |
15 | 15 | ||
16 | target/arm/arm-powerctl: Fix psci info return values (2017-03-14 11:28:54 +0000) | 16 | tests/boot-serial-test: Add microbit board testcase (2018-10-30 13:20:18 +0000) |
17 | 17 | ||
18 | ---------------------------------------------------------------- | 18 | ---------------------------------------------------------------- |
19 | target-arm queue: | 19 | target-arm queue: |
20 | * arm-powerctl: Fix psci info return values | 20 | * microbit: Add the UART to our nRF51 SoC model |
21 | * implement armv8 PMUSERENR (user-mode enable bits) | 21 | * Add a virtual Xilinx Versal board "xlnx-versal-virt" |
22 | * hw/arm/virt: Set VIRT_COMPAT_3_0 compat | ||
22 | 23 | ||
23 | ---------------------------------------------------------------- | 24 | ---------------------------------------------------------------- |
24 | Andrew Baumann (1): | 25 | Edgar E. Iglesias (2): |
25 | target/arm: implement armv8 PMUSERENR (user-mode enable bits) | 26 | hw/arm: versal: Add a model of Xilinx Versal SoC |
27 | hw/arm: versal: Add a virtual Xilinx Versal board | ||
26 | 28 | ||
27 | Andrew Jones (1): | 29 | Eric Auger (1): |
28 | target/arm/arm-powerctl: Fix psci info return values | 30 | hw/arm/virt: Set VIRT_COMPAT_3_0 compat |
29 | 31 | ||
30 | target/arm/cpu.h | 4 +-- | 32 | Julia Suvorova (3): |
31 | target/arm/helper.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++------ | 33 | hw/char: Implement nRF51 SoC UART |
32 | 2 files changed, 73 insertions(+), 10 deletions(-) | 34 | hw/arm/nrf51_soc: Connect UART to nRF51 SoC |
35 | tests/boot-serial-test: Add microbit board testcase | ||
33 | 36 | ||
37 | hw/arm/Makefile.objs | 1 + | ||
38 | hw/char/Makefile.objs | 1 + | ||
39 | include/hw/arm/nrf51_soc.h | 3 + | ||
40 | include/hw/arm/xlnx-versal.h | 122 +++++++++ | ||
41 | include/hw/char/nrf51_uart.h | 78 ++++++ | ||
42 | hw/arm/microbit.c | 2 + | ||
43 | hw/arm/nrf51_soc.c | 20 ++ | ||
44 | hw/arm/virt.c | 4 + | ||
45 | hw/arm/xlnx-versal-virt.c | 493 ++++++++++++++++++++++++++++++++++++ | ||
46 | hw/arm/xlnx-versal.c | 323 +++++++++++++++++++++++ | ||
47 | hw/char/nrf51_uart.c | 330 ++++++++++++++++++++++++ | ||
48 | tests/boot-serial-test.c | 19 ++ | ||
49 | default-configs/aarch64-softmmu.mak | 1 + | ||
50 | hw/char/trace-events | 4 + | ||
51 | 14 files changed, 1401 insertions(+) | ||
52 | create mode 100644 include/hw/arm/xlnx-versal.h | ||
53 | create mode 100644 include/hw/char/nrf51_uart.h | ||
54 | create mode 100644 hw/arm/xlnx-versal-virt.c | ||
55 | create mode 100644 hw/arm/xlnx-versal.c | ||
56 | create mode 100644 hw/char/nrf51_uart.c | ||
57 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Andrew Baumann <Andrew.Baumann@microsoft.com> | ||
2 | 1 | ||
3 | In armv8, this register implements more than a single bit, with | ||
4 | fine-grained enables for read access to event counters, cycles | ||
5 | counters, and write access to the software increment. This change | ||
6 | implements those checks using custom access functions for the relevant | ||
7 | registers. | ||
8 | |||
9 | Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com> | ||
10 | Message-id: 20170228215801.10472-2-Andrew.Baumann@microsoft.com | ||
11 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
12 | [PMM: move a couple of access functions to be only compiled | ||
13 | ifndef CONFIG_USER_ONLY to avoid compiler warnings] | ||
14 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
15 | --- | ||
16 | target/arm/helper.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++------ | ||
17 | 1 file changed, 71 insertions(+), 8 deletions(-) | ||
18 | |||
19 | diff --git a/target/arm/helper.c b/target/arm/helper.c | ||
20 | index XXXXXXX..XXXXXXX 100644 | ||
21 | --- a/target/arm/helper.c | ||
22 | +++ b/target/arm/helper.c | ||
23 | @@ -XXX,XX +XXX,XX @@ static CPAccessResult pmreg_access(CPUARMState *env, const ARMCPRegInfo *ri, | ||
24 | */ | ||
25 | int el = arm_current_el(env); | ||
26 | |||
27 | - if (el == 0 && !env->cp15.c9_pmuserenr) { | ||
28 | + if (el == 0 && !(env->cp15.c9_pmuserenr & 1)) { | ||
29 | return CP_ACCESS_TRAP; | ||
30 | } | ||
31 | if (el < 2 && (env->cp15.mdcr_el2 & MDCR_TPM) | ||
32 | @@ -XXX,XX +XXX,XX @@ static CPAccessResult pmreg_access(CPUARMState *env, const ARMCPRegInfo *ri, | ||
33 | return CP_ACCESS_OK; | ||
34 | } | ||
35 | |||
36 | +static CPAccessResult pmreg_access_xevcntr(CPUARMState *env, | ||
37 | + const ARMCPRegInfo *ri, | ||
38 | + bool isread) | ||
39 | +{ | ||
40 | + /* ER: event counter read trap control */ | ||
41 | + if (arm_feature(env, ARM_FEATURE_V8) | ||
42 | + && arm_current_el(env) == 0 | ||
43 | + && (env->cp15.c9_pmuserenr & (1 << 3)) != 0 | ||
44 | + && isread) { | ||
45 | + return CP_ACCESS_OK; | ||
46 | + } | ||
47 | + | ||
48 | + return pmreg_access(env, ri, isread); | ||
49 | +} | ||
50 | + | ||
51 | +static CPAccessResult pmreg_access_swinc(CPUARMState *env, | ||
52 | + const ARMCPRegInfo *ri, | ||
53 | + bool isread) | ||
54 | +{ | ||
55 | + /* SW: software increment write trap control */ | ||
56 | + if (arm_feature(env, ARM_FEATURE_V8) | ||
57 | + && arm_current_el(env) == 0 | ||
58 | + && (env->cp15.c9_pmuserenr & (1 << 1)) != 0 | ||
59 | + && !isread) { | ||
60 | + return CP_ACCESS_OK; | ||
61 | + } | ||
62 | + | ||
63 | + return pmreg_access(env, ri, isread); | ||
64 | +} | ||
65 | + | ||
66 | #ifndef CONFIG_USER_ONLY | ||
67 | |||
68 | +static CPAccessResult pmreg_access_selr(CPUARMState *env, | ||
69 | + const ARMCPRegInfo *ri, | ||
70 | + bool isread) | ||
71 | +{ | ||
72 | + /* ER: event counter read trap control */ | ||
73 | + if (arm_feature(env, ARM_FEATURE_V8) | ||
74 | + && arm_current_el(env) == 0 | ||
75 | + && (env->cp15.c9_pmuserenr & (1 << 3)) != 0) { | ||
76 | + return CP_ACCESS_OK; | ||
77 | + } | ||
78 | + | ||
79 | + return pmreg_access(env, ri, isread); | ||
80 | +} | ||
81 | + | ||
82 | +static CPAccessResult pmreg_access_ccntr(CPUARMState *env, | ||
83 | + const ARMCPRegInfo *ri, | ||
84 | + bool isread) | ||
85 | +{ | ||
86 | + /* CR: cycle counter read trap control */ | ||
87 | + if (arm_feature(env, ARM_FEATURE_V8) | ||
88 | + && arm_current_el(env) == 0 | ||
89 | + && (env->cp15.c9_pmuserenr & (1 << 2)) != 0 | ||
90 | + && isread) { | ||
91 | + return CP_ACCESS_OK; | ||
92 | + } | ||
93 | + | ||
94 | + return pmreg_access(env, ri, isread); | ||
95 | +} | ||
96 | + | ||
97 | static inline bool arm_ccnt_enabled(CPUARMState *env) | ||
98 | { | ||
99 | /* This does not support checking PMCCFILTR_EL0 register */ | ||
100 | @@ -XXX,XX +XXX,XX @@ static uint64_t pmxevtyper_read(CPUARMState *env, const ARMCPRegInfo *ri) | ||
101 | static void pmuserenr_write(CPUARMState *env, const ARMCPRegInfo *ri, | ||
102 | uint64_t value) | ||
103 | { | ||
104 | - env->cp15.c9_pmuserenr = value & 1; | ||
105 | + if (arm_feature(env, ARM_FEATURE_V8)) { | ||
106 | + env->cp15.c9_pmuserenr = value & 0xf; | ||
107 | + } else { | ||
108 | + env->cp15.c9_pmuserenr = value & 1; | ||
109 | + } | ||
110 | } | ||
111 | |||
112 | static void pmintenset_write(CPUARMState *env, const ARMCPRegInfo *ri, | ||
113 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo v7_cp_reginfo[] = { | ||
114 | .raw_writefn = raw_write }, | ||
115 | /* Unimplemented so WI. */ | ||
116 | { .name = "PMSWINC", .cp = 15, .crn = 9, .crm = 12, .opc1 = 0, .opc2 = 4, | ||
117 | - .access = PL0_W, .accessfn = pmreg_access, .type = ARM_CP_NOP }, | ||
118 | + .access = PL0_W, .accessfn = pmreg_access_swinc, .type = ARM_CP_NOP }, | ||
119 | #ifndef CONFIG_USER_ONLY | ||
120 | { .name = "PMSELR", .cp = 15, .crn = 9, .crm = 12, .opc1 = 0, .opc2 = 5, | ||
121 | .access = PL0_RW, .type = ARM_CP_ALIAS, | ||
122 | .fieldoffset = offsetoflow32(CPUARMState, cp15.c9_pmselr), | ||
123 | - .accessfn = pmreg_access, .writefn = pmselr_write, | ||
124 | + .accessfn = pmreg_access_selr, .writefn = pmselr_write, | ||
125 | .raw_writefn = raw_write}, | ||
126 | { .name = "PMSELR_EL0", .state = ARM_CP_STATE_AA64, | ||
127 | .opc0 = 3, .opc1 = 3, .crn = 9, .crm = 12, .opc2 = 5, | ||
128 | - .access = PL0_RW, .accessfn = pmreg_access, | ||
129 | + .access = PL0_RW, .accessfn = pmreg_access_selr, | ||
130 | .fieldoffset = offsetof(CPUARMState, cp15.c9_pmselr), | ||
131 | .writefn = pmselr_write, .raw_writefn = raw_write, }, | ||
132 | { .name = "PMCCNTR", .cp = 15, .crn = 9, .crm = 13, .opc1 = 0, .opc2 = 0, | ||
133 | .access = PL0_RW, .resetvalue = 0, .type = ARM_CP_IO, | ||
134 | .readfn = pmccntr_read, .writefn = pmccntr_write32, | ||
135 | - .accessfn = pmreg_access }, | ||
136 | + .accessfn = pmreg_access_ccntr }, | ||
137 | { .name = "PMCCNTR_EL0", .state = ARM_CP_STATE_AA64, | ||
138 | .opc0 = 3, .opc1 = 3, .crn = 9, .crm = 13, .opc2 = 0, | ||
139 | - .access = PL0_RW, .accessfn = pmreg_access, | ||
140 | + .access = PL0_RW, .accessfn = pmreg_access_ccntr, | ||
141 | .type = ARM_CP_IO, | ||
142 | .readfn = pmccntr_read, .writefn = pmccntr_write, }, | ||
143 | #endif | ||
144 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo v7_cp_reginfo[] = { | ||
145 | /* Unimplemented, RAZ/WI. */ | ||
146 | { .name = "PMXEVCNTR", .cp = 15, .crn = 9, .crm = 13, .opc1 = 0, .opc2 = 2, | ||
147 | .access = PL0_RW, .type = ARM_CP_CONST, .resetvalue = 0, | ||
148 | - .accessfn = pmreg_access }, | ||
149 | + .accessfn = pmreg_access_xevcntr }, | ||
150 | { .name = "PMUSERENR", .cp = 15, .crn = 9, .crm = 14, .opc1 = 0, .opc2 = 0, | ||
151 | .access = PL0_R | PL1_RW, .accessfn = access_tpm, | ||
152 | .fieldoffset = offsetof(CPUARMState, cp15.c9_pmuserenr), | ||
153 | -- | ||
154 | 2.7.4 | ||
155 | |||
156 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Andrew Jones <drjones@redhat.com> | ||
2 | 1 | ||
3 | The power state spec section 5.1.5 AFFINITY_INFO defines the | ||
4 | affinity info return values as | ||
5 | |||
6 | 0 ON | ||
7 | 1 OFF | ||
8 | 2 ON_PENDING | ||
9 | |||
10 | I grepped QEMU for power_state to ensure that no assumptions | ||
11 | of OFF=0 were being made. | ||
12 | |||
13 | Signed-off-by: Andrew Jones <drjones@redhat.com> | ||
14 | Message-id: 20170303123232.4967-1-drjones@redhat.com | ||
15 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
16 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
17 | --- | ||
18 | target/arm/cpu.h | 4 ++-- | ||
19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/target/arm/cpu.h b/target/arm/cpu.h | ||
22 | index XXXXXXX..XXXXXXX 100644 | ||
23 | --- a/target/arm/cpu.h | ||
24 | +++ b/target/arm/cpu.h | ||
25 | @@ -XXX,XX +XXX,XX @@ typedef void ARMELChangeHook(ARMCPU *cpu, void *opaque); | ||
26 | /* These values map onto the return values for | ||
27 | * QEMU_PSCI_0_2_FN_AFFINITY_INFO */ | ||
28 | typedef enum ARMPSCIState { | ||
29 | - PSCI_OFF = 0, | ||
30 | - PSCI_ON = 1, | ||
31 | + PSCI_ON = 0, | ||
32 | + PSCI_OFF = 1, | ||
33 | PSCI_ON_PENDING = 2 | ||
34 | } ARMPSCIState; | ||
35 | |||
36 | -- | ||
37 | 2.7.4 | ||
38 | |||
39 | diff view generated by jsdifflib |