1
Arm patch queue -- these are all bug fix patches but we might
1
Some Arm bugfixes for rc2...
2
as well put them in to rc0...
3
2
4
thanks
3
thanks
5
-- PMM
4
-- PMM
6
5
7
The following changes since commit 2c8cfc0b52b5a4d123c26c0b5fdf941be24805be:
6
The following changes since commit e6ebbd46b6e539f3613136111977721d212c2812:
8
7
9
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-03-19 11:44:26 +0000)
8
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-11-19 14:31:48 +0000)
10
9
11
are available in the Git repository at:
10
are available in the Git repository at:
12
11
13
git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20180319
12
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20181119
14
13
15
for you to fetch changes up to ff72cb6b46b95bb530787add5277c211af3d31c6:
14
for you to fetch changes up to a00d7f2048c2a1a6a4487ac195c804c78adcf60e:
16
15
17
hw/arm/raspi: Provide spin-loop code for AArch64 CPUs (2018-03-19 18:23:24 +0000)
16
MAINTAINERS: list myself as maintainer for various Arm boards (2018-11-19 15:55:11 +0000)
18
17
19
----------------------------------------------------------------
18
----------------------------------------------------------------
20
target-arm queue:
19
target-arm queue:
21
* fsl-imx6: Fix incorrect Ethernet interrupt defines
20
* various MAINTAINERS file updates
22
* dump: Update correct kdump phys_base field for AArch64
21
* hw/block/onenand: use qemu_log_mask() for reporting
23
* char: i.MX: Add support for "TX complete" interrupt
22
* hw/block/onenand: Fix off-by-one error allowing out-of-bounds read
24
* bcm2836/raspi: Fix various bugs resulting in panics trying
23
on the n800 and n810 machine models
25
to boot a Debian Linux kernel on raspi3
24
* target/arm: fix smc incorrectly trapping to EL3 when secure is off
25
* hw/arm/stm32f205: Fix the UART and Timer region size
26
* target/arm: read ID registers for KVM guests so they can be
27
used to gate "is feature X present" checks
26
28
27
----------------------------------------------------------------
29
----------------------------------------------------------------
28
Andrey Smirnov (2):
30
Luc Michel (1):
29
char: i.MX: Simplify imx_update()
31
target/arm: fix smc incorrectly trapping to EL3 when secure is off
30
char: i.MX: Add support for "TX complete" interrupt
31
32
32
Guenter Roeck (1):
33
Peter Maydell (3):
33
fsl-imx6: Swap Ethernet interrupt defines
34
hw/block/onenand: Fix off-by-one error allowing out-of-bounds read
35
hw/block/onenand: use qemu_log_mask() for reporting
36
MAINTAINERS: list myself as maintainer for various Arm boards
34
37
35
Peter Maydell (9):
38
Richard Henderson (4):
36
hw/arm/raspi: Don't do board-setup or secure-boot for raspi3
39
target/arm: Install ARMISARegisters from kvm host
37
hw/arm/boot: assert that secure_boot and secure_board_setup are false for AArch64
40
target/arm: Fill in ARMISARegisters for kvm64
38
hw/arm/boot: If booting a kernel in EL2, set SCR_EL3.HCE
41
target/arm: Introduce read_sys_reg32 for kvm32
39
hw/arm/bcm2386: Fix parent type of bcm2386
42
target/arm: Fill in ARMISARegisters for kvm32
40
hw/arm/bcm2836: Rename bcm2836 type/struct to bcm283x
41
hw/arm/bcm2836: Create proper bcm2837 device
42
hw/arm/bcm2836: Use correct affinity values for BCM2837
43
hw/arm/bcm2836: Hardcode correct CPU type
44
hw/arm/raspi: Provide spin-loop code for AArch64 CPUs
45
43
46
Wei Huang (1):
44
Seth Kintigh (1):
47
dump: Update correct kdump phys_base field for AArch64
45
hw/arm/stm32f205: Fix the UART and Timer region size
48
46
49
include/hw/arm/bcm2836.h | 31 +++++++++++++---
47
Thomas Huth (1):
50
include/hw/arm/fsl-imx6.h | 4 +-
48
MAINTAINERS: Add entries for missing ARM boards
51
include/hw/char/imx_serial.h | 3 ++
52
dump.c | 14 +++++--
53
hw/arm/bcm2836.c | 87 +++++++++++++++++++++++++++++++-------------
54
hw/arm/boot.c | 12 ++++++
55
hw/arm/raspi.c | 77 +++++++++++++++++++++++++++++++--------
56
hw/char/imx_serial.c | 44 ++++++++++++++++------
57
hw/net/imx_fec.c | 28 +++++++++++++-
58
9 files changed, 237 insertions(+), 63 deletions(-)
59
49
50
target/arm/kvm_arm.h | 1 +
51
hw/block/onenand.c | 24 +++++-----
52
hw/char/stm32f2xx_usart.c | 2 +-
53
hw/timer/stm32f2xx_timer.c | 2 +-
54
target/arm/kvm.c | 1 +
55
target/arm/kvm32.c | 77 ++++++++++++++++++++------------
56
target/arm/kvm64.c | 90 +++++++++++++++++++++++++++++++++++++-
57
target/arm/op_helper.c | 54 +++++++++++++++++++----
58
MAINTAINERS | 106 +++++++++++++++++++++++++++++++++++++++------
59
9 files changed, 293 insertions(+), 64 deletions(-)
60
diff view generated by jsdifflib
1
From: Andrey Smirnov <andrew.smirnov@gmail.com>
1
From: Richard Henderson <richard.henderson@linaro.org>
2
2
3
Code of imx_update() is slightly confusing since the "flags" variable
3
The ID registers are replacing (some of) the feature bits.
4
doesn't really corespond to anything in real hardware and server as a
4
We need (some of) these values to determine the set of data
5
kitchensink accumulating events normally reported via USR1 and USR2
5
to be handled during migration.
6
registers.
7
6
8
Change the code to explicitly evaluate state of interrupts reported
7
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
9
via USR1 and USR2 against corresponding masking bits and use the to
8
Message-id: 20181113180154.17903-2-richard.henderson@linaro.org
10
detemine if IRQ line should be asserted or not.
11
12
NOTE: Check for UTS1_TXEMPTY being set has been dropped for two
13
reasons:
14
15
1. Emulation code implements a single character FIFO, so this flag
16
will always be set since characters are trasmitted as a part of
17
the code emulating "push" into the FIFO
18
19
2. imx_update() is really just a function doing ORing and maksing
20
of reported events, so checking for UTS1_TXEMPTY should happen,
21
if it's ever really needed should probably happen outside of
22
it.
23
24
Cc: qemu-devel@nongnu.org
25
Cc: qemu-arm@nongnu.org
26
Cc: Bill Paul <wpaul@windriver.com>
27
Cc: Peter Maydell <peter.maydell@linaro.org>
28
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
29
Message-id: 20180315191141.6789-1-andrew.smirnov@gmail.com
30
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
9
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
31
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
32
---
11
---
33
hw/char/imx_serial.c | 24 ++++++++++++++++--------
12
target/arm/kvm_arm.h | 1 +
34
1 file changed, 16 insertions(+), 8 deletions(-)
13
target/arm/kvm.c | 1 +
14
2 files changed, 2 insertions(+)
35
15
36
diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c
16
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
37
index XXXXXXX..XXXXXXX 100644
17
index XXXXXXX..XXXXXXX 100644
38
--- a/hw/char/imx_serial.c
18
--- a/target/arm/kvm_arm.h
39
+++ b/hw/char/imx_serial.c
19
+++ b/target/arm/kvm_arm.h
40
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_imx_serial = {
20
@@ -XXX,XX +XXX,XX @@ void kvm_arm_destroy_scratch_host_vcpu(int *fdarray);
41
21
* by asking the host kernel)
42
static void imx_update(IMXSerialState *s)
22
*/
43
{
23
typedef struct ARMHostCPUFeatures {
44
- uint32_t flags;
24
+ ARMISARegisters isar;
45
+ uint32_t usr1;
25
uint64_t features;
46
+ uint32_t usr2;
26
uint32_t target;
47
+ uint32_t mask;
27
const char *dtb_compatible;
48
28
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
49
- flags = (s->usr1 & s->ucr1) & (USR1_TRDY|USR1_RRDY);
29
index XXXXXXX..XXXXXXX 100644
50
- if (s->ucr1 & UCR1_TXMPTYEN) {
30
--- a/target/arm/kvm.c
51
- flags |= (s->uts1 & UTS1_TXEMPTY);
31
+++ b/target/arm/kvm.c
52
- } else {
32
@@ -XXX,XX +XXX,XX @@ void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu)
53
- flags &= ~USR1_TRDY;
33
54
- }
34
cpu->kvm_target = arm_host_cpu_features.target;
55
+ /*
35
cpu->dtb_compatible = arm_host_cpu_features.dtb_compatible;
56
+ * Lucky for us TRDY and RRDY has the same offset in both USR1 and
36
+ cpu->isar = arm_host_cpu_features.isar;
57
+ * UCR1, so we can get away with something as simple as the
37
env->features = arm_host_cpu_features.features;
58
+ * following:
59
+ */
60
+ usr1 = s->usr1 & s->ucr1 & (USR1_TRDY | USR1_RRDY);
61
+ /*
62
+ * Bits that we want in USR2 are not as conveniently laid out,
63
+ * unfortunately.
64
+ */
65
+ mask = (s->ucr1 & UCR1_TXMPTYEN) ? USR2_TXFE : 0;
66
+ usr2 = s->usr2 & mask;
67
68
- qemu_set_irq(s->irq, !!flags);
69
+ qemu_set_irq(s->irq, usr1 || usr2);
70
}
38
}
71
39
72
static void imx_serial_reset(IMXSerialState *s)
73
--
40
--
74
2.16.2
41
2.19.1
75
42
76
43
diff view generated by jsdifflib
1
The BCM2837 sets the Aff1 field of the MPIDR affinity values for the
1
From: Richard Henderson <richard.henderson@linaro.org>
2
CPUs to 0, whereas the BCM2836 uses 0xf. Set this correctly, as it
3
is required for Linux to boot.
4
2
3
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4
Message-id: 20181113180154.17903-3-richard.henderson@linaro.org
5
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
5
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Reviewed-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
7
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
8
Message-id: 20180313153458.26822-8-peter.maydell@linaro.org
9
---
7
---
10
hw/arm/bcm2836.c | 11 +++++++----
8
target/arm/kvm64.c | 90 ++++++++++++++++++++++++++++++++++++++++++++--
11
1 file changed, 7 insertions(+), 4 deletions(-)
9
1 file changed, 88 insertions(+), 2 deletions(-)
12
10
13
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
11
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
14
index XXXXXXX..XXXXXXX 100644
12
index XXXXXXX..XXXXXXX 100644
15
--- a/hw/arm/bcm2836.c
13
--- a/target/arm/kvm64.c
16
+++ b/hw/arm/bcm2836.c
14
+++ b/target/arm/kvm64.c
17
@@ -XXX,XX +XXX,XX @@
15
@@ -XXX,XX +XXX,XX @@ static inline void unset_feature(uint64_t *features, int feature)
18
16
*features &= ~(1ULL << feature);
19
struct BCM283XInfo {
17
}
20
const char *name;
18
21
+ int clusterid;
19
+static int read_sys_reg32(int fd, uint32_t *pret, uint64_t id)
22
};
20
+{
23
21
+ uint64_t ret;
24
static const BCM283XInfo bcm283x_socs[] = {
22
+ struct kvm_one_reg idreg = { .id = id, .addr = (uintptr_t)&ret };
25
{
23
+ int err;
26
.name = TYPE_BCM2836,
24
+
27
+ .clusterid = 0xf,
25
+ assert((id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U64);
28
},
26
+ err = ioctl(fd, KVM_GET_ONE_REG, &idreg);
29
{
27
+ if (err < 0) {
30
.name = TYPE_BCM2837,
28
+ return -1;
31
+ .clusterid = 0x0,
29
+ }
32
},
30
+ *pret = ret;
33
};
31
+ return 0;
34
32
+}
35
@@ -XXX,XX +XXX,XX @@ static void bcm2836_init(Object *obj)
33
+
36
static void bcm2836_realize(DeviceState *dev, Error **errp)
34
+static int read_sys_reg64(int fd, uint64_t *pret, uint64_t id)
35
+{
36
+ struct kvm_one_reg idreg = { .id = id, .addr = (uintptr_t)pret };
37
+
38
+ assert((id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U64);
39
+ return ioctl(fd, KVM_GET_ONE_REG, &idreg);
40
+}
41
+
42
bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
37
{
43
{
38
BCM283XState *s = BCM283X(dev);
44
/* Identify the feature bits corresponding to the host CPU, and
39
+ BCM283XClass *bc = BCM283X_GET_CLASS(dev);
45
* fill out the ARMHostCPUClass fields accordingly. To do this
40
+ const BCM283XInfo *info = bc->info;
46
* we have to create a scratch VM, create a single CPU inside it,
41
Object *obj;
47
* and then query that CPU for the relevant ID registers.
42
Error *err = NULL;
48
- * For AArch64 we currently don't care about ID registers at
43
int n;
49
- * all; we just want to know the CPU type.
44
@@ -XXX,XX +XXX,XX @@ static void bcm2836_realize(DeviceState *dev, Error **errp)
50
*/
45
qdev_get_gpio_in_named(DEVICE(&s->control), "gpu-fiq", 0));
51
int fdarray[3];
46
52
uint64_t features = 0;
47
for (n = 0; n < BCM283X_NCPUS; n++) {
53
+ int err;
48
- /* Mirror bcm2836, which has clusterid set to 0xf
54
+
49
- * TODO: this should be converted to a property of ARM_CPU
55
/* Old kernels may not know about the PREFERRED_TARGET ioctl: however
50
- */
56
* we know these will only support creating one kind of guest CPU,
51
- s->cpus[n].mp_affinity = 0xF00 | n;
57
* which is its preferred CPU type. Fortunately these old kernels
52
+ /* TODO: this should be converted to a property of ARM_CPU */
58
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
53
+ s->cpus[n].mp_affinity = (info->clusterid << 8) | n;
59
ahcf->target = init.target;
54
60
ahcf->dtb_compatible = "arm,arm-v8";
55
/* set periphbase/CBAR value for CPU-local registers */
61
56
object_property_set_int(OBJECT(&s->cpus[n]),
62
+ err = read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64pfr0,
63
+ ARM64_SYS_REG(3, 0, 0, 4, 0));
64
+ if (unlikely(err < 0)) {
65
+ /*
66
+ * Before v4.15, the kernel only exposed a limited number of system
67
+ * registers, not including any of the interesting AArch64 ID regs.
68
+ * For the most part we could leave these fields as zero with minimal
69
+ * effect, since this does not affect the values seen by the guest.
70
+ *
71
+ * However, it could cause problems down the line for QEMU,
72
+ * so provide a minimal v8.0 default.
73
+ *
74
+ * ??? Could read MIDR and use knowledge from cpu64.c.
75
+ * ??? Could map a page of memory into our temp guest and
76
+ * run the tiniest of hand-crafted kernels to extract
77
+ * the values seen by the guest.
78
+ * ??? Either of these sounds like too much effort just
79
+ * to work around running a modern host kernel.
80
+ */
81
+ ahcf->isar.id_aa64pfr0 = 0x00000011; /* EL1&0, AArch64 only */
82
+ err = 0;
83
+ } else {
84
+ err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64pfr1,
85
+ ARM64_SYS_REG(3, 0, 0, 4, 1));
86
+ err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64isar0,
87
+ ARM64_SYS_REG(3, 0, 0, 6, 0));
88
+ err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64isar1,
89
+ ARM64_SYS_REG(3, 0, 0, 6, 1));
90
+
91
+ /*
92
+ * Note that if AArch32 support is not present in the host,
93
+ * the AArch32 sysregs are present to be read, but will
94
+ * return UNKNOWN values. This is neither better nor worse
95
+ * than skipping the reads and leaving 0, as we must avoid
96
+ * considering the values in every case.
97
+ */
98
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar0,
99
+ ARM64_SYS_REG(3, 0, 0, 2, 0));
100
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar1,
101
+ ARM64_SYS_REG(3, 0, 0, 2, 1));
102
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar2,
103
+ ARM64_SYS_REG(3, 0, 0, 2, 2));
104
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar3,
105
+ ARM64_SYS_REG(3, 0, 0, 2, 3));
106
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar4,
107
+ ARM64_SYS_REG(3, 0, 0, 2, 4));
108
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar5,
109
+ ARM64_SYS_REG(3, 0, 0, 2, 5));
110
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar6,
111
+ ARM64_SYS_REG(3, 0, 0, 2, 7));
112
+
113
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr0,
114
+ ARM64_SYS_REG(3, 0, 0, 3, 0));
115
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr1,
116
+ ARM64_SYS_REG(3, 0, 0, 3, 1));
117
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr2,
118
+ ARM64_SYS_REG(3, 0, 0, 3, 2));
119
+ }
120
+
121
kvm_arm_destroy_scratch_host_vcpu(fdarray);
122
123
+ if (err < 0) {
124
+ return false;
125
+ }
126
+
127
/* We can assume any KVM supporting CPU is at least a v8
128
* with VFPv4+Neon; this in turn implies most of the other
129
* feature bits.
57
--
130
--
58
2.16.2
131
2.19.1
59
132
60
133
diff view generated by jsdifflib
1
The raspi3 has AArch64 CPUs, which means that our smpboot
1
From: Richard Henderson <richard.henderson@linaro.org>
2
code for keeping the secondary CPUs in a pen needs to have
3
a version for A64 as well as A32. Without this, the
4
secondary CPUs go into an infinite loop of taking undefined
5
instruction exceptions.
6
2
3
Assert that the value to be written is the correct size.
4
No change in functionality here, just mirroring the same
5
function from kvm64.
6
7
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
8
Message-id: 20181113180154.17903-4-richard.henderson@linaro.org
9
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
7
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
9
Message-id: 20180313153458.26822-10-peter.maydell@linaro.org
10
---
11
---
11
hw/arm/raspi.c | 41 ++++++++++++++++++++++++++++++++++++++++-
12
target/arm/kvm32.c | 41 ++++++++++++++++-------------------------
12
1 file changed, 40 insertions(+), 1 deletion(-)
13
1 file changed, 16 insertions(+), 25 deletions(-)
13
14
14
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
15
diff --git a/target/arm/kvm32.c b/target/arm/kvm32.c
15
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
16
--- a/hw/arm/raspi.c
17
--- a/target/arm/kvm32.c
17
+++ b/hw/arm/raspi.c
18
+++ b/target/arm/kvm32.c
18
@@ -XXX,XX +XXX,XX @@
19
@@ -XXX,XX +XXX,XX @@ static inline void set_feature(uint64_t *features, int feature)
19
#define BOARDSETUP_ADDR (MVBAR_ADDR + 0x20) /* board setup code */
20
*features |= 1ULL << feature;
20
#define FIRMWARE_ADDR_2 0x8000 /* Pi 2 loads kernel.img here by default */
21
#define FIRMWARE_ADDR_3 0x80000 /* Pi 3 loads kernel.img here by default */
22
+#define SPINTABLE_ADDR 0xd8 /* Pi 3 bootloader spintable */
23
24
/* Table of Linux board IDs for different Pi versions */
25
static const int raspi_boardid[] = {[1] = 0xc42, [2] = 0xc43, [3] = 0xc44};
26
@@ -XXX,XX +XXX,XX @@ static void write_smpboot(ARMCPU *cpu, const struct arm_boot_info *info)
27
info->smp_loader_start);
28
}
21
}
29
22
30
+static void write_smpboot64(ARMCPU *cpu, const struct arm_boot_info *info)
23
+static int read_sys_reg32(int fd, uint32_t *pret, uint64_t id)
31
+{
24
+{
32
+ /* Unlike the AArch32 version we don't need to call the board setup hook.
25
+ struct kvm_one_reg idreg = { .id = id, .addr = (uintptr_t)pret };
33
+ * The mechanism for doing the spin-table is also entirely different.
34
+ * We must have four 64-bit fields at absolute addresses
35
+ * 0xd8, 0xe0, 0xe8, 0xf0 in RAM, which are the flag variables for
36
+ * our CPUs, and which we must ensure are zero initialized before
37
+ * the primary CPU goes into the kernel. We put these variables inside
38
+ * a rom blob, so that the reset for ROM contents zeroes them for us.
39
+ */
40
+ static const uint32_t smpboot[] = {
41
+ 0xd2801b05, /* mov x5, 0xd8 */
42
+ 0xd53800a6, /* mrs x6, mpidr_el1 */
43
+ 0x924004c6, /* and x6, x6, #0x3 */
44
+ 0xd503205f, /* spin: wfe */
45
+ 0xf86678a4, /* ldr x4, [x5,x6,lsl #3] */
46
+ 0xb4ffffc4, /* cbz x4, spin */
47
+ 0xd2800000, /* mov x0, #0x0 */
48
+ 0xd2800001, /* mov x1, #0x0 */
49
+ 0xd2800002, /* mov x2, #0x0 */
50
+ 0xd2800003, /* mov x3, #0x0 */
51
+ 0xd61f0080, /* br x4 */
52
+ };
53
+
26
+
54
+ static const uint64_t spintables[] = {
27
+ assert((id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U32);
55
+ 0, 0, 0, 0
28
+ return ioctl(fd, KVM_GET_ONE_REG, &idreg);
56
+ };
57
+
58
+ rom_add_blob_fixed("raspi_smpboot", smpboot, sizeof(smpboot),
59
+ info->smp_loader_start);
60
+ rom_add_blob_fixed("raspi_spintables", spintables, sizeof(spintables),
61
+ SPINTABLE_ADDR);
62
+}
29
+}
63
+
30
+
64
static void write_board_setup(ARMCPU *cpu, const struct arm_boot_info *info)
31
bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
65
{
32
{
66
arm_write_secure_board_setup_dummy_smc(cpu, info, MVBAR_ADDR);
33
/* Identify the feature bits corresponding to the host CPU, and
67
@@ -XXX,XX +XXX,XX @@ static void setup_boot(MachineState *machine, int version, size_t ram_size)
34
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
68
/* Pi2 and Pi3 requires SMP setup */
35
* we have to create a scratch VM, create a single CPU inside it,
69
if (version >= 2) {
36
* and then query that CPU for the relevant ID registers.
70
binfo.smp_loader_start = SMPBOOT_ADDR;
37
*/
71
- binfo.write_secondary_boot = write_smpboot;
38
- int i, ret, fdarray[3];
72
+ if (version == 2) {
39
+ int err = 0, fdarray[3];
73
+ binfo.write_secondary_boot = write_smpboot;
40
uint32_t midr, id_pfr0, mvfr1;
74
+ } else {
41
uint64_t features = 0;
75
+ binfo.write_secondary_boot = write_smpboot64;
42
+
76
+ }
43
/* Old kernels may not know about the PREFERRED_TARGET ioctl: however
77
binfo.secondary_cpu_reset_hook = reset_secondary;
44
* we know these will only support creating one kind of guest CPU,
45
* which is its preferred CPU type.
46
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
47
QEMU_KVM_ARM_TARGET_NONE
48
};
49
struct kvm_vcpu_init init;
50
- struct kvm_one_reg idregs[] = {
51
- {
52
- .id = KVM_REG_ARM | KVM_REG_SIZE_U32
53
- | ENCODE_CP_REG(15, 0, 0, 0, 0, 0, 0),
54
- .addr = (uintptr_t)&midr,
55
- },
56
- {
57
- .id = KVM_REG_ARM | KVM_REG_SIZE_U32
58
- | ENCODE_CP_REG(15, 0, 0, 0, 1, 0, 0),
59
- .addr = (uintptr_t)&id_pfr0,
60
- },
61
- {
62
- .id = KVM_REG_ARM | KVM_REG_SIZE_U32
63
- | KVM_REG_ARM_VFP | KVM_REG_ARM_VFP_MVFR1,
64
- .addr = (uintptr_t)&mvfr1,
65
- },
66
- };
67
68
if (!kvm_arm_create_scratch_host_vcpu(cpus_to_try, fdarray, &init)) {
69
return false;
70
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
71
*/
72
ahcf->dtb_compatible = "arm,arm-v7";
73
74
- for (i = 0; i < ARRAY_SIZE(idregs); i++) {
75
- ret = ioctl(fdarray[2], KVM_GET_ONE_REG, &idregs[i]);
76
- if (ret) {
77
- break;
78
- }
79
- }
80
+ err |= read_sys_reg32(fdarray[2], &midr, ARM_CP15_REG32(0, 0, 0, 0));
81
+ err |= read_sys_reg32(fdarray[2], &id_pfr0, ARM_CP15_REG32(0, 0, 1, 0));
82
+ err |= read_sys_reg32(fdarray[2], &mvfr1,
83
+ KVM_REG_ARM | KVM_REG_SIZE_U32 |
84
+ KVM_REG_ARM_VFP | KVM_REG_ARM_VFP_MVFR1);
85
86
kvm_arm_destroy_scratch_host_vcpu(fdarray);
87
88
- if (ret) {
89
+ if (err < 0) {
90
return false;
78
}
91
}
79
92
80
--
93
--
81
2.16.2
94
2.19.1
82
95
83
96
diff view generated by jsdifflib
1
From: Andrey Smirnov <andrew.smirnov@gmail.com>
1
From: Richard Henderson <richard.henderson@linaro.org>
2
2
3
Add support for "TX complete"/TXDC interrupt generate by real HW since
3
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4
it is needed to support guests other than Linux.
4
Message-id: 20181113180154.17903-5-richard.henderson@linaro.org
5
6
Based on the patch by Bill Paul as found here:
7
https://bugs.launchpad.net/qemu/+bug/1753314
8
9
Cc: qemu-devel@nongnu.org
10
Cc: qemu-arm@nongnu.org
11
Cc: Bill Paul <wpaul@windriver.com>
12
Cc: Peter Maydell <peter.maydell@linaro.org>
13
Signed-off-by: Bill Paul <wpaul@windriver.com>
14
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
15
Message-id: 20180315191141.6789-2-andrew.smirnov@gmail.com
16
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
5
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
17
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
18
---
7
---
19
include/hw/char/imx_serial.h | 3 +++
8
target/arm/kvm32.c | 40 +++++++++++++++++++++++++++++++++++-----
20
hw/char/imx_serial.c | 20 +++++++++++++++++---
9
1 file changed, 35 insertions(+), 5 deletions(-)
21
2 files changed, 20 insertions(+), 3 deletions(-)
22
10
23
diff --git a/include/hw/char/imx_serial.h b/include/hw/char/imx_serial.h
11
diff --git a/target/arm/kvm32.c b/target/arm/kvm32.c
24
index XXXXXXX..XXXXXXX 100644
12
index XXXXXXX..XXXXXXX 100644
25
--- a/include/hw/char/imx_serial.h
13
--- a/target/arm/kvm32.c
26
+++ b/include/hw/char/imx_serial.h
14
+++ b/target/arm/kvm32.c
27
@@ -XXX,XX +XXX,XX @@
15
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
28
#define UCR2_RXEN (1<<1) /* Receiver enable */
16
* and then query that CPU for the relevant ID registers.
29
#define UCR2_SRST (1<<0) /* Reset complete */
17
*/
30
18
int err = 0, fdarray[3];
31
+#define UCR4_TCEN BIT(3) /* TX complete interrupt enable */
19
- uint32_t midr, id_pfr0, mvfr1;
20
+ uint32_t midr, id_pfr0;
21
uint64_t features = 0;
22
23
/* Old kernels may not know about the PREFERRED_TARGET ioctl: however
24
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
25
26
err |= read_sys_reg32(fdarray[2], &midr, ARM_CP15_REG32(0, 0, 0, 0));
27
err |= read_sys_reg32(fdarray[2], &id_pfr0, ARM_CP15_REG32(0, 0, 1, 0));
28
- err |= read_sys_reg32(fdarray[2], &mvfr1,
32
+
29
+
33
#define UTS1_TXEMPTY (1<<6)
30
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar0,
34
#define UTS1_RXEMPTY (1<<5)
31
+ ARM_CP15_REG32(0, 0, 2, 0));
35
#define UTS1_TXFULL (1<<4)
32
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar1,
36
@@ -XXX,XX +XXX,XX @@ typedef struct IMXSerialState {
33
+ ARM_CP15_REG32(0, 0, 2, 1));
37
uint32_t ubmr;
34
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar2,
38
uint32_t ubrc;
35
+ ARM_CP15_REG32(0, 0, 2, 2));
39
uint32_t ucr3;
36
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar3,
40
+ uint32_t ucr4;
37
+ ARM_CP15_REG32(0, 0, 2, 3));
41
38
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar4,
42
qemu_irq irq;
39
+ ARM_CP15_REG32(0, 0, 2, 4));
43
CharBackend chr;
40
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_isar5,
44
diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c
41
+ ARM_CP15_REG32(0, 0, 2, 5));
45
index XXXXXXX..XXXXXXX 100644
42
+ if (read_sys_reg32(fdarray[2], &ahcf->isar.id_isar6,
46
--- a/hw/char/imx_serial.c
43
+ ARM_CP15_REG32(0, 0, 2, 7))) {
47
+++ b/hw/char/imx_serial.c
44
+ /*
48
@@ -XXX,XX +XXX,XX @@
45
+ * Older kernels don't support reading ID_ISAR6. This register was
49
46
+ * only introduced in ARMv8, so we can assume that it is zero on a
50
static const VMStateDescription vmstate_imx_serial = {
47
+ * CPU that a kernel this old is running on.
51
.name = TYPE_IMX_SERIAL,
48
+ */
52
- .version_id = 1,
49
+ ahcf->isar.id_isar6 = 0;
53
- .minimum_version_id = 1,
50
+ }
54
+ .version_id = 2,
51
+
55
+ .minimum_version_id = 2,
52
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr0,
56
.fields = (VMStateField[]) {
53
+ KVM_REG_ARM | KVM_REG_SIZE_U32 |
57
VMSTATE_INT32(readbuff, IMXSerialState),
54
+ KVM_REG_ARM_VFP | KVM_REG_ARM_VFP_MVFR0);
58
VMSTATE_UINT32(usr1, IMXSerialState),
55
+ err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr1,
59
@@ -XXX,XX +XXX,XX @@ static const VMStateDescription vmstate_imx_serial = {
56
KVM_REG_ARM | KVM_REG_SIZE_U32 |
60
VMSTATE_UINT32(ubmr, IMXSerialState),
57
KVM_REG_ARM_VFP | KVM_REG_ARM_VFP_MVFR1);
61
VMSTATE_UINT32(ubrc, IMXSerialState),
62
VMSTATE_UINT32(ucr3, IMXSerialState),
63
+ VMSTATE_UINT32(ucr4, IMXSerialState),
64
VMSTATE_END_OF_LIST()
65
},
66
};
67
@@ -XXX,XX +XXX,XX @@ static void imx_update(IMXSerialState *s)
68
* unfortunately.
69
*/
70
mask = (s->ucr1 & UCR1_TXMPTYEN) ? USR2_TXFE : 0;
71
+ /*
58
+ /*
72
+ * TCEN and TXDC are both bit 3
59
+ * FIXME: There is not yet a way to read MVFR2.
60
+ * Fortunately there is not yet anything in there that affects migration.
73
+ */
61
+ */
74
+ mask |= s->ucr4 & UCR4_TCEN;
62
75
+
63
kvm_arm_destroy_scratch_host_vcpu(fdarray);
76
usr2 = s->usr2 & mask;
64
77
65
@@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
78
qemu_set_irq(s->irq, usr1 || usr2);
66
if (extract32(id_pfr0, 12, 4) == 1) {
79
@@ -XXX,XX +XXX,XX @@ static uint64_t imx_serial_read(void *opaque, hwaddr offset,
67
set_feature(&features, ARM_FEATURE_THUMB2EE);
80
return s->ucr3;
68
}
81
69
- if (extract32(mvfr1, 20, 4) == 1) {
82
case 0x23: /* UCR4 */
70
+ if (extract32(ahcf->isar.mvfr1, 20, 4) == 1) {
83
+ return s->ucr4;
71
set_feature(&features, ARM_FEATURE_VFP_FP16);
84
+
72
}
85
case 0x29: /* BRM Incremental */
73
- if (extract32(mvfr1, 12, 4) == 1) {
86
return 0x0; /* TODO */
74
+ if (extract32(ahcf->isar.mvfr1, 12, 4) == 1) {
87
75
set_feature(&features, ARM_FEATURE_NEON);
88
@@ -XXX,XX +XXX,XX @@ static void imx_serial_write(void *opaque, hwaddr offset,
76
}
89
* qemu_chr_fe_write and background I/O callbacks */
77
- if (extract32(mvfr1, 28, 4) == 1) {
90
qemu_chr_fe_write_all(&s->chr, &ch, 1);
78
+ if (extract32(ahcf->isar.mvfr1, 28, 4) == 1) {
91
s->usr1 &= ~USR1_TRDY;
79
/* FMAC support implies VFPv4 */
92
+ s->usr2 &= ~USR2_TXDC;
80
set_feature(&features, ARM_FEATURE_VFP4);
93
imx_update(s);
81
}
94
s->usr1 |= USR1_TRDY;
95
+ s->usr2 |= USR2_TXDC;
96
imx_update(s);
97
}
98
break;
99
@@ -XXX,XX +XXX,XX @@ static void imx_serial_write(void *opaque, hwaddr offset,
100
s->ucr3 = value & 0xffff;
101
break;
102
103
- case 0x2d: /* UTS1 */
104
case 0x23: /* UCR4 */
105
+ s->ucr4 = value & 0xffff;
106
+ imx_update(s);
107
+ break;
108
+
109
+ case 0x2d: /* UTS1 */
110
qemu_log_mask(LOG_UNIMP, "[%s]%s: Unimplemented reg 0x%"
111
HWADDR_PRIx "\n", TYPE_IMX_SERIAL, __func__, offset);
112
/* TODO */
113
--
82
--
114
2.16.2
83
2.19.1
115
84
116
85
diff view generated by jsdifflib
1
From: Wei Huang <wei@redhat.com>
1
From: Thomas Huth <thuth@redhat.com>
2
2
3
For guest kernel that supports KASLR, the load address can change every
3
Add entries for the boards "mcimx6ul-evk", "mcimx7d-sabre", "raspi2",
4
time when guest VM runs. To find the physical base address correctly,
4
"raspi3", "sabrelite", "vexpress-a15", "vexpress-a9" and "virt".
5
current QEMU dump searches VMCOREINFO for the string "NUMBER(phys_base)=".
5
While we're at it, also adjust the "i.MX31" section a little bit,
6
However this string pattern is only available on x86_64. AArch64 uses a
6
so that the wildcards there do not match anymore for unrelated files
7
different field, called "NUMBER(PHYS_OFFSET)=". This patch makes sure
7
(e.g. the new hw/misc/imx6ul_ccm.c file).
8
QEMU dump uses the correct string on AArch64.
9
8
10
Signed-off-by: Wei Huang <wei@redhat.com>
9
Signed-off-by: Thomas Huth <thuth@redhat.com>
11
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
10
Message-id: 1542184999-11145-1-git-send-email-thuth@redhat.com
12
Message-id: 1520615003-20869-1-git-send-email-wei@redhat.com
13
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14
---
12
---
15
dump.c | 14 +++++++++++---
13
MAINTAINERS | 70 +++++++++++++++++++++++++++++++++++++++++++++++++----
16
1 file changed, 11 insertions(+), 3 deletions(-)
14
1 file changed, 65 insertions(+), 5 deletions(-)
17
15
18
diff --git a/dump.c b/dump.c
16
diff --git a/MAINTAINERS b/MAINTAINERS
19
index XXXXXXX..XXXXXXX 100644
17
index XXXXXXX..XXXXXXX 100644
20
--- a/dump.c
18
--- a/MAINTAINERS
21
+++ b/dump.c
19
+++ b/MAINTAINERS
22
@@ -XXX,XX +XXX,XX @@ static void vmcoreinfo_update_phys_base(DumpState *s)
20
@@ -XXX,XX +XXX,XX @@ L: qemu-arm@nongnu.org
23
21
S: Odd Fixes
24
lines = g_strsplit((char *)vmci, "\n", -1);
22
F: hw/arm/gumstix.c
25
for (i = 0; lines[i]; i++) {
23
26
- if (g_str_has_prefix(lines[i], "NUMBER(phys_base)=")) {
24
-i.MX31
27
- if (qemu_strtou64(lines[i] + 18, NULL, 16,
25
+i.MX31 (kzm)
28
+ const char *prefix = NULL;
26
M: Peter Chubb <peter.chubb@nicta.com.au>
27
L: qemu-arm@nongnu.org
28
-S: Odd fixes
29
-F: hw/*/imx*
30
-F: include/hw/*/imx*
31
+S: Odd Fixes
32
F: hw/arm/kzm.c
33
-F: include/hw/arm/fsl-imx31.h
34
+F: hw/*/imx_*
35
+F: hw/*/*imx31*
36
+F: include/hw/*/imx_*
37
+F: include/hw/*/*imx31*
38
39
Integrator CP
40
M: Peter Maydell <peter.maydell@linaro.org>
41
@@ -XXX,XX +XXX,XX @@ S: Maintained
42
F: hw/arm/integratorcp.c
43
F: hw/misc/arm_integrator_debug.c
44
45
+MCIMX6UL EVK / i.MX6ul
46
+M: Peter Maydell <peter.maydell@linaro.org>
47
+R: Jean-Christophe Dubois <jcd@tribudubois.net>
48
+L: qemu-arm@nongnu.org
49
+S: Odd Fixes
50
+F: hw/arm/mcimx6ul-evk.c
51
+F: hw/arm/fsl-imx6ul.c
52
+F: hw/misc/imx6ul_ccm.c
53
+F: include/hw/arm/fsl-imx6ul.h
54
+F: include/hw/misc/imx6ul_ccm.h
29
+
55
+
30
+ if (s->dump_info.d_machine == EM_X86_64) {
56
+MCIMX7D SABRE / i.MX7
31
+ prefix = "NUMBER(phys_base)=";
57
+M: Peter Maydell <peter.maydell@linaro.org>
32
+ } else if (s->dump_info.d_machine == EM_AARCH64) {
58
+R: Andrey Smirnov <andrew.smirnov@gmail.com>
33
+ prefix = "NUMBER(PHYS_OFFSET)=";
59
+L: qemu-arm@nongnu.org
34
+ }
60
+S: Odd Fixes
61
+F: hw/arm/mcimx7d-sabre.c
62
+F: hw/arm/fsl-imx7.c
63
+F: include/hw/arm/fsl-imx7.h
64
+F: hw/pci-host/designware.c
65
+F: include/hw/pci-host/designware.h
35
+
66
+
36
+ if (prefix && g_str_has_prefix(lines[i], prefix)) {
67
MPS2
37
+ if (qemu_strtou64(lines[i] + strlen(prefix), NULL, 16,
68
M: Peter Maydell <peter.maydell@linaro.org>
38
&phys_base) < 0) {
69
L: qemu-arm@nongnu.org
39
- warn_report("Failed to read NUMBER(phys_base)=");
70
@@ -XXX,XX +XXX,XX @@ L: qemu-arm@nongnu.org
40
+ warn_report("Failed to read %s", prefix);
71
S: Maintained
41
} else {
72
F: hw/arm/palm.c
42
s->dump_info.phys_base = phys_base;
73
43
}
74
+Raspberry Pi
75
+M: Peter Maydell <peter.maydell@linaro.org>
76
+R: Andrew Baumann <Andrew.Baumann@microsoft.com>
77
+R: Philippe Mathieu-Daudé <f4bug@amsat.org>
78
+L: qemu-arm@nongnu.org
79
+S: Odd Fixes
80
+F: hw/arm/raspi_platform.h
81
+F: hw/*/bcm283*
82
+F: include/hw/arm/raspi*
83
+F: include/hw/*/bcm283*
84
+
85
Real View
86
M: Peter Maydell <peter.maydell@linaro.org>
87
L: qemu-arm@nongnu.org
88
@@ -XXX,XX +XXX,XX @@ F: hw/*/pxa2xx*
89
F: hw/misc/mst_fpga.c
90
F: include/hw/arm/pxa.h
91
92
+SABRELITE / i.MX6
93
+M: Peter Maydell <peter.maydell@linaro.org>
94
+R: Jean-Christophe Dubois <jcd@tribudubois.net>
95
+L: qemu-arm@nongnu.org
96
+S: Odd Fixes
97
+F: hw/arm/sabrelite.c
98
+F: hw/arm/fsl-imx6.c
99
+F: hw/misc/imx6_src.c
100
+F: hw/ssi/imx_spi.c
101
+F: include/hw/arm/fsl-imx6.h
102
+F: include/hw/misc/imx6_src.h
103
+F: include/hw/ssi/imx_spi.h
104
+
105
Sharp SL-5500 (Collie) PDA
106
M: Peter Maydell <peter.maydell@linaro.org>
107
L: qemu-arm@nongnu.org
108
@@ -XXX,XX +XXX,XX @@ L: qemu-arm@nongnu.org
109
S: Maintained
110
F: hw/*/stellaris*
111
112
+Versatile Express
113
+M: Peter Maydell <peter.maydell@linaro.org>
114
+L: qemu-arm@nongnu.org
115
+S: Maintained
116
+F: hw/arm/vexpress.c
117
+
118
Versatile PB
119
M: Peter Maydell <peter.maydell@linaro.org>
120
L: qemu-arm@nongnu.org
121
@@ -XXX,XX +XXX,XX @@ S: Maintained
122
F: hw/*/versatile*
123
F: hw/misc/arm_sysctl.c
124
125
+Virt
126
+M: Peter Maydell <peter.maydell@linaro.org>
127
+L: qemu-arm@nongnu.org
128
+S: Maintained
129
+F: hw/arm/virt*
130
+F: include/hw/arm/virt.h
131
+
132
Xilinx Zynq
133
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
134
M: Alistair Francis <alistair@alistair23.me>
44
--
135
--
45
2.16.2
136
2.19.1
46
137
47
138
diff view generated by jsdifflib
1
Now we have separate types for BCM2386 and BCM2387, we might as well
1
From: Seth Kintigh <skintigh@gmail.com>
2
just hard-code the CPU type they use rather than having it passed
3
through as an object property. This then lets us put the initialization
4
of the CPU object in init rather than realize.
5
2
6
Note that this change means that it's no longer possible on
3
The UART and timer devices for the stm32f205 were being created
7
the command line to use -cpu to ask for a different kind of
4
with memory regions that were too large. Use the size specified
8
CPU than the SoC supports. This was never a supported thing to
5
in the chip datasheet.
9
do anyway; we were just not sanity-checking the command line.
10
6
11
This does require us to only build the bcm2837 object on
7
The old sizes were so large that the devices would overlap with
12
TARGET_AARCH64 configs, since otherwise it won't instantiate
8
each other in the SoC memory map, so this fixes a bug that
13
due to the missing cortex-a53 device and "make check" will fail.
9
caused odd behavior and/or crashes when trying to set up multiple
10
UARTs.
14
11
12
Signed-off-by: Seth Kintigh <skintigh@gmail.com>
13
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
14
[PMM: rephrased commit message to follow our usual standard]
15
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
16
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
15
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
17
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16
Reviewed-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
17
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
18
Message-id: 20180313153458.26822-9-peter.maydell@linaro.org
19
---
18
---
20
hw/arm/bcm2836.c | 24 +++++++++++++++---------
19
hw/char/stm32f2xx_usart.c | 2 +-
21
hw/arm/raspi.c | 2 --
20
hw/timer/stm32f2xx_timer.c | 2 +-
22
2 files changed, 15 insertions(+), 11 deletions(-)
21
2 files changed, 2 insertions(+), 2 deletions(-)
23
22
24
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
23
diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c
25
index XXXXXXX..XXXXXXX 100644
24
index XXXXXXX..XXXXXXX 100644
26
--- a/hw/arm/bcm2836.c
25
--- a/hw/char/stm32f2xx_usart.c
27
+++ b/hw/arm/bcm2836.c
26
+++ b/hw/char/stm32f2xx_usart.c
28
@@ -XXX,XX +XXX,XX @@
27
@@ -XXX,XX +XXX,XX @@ static void stm32f2xx_usart_init(Object *obj)
29
28
sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq);
30
struct BCM283XInfo {
29
31
const char *name;
30
memory_region_init_io(&s->mmio, obj, &stm32f2xx_usart_ops, s,
32
+ const char *cpu_type;
31
- TYPE_STM32F2XX_USART, 0x2000);
33
int clusterid;
32
+ TYPE_STM32F2XX_USART, 0x400);
34
};
33
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
35
36
static const BCM283XInfo bcm283x_socs[] = {
37
{
38
.name = TYPE_BCM2836,
39
+ .cpu_type = ARM_CPU_TYPE_NAME("cortex-a15"),
40
.clusterid = 0xf,
41
},
42
+#ifdef TARGET_AARCH64
43
{
44
.name = TYPE_BCM2837,
45
+ .cpu_type = ARM_CPU_TYPE_NAME("cortex-a53"),
46
.clusterid = 0x0,
47
},
48
+#endif
49
};
50
51
static void bcm2836_init(Object *obj)
52
{
53
BCM283XState *s = BCM283X(obj);
54
+ BCM283XClass *bc = BCM283X_GET_CLASS(obj);
55
+ const BCM283XInfo *info = bc->info;
56
+ int n;
57
+
58
+ for (n = 0; n < BCM283X_NCPUS; n++) {
59
+ object_initialize(&s->cpus[n], sizeof(s->cpus[n]),
60
+ info->cpu_type);
61
+ object_property_add_child(obj, "cpu[*]", OBJECT(&s->cpus[n]),
62
+ &error_abort);
63
+ }
64
65
object_initialize(&s->control, sizeof(s->control), TYPE_BCM2836_CONTROL);
66
object_property_add_child(obj, "control", OBJECT(&s->control), NULL);
67
@@ -XXX,XX +XXX,XX @@ static void bcm2836_realize(DeviceState *dev, Error **errp)
68
69
/* common peripherals from bcm2835 */
70
71
- obj = OBJECT(dev);
72
- for (n = 0; n < BCM283X_NCPUS; n++) {
73
- object_initialize(&s->cpus[n], sizeof(s->cpus[n]),
74
- s->cpu_type);
75
- object_property_add_child(obj, "cpu[*]", OBJECT(&s->cpus[n]),
76
- &error_abort);
77
- }
78
-
79
obj = object_property_get_link(OBJECT(dev), "ram", &err);
80
if (obj == NULL) {
81
error_setg(errp, "%s: required ram link not found: %s",
82
@@ -XXX,XX +XXX,XX @@ static void bcm2836_realize(DeviceState *dev, Error **errp)
83
}
34
}
84
35
85
static Property bcm2836_props[] = {
36
diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c
86
- DEFINE_PROP_STRING("cpu-type", BCM283XState, cpu_type),
87
DEFINE_PROP_UINT32("enabled-cpus", BCM283XState, enabled_cpus,
88
BCM283X_NCPUS),
89
DEFINE_PROP_END_OF_LIST()
90
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
91
index XXXXXXX..XXXXXXX 100644
37
index XXXXXXX..XXXXXXX 100644
92
--- a/hw/arm/raspi.c
38
--- a/hw/timer/stm32f2xx_timer.c
93
+++ b/hw/arm/raspi.c
39
+++ b/hw/timer/stm32f2xx_timer.c
94
@@ -XXX,XX +XXX,XX @@ static void raspi_init(MachineState *machine, int version)
40
@@ -XXX,XX +XXX,XX @@ static void stm32f2xx_timer_init(Object *obj)
95
/* Setup the SOC */
41
sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq);
96
object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(&s->ram),
42
97
&error_abort);
43
memory_region_init_io(&s->iomem, obj, &stm32f2xx_timer_ops, s,
98
- object_property_set_str(OBJECT(&s->soc), machine->cpu_type, "cpu-type",
44
- "stm32f2xx_timer", 0x4000);
99
- &error_abort);
45
+ "stm32f2xx_timer", 0x400);
100
object_property_set_int(OBJECT(&s->soc), smp_cpus, "enabled-cpus",
46
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->iomem);
101
&error_abort);
47
102
int board_rev = version == 3 ? 0xa02082 : 0xa21041;
48
s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, stm32f2xx_timer_interrupt, s);
103
--
49
--
104
2.16.2
50
2.19.1
105
51
106
52
diff view generated by jsdifflib
1
From: Guenter Roeck <linux@roeck-us.net>
1
From: Luc Michel <luc.michel@greensocs.com>
2
2
3
The sabrelite machine model used by qemu-system-arm is based on the
3
This commit fixes a case where the CPU would try to go to EL3 when
4
Freescale/NXP i.MX6Q processor. This SoC has an on-board ethernet
4
executing an smc instruction, even though ARM_FEATURE_EL3 is false. This
5
controller which is supported in QEMU using the imx_fec.c module
5
case is raised when the PSCI conduit is set to smc, but the smc
6
(actually called imx.enet for this model.)
6
instruction does not lead to a valid PSCI call.
7
7
8
The include/hw/arm/fsm-imx6.h file defines the interrupt vectors for the
8
QEMU crashes with an assertion failure latter on because of incoherent
9
imx.enet device like this:
9
mmu_idx.
10
10
11
#define FSL_IMX6_ENET_MAC_1588_IRQ 118
11
This commit refactors the pre_smc helper by enumerating all the possible
12
#define FSL_IMX6_ENET_MAC_IRQ 119
12
way of handling an scm instruction, and covering the previously missing
13
case leading to the crash.
13
14
14
According to https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf,
15
The following minimal test would crash before this commit:
15
page 225, in Table 3-1. ARM Cortex A9 domain interrupt summary,
16
interrupts are as follows.
17
16
18
150 ENET MAC 0 IRQ
17
.global _start
19
151 ENET MAC 0 1588 Timer interrupt
18
.text
19
_start:
20
ldr x0, =0xdeadbeef ; invalid PSCI call
21
smc #0
20
22
21
where
23
run with the following command line:
22
24
23
150 - 32 == 118
25
aarch64-linux-gnu-gcc -nostdinc -nostdlib -Wl,-Ttext=40000000 \
24
151 - 32 == 119
26
-o test test.s
25
27
26
In other words, the vector definitions in the fsl-imx6.h file are reversed.
28
qemu-system-aarch64 -M virt,virtualization=on,secure=off \
29
-cpu cortex-a57 -kernel test
27
30
28
Fixing the interrupts alone causes problems with older Linux kernels:
31
Signed-off-by: Luc Michel <luc.michel@greensocs.com>
29
The Ethernet interface will fail to probe with Linux v4.9 and earlier.
32
Message-id: 20181117160213.18995-1-luc.michel@greensocs.com
30
Linux v4.1 and earlier will crash due to a bug in Ethernet driver probe
31
error handling. This is a Linux kernel problem, not a qemu problem:
32
the Linux kernel only worked by accident since it requested both interrupts.
33
34
For backward compatibility, generate the Ethernet interrupt on both interrupt
35
lines. This was shown to work from all Linux kernel releases starting with
36
v3.16.
37
38
Link: https://bugs.launchpad.net/qemu/+bug/1753309
39
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
40
Message-id: 1520723090-22130-1-git-send-email-linux@roeck-us.net
41
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
33
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
42
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
34
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
43
---
35
---
44
include/hw/arm/fsl-imx6.h | 4 ++--
36
target/arm/op_helper.c | 54 +++++++++++++++++++++++++++++++++++-------
45
hw/net/imx_fec.c | 28 +++++++++++++++++++++++++++-
37
1 file changed, 46 insertions(+), 8 deletions(-)
46
2 files changed, 29 insertions(+), 3 deletions(-)
47
38
48
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
39
diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c
49
index XXXXXXX..XXXXXXX 100644
40
index XXXXXXX..XXXXXXX 100644
50
--- a/include/hw/arm/fsl-imx6.h
41
--- a/target/arm/op_helper.c
51
+++ b/include/hw/arm/fsl-imx6.h
42
+++ b/target/arm/op_helper.c
52
@@ -XXX,XX +XXX,XX @@ typedef struct FslIMX6State {
43
@@ -XXX,XX +XXX,XX @@ void HELPER(pre_smc)(CPUARMState *env, uint32_t syndrome)
53
#define FSL_IMX6_HDMI_MASTER_IRQ 115
44
ARMCPU *cpu = arm_env_get_cpu(env);
54
#define FSL_IMX6_HDMI_CEC_IRQ 116
45
int cur_el = arm_current_el(env);
55
#define FSL_IMX6_MLB150_LOW_IRQ 117
46
bool secure = arm_is_secure(env);
56
-#define FSL_IMX6_ENET_MAC_1588_IRQ 118
47
- bool smd = env->cp15.scr_el3 & SCR_SMD;
57
-#define FSL_IMX6_ENET_MAC_IRQ 119
48
+ bool smd_flag = env->cp15.scr_el3 & SCR_SMD;
58
+#define FSL_IMX6_ENET_MAC_IRQ 118
49
+
59
+#define FSL_IMX6_ENET_MAC_1588_IRQ 119
60
#define FSL_IMX6_PCIE1_IRQ 120
61
#define FSL_IMX6_PCIE2_IRQ 121
62
#define FSL_IMX6_PCIE3_IRQ 122
63
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
64
index XXXXXXX..XXXXXXX 100644
65
--- a/hw/net/imx_fec.c
66
+++ b/hw/net/imx_fec.c
67
@@ -XXX,XX +XXX,XX @@ static void imx_enet_write_bd(IMXENETBufDesc *bd, dma_addr_t addr)
68
69
static void imx_eth_update(IMXFECState *s)
70
{
71
- if (s->regs[ENET_EIR] & s->regs[ENET_EIMR] & ENET_INT_TS_TIMER) {
72
+ /*
50
+ /*
73
+ * Previous versions of qemu had the ENET_INT_MAC and ENET_INT_TS_TIMER
51
+ * SMC behaviour is summarized in the following table.
74
+ * interrupts swapped. This worked with older versions of Linux (4.14
52
+ * This helper handles the "Trap to EL2" and "Undef insn" cases.
75
+ * and older) since Linux associated both interrupt lines with Ethernet
53
+ * The "Trap to EL3" and "PSCI call" cases are handled in the exception
76
+ * MAC interrupts. Specifically,
54
+ * helper.
77
+ * - Linux 4.15 and later have separate interrupt handlers for the MAC and
78
+ * timer interrupts. Those versions of Linux fail with versions of QEMU
79
+ * with swapped interrupt assignments.
80
+ * - In linux 4.14, both interrupt lines were registered with the Ethernet
81
+ * MAC interrupt handler. As a result, all versions of qemu happen to
82
+ * work, though that is accidental.
83
+ * - In Linux 4.9 and older, the timer interrupt was registered directly
84
+ * with the Ethernet MAC interrupt handler. The MAC interrupt was
85
+ * redirected to a GPIO interrupt to work around erratum ERR006687.
86
+ * This was implemented using the SOC's IOMUX block. In qemu, this GPIO
87
+ * interrupt never fired since IOMUX is currently not supported in qemu.
88
+ * Linux instead received MAC interrupts on the timer interrupt.
89
+ * As a result, qemu versions with the swapped interrupt assignment work,
90
+ * albeit accidentally, but qemu versions with the correct interrupt
91
+ * assignment fail.
92
+ *
55
+ *
93
+ * To ensure that all versions of Linux work, generate ENET_INT_MAC
56
+ * -> ARM_FEATURE_EL3 and !SMD
94
+ * interrrupts on both interrupt lines. This should be changed if and when
57
+ * HCR_TSC && NS EL1 !HCR_TSC || !NS EL1
95
+ * qemu supports IOMUX.
58
+ *
59
+ * Conduit SMC, valid call Trap to EL2 PSCI Call
60
+ * Conduit SMC, inval call Trap to EL2 Trap to EL3
61
+ * Conduit not SMC Trap to EL2 Trap to EL3
62
+ *
63
+ *
64
+ * -> ARM_FEATURE_EL3 and SMD
65
+ * HCR_TSC && NS EL1 !HCR_TSC || !NS EL1
66
+ *
67
+ * Conduit SMC, valid call Trap to EL2 PSCI Call
68
+ * Conduit SMC, inval call Trap to EL2 Undef insn
69
+ * Conduit not SMC Trap to EL2 Undef insn
70
+ *
71
+ *
72
+ * -> !ARM_FEATURE_EL3
73
+ * HCR_TSC && NS EL1 !HCR_TSC || !NS EL1
74
+ *
75
+ * Conduit SMC, valid call Trap to EL2 PSCI Call
76
+ * Conduit SMC, inval call Trap to EL2 Undef insn
77
+ * Conduit not SMC Undef insn Undef insn
96
+ */
78
+ */
97
+ if (s->regs[ENET_EIR] & s->regs[ENET_EIMR] &
79
+
98
+ (ENET_INT_MAC | ENET_INT_TS_TIMER)) {
80
/* On ARMv8 with EL3 AArch64, SMD applies to both S and NS state.
99
qemu_set_irq(s->irq[1], 1);
81
* On ARMv8 with EL3 AArch32, or ARMv7 with the Virtualization
100
} else {
82
* extensions, SMD only applies to NS state.
101
qemu_set_irq(s->irq[1], 0);
83
@@ -XXX,XX +XXX,XX @@ void HELPER(pre_smc)(CPUARMState *env, uint32_t syndrome)
84
* doesn't exist, but we forbid the guest to set it to 1 in scr_write(),
85
* so we need not special case this here.
86
*/
87
- bool undef = arm_feature(env, ARM_FEATURE_AARCH64) ? smd : smd && !secure;
88
+ bool smd = arm_feature(env, ARM_FEATURE_AARCH64) ? smd_flag
89
+ : smd_flag && !secure;
90
91
if (!arm_feature(env, ARM_FEATURE_EL3) &&
92
cpu->psci_conduit != QEMU_PSCI_CONDUIT_SMC) {
93
@@ -XXX,XX +XXX,XX @@ void HELPER(pre_smc)(CPUARMState *env, uint32_t syndrome)
94
* to forbid its EL1 from making PSCI calls into QEMU's
95
* "firmware" via HCR.TSC, so for these purposes treat
96
* PSCI-via-SMC as implying an EL3.
97
+ * This handles the very last line of the previous table.
98
*/
99
- undef = true;
100
- } else if (!secure && cur_el == 1 && (env->cp15.hcr_el2 & HCR_TSC)) {
101
+ raise_exception(env, EXCP_UDEF, syn_uncategorized(),
102
+ exception_target_el(env));
103
+ }
104
+
105
+ if (!secure && cur_el == 1 && (env->cp15.hcr_el2 & HCR_TSC)) {
106
/* In NS EL1, HCR controlled routing to EL2 has priority over SMD.
107
* We also want an EL2 guest to be able to forbid its EL1 from
108
* making PSCI calls into QEMU's "firmware" via HCR.TSC.
109
+ * This handles all the "Trap to EL2" cases of the previous table.
110
*/
111
raise_exception(env, EXCP_HYP_TRAP, syndrome, 2);
112
}
113
114
- /* If PSCI is enabled and this looks like a valid PSCI call then
115
- * suppress the UNDEF -- we'll catch the SMC exception and
116
- * implement the PSCI call behaviour there.
117
+ /* Catch the two remaining "Undef insn" cases of the previous table:
118
+ * - PSCI conduit is SMC but we don't have a valid PCSI call,
119
+ * - We don't have EL3 or SMD is set.
120
*/
121
- if (undef && !arm_is_psci_call(cpu, EXCP_SMC)) {
122
+ if (!arm_is_psci_call(cpu, EXCP_SMC) &&
123
+ (smd || !arm_feature(env, ARM_FEATURE_EL3))) {
124
raise_exception(env, EXCP_UDEF, syn_uncategorized(),
125
exception_target_el(env));
126
}
102
--
127
--
103
2.16.2
128
2.19.1
104
129
105
130
diff view generated by jsdifflib
Deleted patch
1
For the rpi1 and 2 we want to boot the Linux kernel via some
2
custom setup code that makes sure that the SMC instruction
3
acts as a no-op, because it's used for cache maintenance.
4
The rpi3 boots AArch64 kernels, which don't need SMC for
5
cache maintenance and always expect to be booted non-secure.
6
Don't fill in the aarch32-specific parts of the binfo struct.
7
1
8
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9
Reviewed-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
10
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
11
Message-id: 20180313153458.26822-2-peter.maydell@linaro.org
12
---
13
hw/arm/raspi.c | 17 +++++++++++++----
14
1 file changed, 13 insertions(+), 4 deletions(-)
15
16
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
17
index XXXXXXX..XXXXXXX 100644
18
--- a/hw/arm/raspi.c
19
+++ b/hw/arm/raspi.c
20
@@ -XXX,XX +XXX,XX @@ static void setup_boot(MachineState *machine, int version, size_t ram_size)
21
binfo.board_id = raspi_boardid[version];
22
binfo.ram_size = ram_size;
23
binfo.nb_cpus = smp_cpus;
24
- binfo.board_setup_addr = BOARDSETUP_ADDR;
25
- binfo.write_board_setup = write_board_setup;
26
- binfo.secure_board_setup = true;
27
- binfo.secure_boot = true;
28
+
29
+ if (version <= 2) {
30
+ /* The rpi1 and 2 require some custom setup code to run in Secure
31
+ * mode before booting a kernel (to set up the SMC vectors so
32
+ * that we get a no-op SMC; this is used by Linux to call the
33
+ * firmware for some cache maintenance operations.
34
+ * The rpi3 doesn't need this.
35
+ */
36
+ binfo.board_setup_addr = BOARDSETUP_ADDR;
37
+ binfo.write_board_setup = write_board_setup;
38
+ binfo.secure_board_setup = true;
39
+ binfo.secure_boot = true;
40
+ }
41
42
/* Pi2 and Pi3 requires SMP setup */
43
if (version >= 2) {
44
--
45
2.16.2
46
47
diff view generated by jsdifflib
Deleted patch
1
Add some assertions that if we're about to boot an AArch64 kernel,
2
the board code has not mistakenly set either secure_boot or
3
secure_board_setup. It doesn't make sense to set secure_boot,
4
because all AArch64 kernels must be booted in non-secure mode.
5
1
6
It might in theory make sense to set secure_board_setup, but
7
we don't currently support that, because only the AArch32
8
bootloader[] code calls this hook; bootloader_aarch64[] does not.
9
Since we don't have a current need for this functionality, just
10
assert that we don't try to use it. If it's needed we'll add
11
it later.
12
13
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
15
Message-id: 20180313153458.26822-3-peter.maydell@linaro.org
16
---
17
hw/arm/boot.c | 7 +++++++
18
1 file changed, 7 insertions(+)
19
20
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
21
index XXXXXXX..XXXXXXX 100644
22
--- a/hw/arm/boot.c
23
+++ b/hw/arm/boot.c
24
@@ -XXX,XX +XXX,XX @@ static void do_cpu_reset(void *opaque)
25
} else {
26
env->pstate = PSTATE_MODE_EL1h;
27
}
28
+ /* AArch64 kernels never boot in secure mode */
29
+ assert(!info->secure_boot);
30
+ /* This hook is only supported for AArch32 currently:
31
+ * bootloader_aarch64[] will not call the hook, and
32
+ * the code above has already dropped us into EL2 or EL1.
33
+ */
34
+ assert(!info->secure_board_setup);
35
}
36
37
/* Set to non-secure if not a secure boot */
38
--
39
2.16.2
40
41
diff view generated by jsdifflib
Deleted patch
1
If we're directly booting a Linux kernel and the CPU supports both
2
EL3 and EL2, we start the kernel in EL2, as it expects. We must also
3
set the SCR_EL3.HCE bit in this situation, so that the HVC
4
instruction is enabled rather than UNDEFing. Otherwise at least some
5
kernels will panic when trying to initialize KVM in the guest.
6
1
7
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8
Message-id: 20180313153458.26822-4-peter.maydell@linaro.org
9
---
10
hw/arm/boot.c | 5 +++++
11
1 file changed, 5 insertions(+)
12
13
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
14
index XXXXXXX..XXXXXXX 100644
15
--- a/hw/arm/boot.c
16
+++ b/hw/arm/boot.c
17
@@ -XXX,XX +XXX,XX @@ static void do_cpu_reset(void *opaque)
18
assert(!info->secure_board_setup);
19
}
20
21
+ if (arm_feature(env, ARM_FEATURE_EL2)) {
22
+ /* If we have EL2 then Linux expects the HVC insn to work */
23
+ env->cp15.scr_el3 |= SCR_HCE;
24
+ }
25
+
26
/* Set to non-secure if not a secure boot */
27
if (!info->secure_boot &&
28
(cs != first_cpu || !info->secure_board_setup)) {
29
--
30
2.16.2
31
32
diff view generated by jsdifflib
1
The TypeInfo and state struct for bcm2386 disagree about what the
1
An off-by-one error in a switch case in onenand_read() allowed
2
parent class is -- the TypeInfo says it's TYPE_SYS_BUS_DEVICE,
2
a misbehaving guest to read off the end of a block of memory.
3
but the BCM2386State struct only defines the parent_obj field
4
as DeviceState. This would have caused problems if anything
5
actually tried to treat the object as a TYPE_SYS_BUS_DEVICE.
6
Fix the TypeInfo to use TYPE_DEVICE as the parent, since we don't
7
need any of the additional functionality TYPE_SYS_BUS_DEVICE
8
provides.
9
3
4
NB: the onenand device is used only by the "n800" and "n810"
5
machines, which are usable only with TCG, not KVM, so this is
6
not a security issue.
7
8
Reported-by: Thomas Huth <thuth@redhat.com>
9
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
10
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
10
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11
Reviewed-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
12
Message-id: 20181115143535.5885-2-peter.maydell@linaro.org
12
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
13
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
13
Message-id: 20180313153458.26822-5-peter.maydell@linaro.org
14
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14
---
15
---
15
hw/arm/bcm2836.c | 2 +-
16
hw/block/onenand.c | 2 +-
16
1 file changed, 1 insertion(+), 1 deletion(-)
17
1 file changed, 1 insertion(+), 1 deletion(-)
17
18
18
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
19
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
19
index XXXXXXX..XXXXXXX 100644
20
index XXXXXXX..XXXXXXX 100644
20
--- a/hw/arm/bcm2836.c
21
--- a/hw/block/onenand.c
21
+++ b/hw/arm/bcm2836.c
22
+++ b/hw/block/onenand.c
22
@@ -XXX,XX +XXX,XX @@ static void bcm2836_class_init(ObjectClass *oc, void *data)
23
@@ -XXX,XX +XXX,XX @@ static uint64_t onenand_read(void *opaque, hwaddr addr,
23
24
int offset = addr >> s->shift;
24
static const TypeInfo bcm2836_type_info = {
25
25
.name = TYPE_BCM2836,
26
switch (offset) {
26
- .parent = TYPE_SYS_BUS_DEVICE,
27
- case 0x0000 ... 0xc000:
27
+ .parent = TYPE_DEVICE,
28
+ case 0x0000 ... 0xbffe:
28
.instance_size = sizeof(BCM2836State),
29
return lduw_le_p(s->boot[0] + addr);
29
.instance_init = bcm2836_init,
30
30
.class_init = bcm2836_class_init,
31
case 0xf000:    /* Manufacturer ID */
31
--
32
--
32
2.16.2
33
2.19.1
33
34
34
35
diff view generated by jsdifflib
1
The bcm2837 is pretty similar to the bcm2836, but it does have
1
Update the onenand device to use qemu_log_mask() for reporting
2
some differences. Notably, the MPIDR affinity aff1 values it
2
guest errors and unimplemented features, rather than plain
3
sets for the CPUs are 0x0, rather than the 0xf that the bcm2836
3
fprintf() and hw_error().
4
uses, and if this is wrong Linux will not boot.
5
4
6
Rather than trying to have one device with properties that
5
(We leave the hw_error() in onenand_reset(), as that is
7
configure it differently for the two cases, create two
6
triggered by a failure to read the underlying block device
8
separate QOM devices for the two SoCs. We use the same approach
7
for the bootRAM, not by guest action.)
9
as hw/arm/aspeed_soc.c and share code and have a data table
10
that might differ per-SoC. For the moment the two types don't
11
actually have different behaviour.
12
8
13
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
10
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
15
Message-id: 20180313153458.26822-7-peter.maydell@linaro.org
11
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
12
Reviewed-by: Thomas Huth <thuth@redhat.com>
13
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
14
Message-id: 20181115143535.5885-3-peter.maydell@linaro.org
16
---
15
---
17
include/hw/arm/bcm2836.h | 19 +++++++++++++++++++
16
hw/block/onenand.c | 22 +++++++++++++---------
18
hw/arm/bcm2836.c | 37 ++++++++++++++++++++++++++++++++-----
17
1 file changed, 13 insertions(+), 9 deletions(-)
19
hw/arm/raspi.c | 3 ++-
20
3 files changed, 53 insertions(+), 6 deletions(-)
21
18
22
diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h
19
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
23
index XXXXXXX..XXXXXXX 100644
20
index XXXXXXX..XXXXXXX 100644
24
--- a/include/hw/arm/bcm2836.h
21
--- a/hw/block/onenand.c
25
+++ b/include/hw/arm/bcm2836.h
22
+++ b/hw/block/onenand.c
26
@@ -XXX,XX +XXX,XX @@
23
@@ -XXX,XX +XXX,XX @@
27
24
#include "exec/memory.h"
28
#define BCM283X_NCPUS 4
25
#include "hw/sysbus.h"
29
26
#include "qemu/error-report.h"
30
+/* These type names are for specific SoCs; other than instantiating
27
+#include "qemu/log.h"
31
+ * them, code using these devices should always handle them via the
28
32
+ * BCM283x base class, so they have no BCM2836(obj) etc macros.
29
/* 11 for 2kB-page OneNAND ("2nd generation") and 10 for 1kB-page chips */
33
+ */
30
#define PAGE_SHIFT    11
34
+#define TYPE_BCM2836 "bcm2836"
31
@@ -XXX,XX +XXX,XX @@ static void onenand_command(OneNANDState *s)
35
+#define TYPE_BCM2837 "bcm2837"
32
default:
36
+
33
s->status |= ONEN_ERR_CMD;
37
typedef struct BCM283XState {
34
s->intstatus |= ONEN_INT;
38
/*< private >*/
35
- fprintf(stderr, "%s: unknown OneNAND command %x\n",
39
DeviceState parent_obj;
36
- __func__, s->command);
40
@@ -XXX,XX +XXX,XX @@ typedef struct BCM283XState {
37
+ qemu_log_mask(LOG_GUEST_ERROR, "unknown OneNAND command %x\n",
41
BCM2835PeripheralState peripherals;
38
+ s->command);
42
} BCM283XState;
39
}
43
40
44
+typedef struct BCM283XInfo BCM283XInfo;
41
onenand_intr_update(s);
45
+
42
@@ -XXX,XX +XXX,XX @@ static uint64_t onenand_read(void *opaque, hwaddr addr,
46
+typedef struct BCM283XClass {
43
case 0xff02:    /* ECC Result of spare area data */
47
+ DeviceClass parent_class;
44
case 0xff03:    /* ECC Result of main area data */
48
+ const BCM283XInfo *info;
45
case 0xff04:    /* ECC Result of spare area data */
49
+} BCM283XClass;
46
- hw_error("%s: implement ECC\n", __func__);
50
+
47
+ qemu_log_mask(LOG_UNIMP,
51
+#define BCM283X_CLASS(klass) \
48
+ "onenand: ECC result registers unimplemented\n");
52
+ OBJECT_CLASS_CHECK(BCM283XClass, (klass), TYPE_BCM283X)
49
return 0x0000;
53
+#define BCM283X_GET_CLASS(obj) \
50
}
54
+ OBJECT_GET_CLASS(BCM283XClass, (obj), TYPE_BCM283X)
51
55
+
52
- fprintf(stderr, "%s: unknown OneNAND register %x\n",
56
#endif /* BCM2836_H */
53
- __func__, offset);
57
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
54
+ qemu_log_mask(LOG_GUEST_ERROR, "read of unknown OneNAND register 0x%x\n",
58
index XXXXXXX..XXXXXXX 100644
55
+ offset);
59
--- a/hw/arm/bcm2836.c
56
return 0;
60
+++ b/hw/arm/bcm2836.c
61
@@ -XXX,XX +XXX,XX @@
62
/* "QA7" (Pi2) interrupt controller and mailboxes etc. */
63
#define BCM2836_CONTROL_BASE 0x40000000
64
65
+struct BCM283XInfo {
66
+ const char *name;
67
+};
68
+
69
+static const BCM283XInfo bcm283x_socs[] = {
70
+ {
71
+ .name = TYPE_BCM2836,
72
+ },
73
+ {
74
+ .name = TYPE_BCM2837,
75
+ },
76
+};
77
+
78
static void bcm2836_init(Object *obj)
79
{
80
BCM283XState *s = BCM283X(obj);
81
@@ -XXX,XX +XXX,XX @@ static Property bcm2836_props[] = {
82
DEFINE_PROP_END_OF_LIST()
83
};
84
85
-static void bcm2836_class_init(ObjectClass *oc, void *data)
86
+static void bcm283x_class_init(ObjectClass *oc, void *data)
87
{
88
DeviceClass *dc = DEVICE_CLASS(oc);
89
+ BCM283XClass *bc = BCM283X_CLASS(oc);
90
91
- dc->props = bcm2836_props;
92
+ bc->info = data;
93
dc->realize = bcm2836_realize;
94
+ dc->props = bcm2836_props;
95
}
57
}
96
58
97
-static const TypeInfo bcm2836_type_info = {
59
@@ -XXX,XX +XXX,XX @@ static void onenand_write(void *opaque, hwaddr addr,
98
+static const TypeInfo bcm283x_type_info = {
60
break;
99
.name = TYPE_BCM283X,
61
100
.parent = TYPE_DEVICE,
62
default:
101
.instance_size = sizeof(BCM283XState),
63
- fprintf(stderr, "%s: unknown OneNAND boot command %"PRIx64"\n",
102
.instance_init = bcm2836_init,
64
- __func__, value);
103
- .class_init = bcm2836_class_init,
65
+ qemu_log_mask(LOG_GUEST_ERROR,
104
+ .class_size = sizeof(BCM283XClass),
66
+ "unknown OneNAND boot command %" PRIx64 "\n",
105
+ .abstract = true,
67
+ value);
106
};
68
}
107
69
break;
108
static void bcm2836_register_types(void)
70
109
{
71
@@ -XXX,XX +XXX,XX @@ static void onenand_write(void *opaque, hwaddr addr,
110
- type_register_static(&bcm2836_type_info);
72
break;
111
+ int i;
73
112
+
74
default:
113
+ type_register_static(&bcm283x_type_info);
75
- fprintf(stderr, "%s: unknown OneNAND register %x\n",
114
+ for (i = 0; i < ARRAY_SIZE(bcm283x_socs); i++) {
76
- __func__, offset);
115
+ TypeInfo ti = {
77
+ qemu_log_mask(LOG_GUEST_ERROR,
116
+ .name = bcm283x_socs[i].name,
78
+ "write to unknown OneNAND register 0x%x\n",
117
+ .parent = TYPE_BCM283X,
79
+ offset);
118
+ .class_init = bcm283x_class_init,
80
}
119
+ .class_data = (void *) &bcm283x_socs[i],
120
+ };
121
+ type_register(&ti);
122
+ }
123
}
81
}
124
82
125
type_init(bcm2836_register_types)
126
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
127
index XXXXXXX..XXXXXXX 100644
128
--- a/hw/arm/raspi.c
129
+++ b/hw/arm/raspi.c
130
@@ -XXX,XX +XXX,XX @@ static void raspi_init(MachineState *machine, int version)
131
BusState *bus;
132
DeviceState *carddev;
133
134
- object_initialize(&s->soc, sizeof(s->soc), TYPE_BCM283X);
135
+ object_initialize(&s->soc, sizeof(s->soc),
136
+ version == 3 ? TYPE_BCM2837 : TYPE_BCM2836);
137
object_property_add_child(OBJECT(machine), "soc", OBJECT(&s->soc),
138
&error_abort);
139
140
--
83
--
141
2.16.2
84
2.19.1
142
85
143
86
diff view generated by jsdifflib
1
Our BCM2836 type is really a generic one that can be any of
1
In practice for most of the more-or-less orphan Arm board models,
2
the bcm283x family. Rename it accordingly. We change only
2
I will review patches and put them in via the target-arm tree.
3
the names which are visible via the header file to the
3
So list myself as an "Odd Fixes" status maintainer for them.
4
rest of the QEMU code, leaving private function names
4
5
in bcm2836.c as they are.
5
This commit downgrades these boards to "Odd Fixes":
6
6
* Allwinner-A10
7
This is a preliminary to making bcm283x be an abstract
7
* Exynos
8
parent class to specific types for the bcm2836 and bcm2837.
8
* Calxeda Highbank
9
* Canon DIGIC
10
* Musicpal
11
* nSeries
12
* Palm
13
* PXA2xx
14
15
These boards were already "Odd Fixes":
16
* Gumstix
17
* i.MX31 (kzm)
18
19
Philippe Mathieu-Daudé has requested to be moved to R:
20
status for Gumstix now that I am listed as the M: contact.
21
22
Some boards are maintained, but their patches still go
23
via the target-arm tree, so add myself as a secondary
24
maintainer contact for those:
25
* Xilinx Zynq
26
* Xilinx ZynqMP
27
* STM32F205
28
* Netduino 2
29
* SmartFusion2
30
* Mecraft M2S-FG484
31
* ASPEED BMCs
32
* NRF51
9
33
10
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
34
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11
Reviewed-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
35
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
12
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
36
Reviewed-by: Thomas Huth <thuth@redhat.com>
13
Message-id: 20180313153458.26822-6-peter.maydell@linaro.org
37
Message-id: 20181108134139.31666-1-peter.maydell@linaro.org
14
---
38
---
15
include/hw/arm/bcm2836.h | 12 ++++++------
39
MAINTAINERS | 36 +++++++++++++++++++++++++++---------
16
hw/arm/bcm2836.c | 17 +++++++++--------
40
1 file changed, 27 insertions(+), 9 deletions(-)
17
hw/arm/raspi.c | 16 ++++++++--------
41
18
3 files changed, 23 insertions(+), 22 deletions(-)
42
diff --git a/MAINTAINERS b/MAINTAINERS
19
20
diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h
21
index XXXXXXX..XXXXXXX 100644
43
index XXXXXXX..XXXXXXX 100644
22
--- a/include/hw/arm/bcm2836.h
44
--- a/MAINTAINERS
23
+++ b/include/hw/arm/bcm2836.h
45
+++ b/MAINTAINERS
24
@@ -XXX,XX +XXX,XX @@
46
@@ -XXX,XX +XXX,XX @@ ARM Machines
25
#include "hw/arm/bcm2835_peripherals.h"
47
------------
26
#include "hw/intc/bcm2836_control.h"
48
Allwinner-a10
27
49
M: Beniamino Galvani <b.galvani@gmail.com>
28
-#define TYPE_BCM2836 "bcm2836"
50
+M: Peter Maydell <peter.maydell@linaro.org>
29
-#define BCM2836(obj) OBJECT_CHECK(BCM2836State, (obj), TYPE_BCM2836)
51
L: qemu-arm@nongnu.org
30
+#define TYPE_BCM283X "bcm283x"
52
-S: Maintained
31
+#define BCM283X(obj) OBJECT_CHECK(BCM283XState, (obj), TYPE_BCM283X)
53
+S: Odd Fixes
32
54
F: hw/*/allwinner*
33
-#define BCM2836_NCPUS 4
55
F: include/hw/*/allwinner*
34
+#define BCM283X_NCPUS 4
56
F: hw/arm/cubieboard.c
35
57
@@ -XXX,XX +XXX,XX @@ F: tests/test-arm-mptimer.c
36
-typedef struct BCM2836State {
58
37
+typedef struct BCM283XState {
59
Exynos
38
/*< private >*/
60
M: Igor Mitsyanko <i.mitsyanko@gmail.com>
39
DeviceState parent_obj;
61
+M: Peter Maydell <peter.maydell@linaro.org>
40
/*< public >*/
62
L: qemu-arm@nongnu.org
41
@@ -XXX,XX +XXX,XX @@ typedef struct BCM2836State {
63
-S: Maintained
42
char *cpu_type;
64
+S: Odd Fixes
43
uint32_t enabled_cpus;
65
F: hw/*/exynos*
44
66
F: include/hw/arm/exynos4210.h
45
- ARMCPU cpus[BCM2836_NCPUS];
67
46
+ ARMCPU cpus[BCM283X_NCPUS];
68
Calxeda Highbank
47
BCM2836ControlState control;
69
M: Rob Herring <robh@kernel.org>
48
BCM2835PeripheralState peripherals;
70
+M: Peter Maydell <peter.maydell@linaro.org>
49
-} BCM2836State;
71
L: qemu-arm@nongnu.org
50
+} BCM283XState;
72
-S: Maintained
51
73
+S: Odd Fixes
52
#endif /* BCM2836_H */
74
F: hw/arm/highbank.c
53
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
75
F: hw/net/xgmac.c
54
index XXXXXXX..XXXXXXX 100644
76
55
--- a/hw/arm/bcm2836.c
77
Canon DIGIC
56
+++ b/hw/arm/bcm2836.c
78
M: Antony Pavlov <antonynpavlov@gmail.com>
57
@@ -XXX,XX +XXX,XX @@
79
+M: Peter Maydell <peter.maydell@linaro.org>
58
80
L: qemu-arm@nongnu.org
59
static void bcm2836_init(Object *obj)
81
-S: Maintained
60
{
82
+S: Odd Fixes
61
- BCM2836State *s = BCM2836(obj);
83
F: include/hw/arm/digic.h
62
+ BCM283XState *s = BCM283X(obj);
84
F: hw/*/digic*
63
85
64
object_initialize(&s->control, sizeof(s->control), TYPE_BCM2836_CONTROL);
86
Gumstix
65
object_property_add_child(obj, "control", OBJECT(&s->control), NULL);
87
-M: Philippe Mathieu-Daudé <f4bug@amsat.org>
66
@@ -XXX,XX +XXX,XX @@ static void bcm2836_init(Object *obj)
88
+M: Peter Maydell <peter.maydell@linaro.org>
67
89
+R: Philippe Mathieu-Daudé <f4bug@amsat.org>
68
static void bcm2836_realize(DeviceState *dev, Error **errp)
90
L: qemu-devel@nongnu.org
69
{
91
L: qemu-arm@nongnu.org
70
- BCM2836State *s = BCM2836(dev);
92
S: Odd Fixes
71
+ BCM283XState *s = BCM283X(dev);
93
@@ -XXX,XX +XXX,XX @@ F: hw/arm/gumstix.c
72
Object *obj;
94
73
Error *err = NULL;
95
i.MX31 (kzm)
74
int n;
96
M: Peter Chubb <peter.chubb@nicta.com.au>
75
@@ -XXX,XX +XXX,XX @@ static void bcm2836_realize(DeviceState *dev, Error **errp)
97
+M: Peter Maydell <peter.maydell@linaro.org>
76
/* common peripherals from bcm2835 */
98
L: qemu-arm@nongnu.org
77
99
S: Odd Fixes
78
obj = OBJECT(dev);
100
F: hw/arm/kzm.c
79
- for (n = 0; n < BCM2836_NCPUS; n++) {
101
@@ -XXX,XX +XXX,XX @@ F: include/hw/misc/iotkit-sysinfo.h
80
+ for (n = 0; n < BCM283X_NCPUS; n++) {
102
81
object_initialize(&s->cpus[n], sizeof(s->cpus[n]),
103
Musicpal
82
s->cpu_type);
104
M: Jan Kiszka <jan.kiszka@web.de>
83
object_property_add_child(obj, "cpu[*]", OBJECT(&s->cpus[n]),
105
+M: Peter Maydell <peter.maydell@linaro.org>
84
@@ -XXX,XX +XXX,XX @@ static void bcm2836_realize(DeviceState *dev, Error **errp)
106
L: qemu-arm@nongnu.org
85
sysbus_connect_irq(SYS_BUS_DEVICE(&s->peripherals), 1,
107
-S: Maintained
86
qdev_get_gpio_in_named(DEVICE(&s->control), "gpu-fiq", 0));
108
+S: Odd Fixes
87
109
F: hw/arm/musicpal.c
88
- for (n = 0; n < BCM2836_NCPUS; n++) {
110
89
+ for (n = 0; n < BCM283X_NCPUS; n++) {
111
nSeries
90
/* Mirror bcm2836, which has clusterid set to 0xf
112
M: Andrzej Zaborowski <balrogg@gmail.com>
91
* TODO: this should be converted to a property of ARM_CPU
113
+M: Peter Maydell <peter.maydell@linaro.org>
92
*/
114
L: qemu-arm@nongnu.org
93
@@ -XXX,XX +XXX,XX @@ static void bcm2836_realize(DeviceState *dev, Error **errp)
115
-S: Maintained
94
}
116
+S: Odd Fixes
95
117
F: hw/arm/nseries.c
96
static Property bcm2836_props[] = {
118
97
- DEFINE_PROP_STRING("cpu-type", BCM2836State, cpu_type),
119
Palm
98
- DEFINE_PROP_UINT32("enabled-cpus", BCM2836State, enabled_cpus, BCM2836_NCPUS),
120
M: Andrzej Zaborowski <balrogg@gmail.com>
99
+ DEFINE_PROP_STRING("cpu-type", BCM283XState, cpu_type),
121
+M: Peter Maydell <peter.maydell@linaro.org>
100
+ DEFINE_PROP_UINT32("enabled-cpus", BCM283XState, enabled_cpus,
122
L: qemu-arm@nongnu.org
101
+ BCM283X_NCPUS),
123
-S: Maintained
102
DEFINE_PROP_END_OF_LIST()
124
+S: Odd Fixes
103
};
125
F: hw/arm/palm.c
104
126
105
@@ -XXX,XX +XXX,XX @@ static void bcm2836_class_init(ObjectClass *oc, void *data)
127
Raspberry Pi
106
}
128
@@ -XXX,XX +XXX,XX @@ F: include/hw/intc/realview_gic.h
107
129
108
static const TypeInfo bcm2836_type_info = {
130
PXA2XX
109
- .name = TYPE_BCM2836,
131
M: Andrzej Zaborowski <balrogg@gmail.com>
110
+ .name = TYPE_BCM283X,
132
+M: Peter Maydell <peter.maydell@linaro.org>
111
.parent = TYPE_DEVICE,
133
L: qemu-arm@nongnu.org
112
- .instance_size = sizeof(BCM2836State),
134
-S: Maintained
113
+ .instance_size = sizeof(BCM283XState),
135
+S: Odd Fixes
114
.instance_init = bcm2836_init,
136
F: hw/arm/mainstone.c
115
.class_init = bcm2836_class_init,
137
F: hw/arm/spitz.c
116
};
138
F: hw/arm/tosa.c
117
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
139
@@ -XXX,XX +XXX,XX @@ F: include/hw/arm/virt.h
118
index XXXXXXX..XXXXXXX 100644
140
Xilinx Zynq
119
--- a/hw/arm/raspi.c
141
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
120
+++ b/hw/arm/raspi.c
142
M: Alistair Francis <alistair@alistair23.me>
121
@@ -XXX,XX +XXX,XX @@
143
+M: Peter Maydell <peter.maydell@linaro.org>
122
static const int raspi_boardid[] = {[1] = 0xc42, [2] = 0xc43, [3] = 0xc44};
144
L: qemu-arm@nongnu.org
123
145
S: Maintained
124
typedef struct RasPiState {
146
F: hw/*/xilinx_*
125
- BCM2836State soc;
147
@@ -XXX,XX +XXX,XX @@ X: hw/ssi/xilinx_*
126
+ BCM283XState soc;
148
Xilinx ZynqMP
127
MemoryRegion ram;
149
M: Alistair Francis <alistair@alistair23.me>
128
} RasPiState;
150
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
129
151
+M: Peter Maydell <peter.maydell@linaro.org>
130
@@ -XXX,XX +XXX,XX @@ static void raspi_init(MachineState *machine, int version)
152
L: qemu-arm@nongnu.org
131
BusState *bus;
153
S: Maintained
132
DeviceState *carddev;
154
F: hw/*/xlnx*.c
133
155
@@ -XXX,XX +XXX,XX @@ F: hw/arm/virt-acpi-build.c
134
- object_initialize(&s->soc, sizeof(s->soc), TYPE_BCM2836);
156
135
+ object_initialize(&s->soc, sizeof(s->soc), TYPE_BCM283X);
157
STM32F205
136
object_property_add_child(OBJECT(machine), "soc", OBJECT(&s->soc),
158
M: Alistair Francis <alistair@alistair23.me>
137
&error_abort);
159
+M: Peter Maydell <peter.maydell@linaro.org>
138
160
S: Maintained
139
@@ -XXX,XX +XXX,XX @@ static void raspi2_machine_init(MachineClass *mc)
161
F: hw/arm/stm32f205_soc.c
140
mc->no_floppy = 1;
162
F: hw/misc/stm32f2xx_syscfg.c
141
mc->no_cdrom = 1;
163
@@ -XXX,XX +XXX,XX @@ F: include/hw/*/stm32*.h
142
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15");
164
143
- mc->max_cpus = BCM2836_NCPUS;
165
Netduino 2
144
- mc->min_cpus = BCM2836_NCPUS;
166
M: Alistair Francis <alistair@alistair23.me>
145
- mc->default_cpus = BCM2836_NCPUS;
167
+M: Peter Maydell <peter.maydell@linaro.org>
146
+ mc->max_cpus = BCM283X_NCPUS;
168
S: Maintained
147
+ mc->min_cpus = BCM283X_NCPUS;
169
F: hw/arm/netduino2.c
148
+ mc->default_cpus = BCM283X_NCPUS;
170
149
mc->default_ram_size = 1024 * 1024 * 1024;
171
SmartFusion2
150
mc->ignore_memory_transaction_failures = true;
172
M: Subbaraya Sundeep <sundeep.lkml@gmail.com>
151
};
173
+M: Peter Maydell <peter.maydell@linaro.org>
152
@@ -XXX,XX +XXX,XX @@ static void raspi3_machine_init(MachineClass *mc)
174
S: Maintained
153
mc->no_floppy = 1;
175
F: hw/arm/msf2-soc.c
154
mc->no_cdrom = 1;
176
F: hw/misc/msf2-sysreg.c
155
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a53");
177
@@ -XXX,XX +XXX,XX @@ F: include/hw/ssi/mss-spi.h
156
- mc->max_cpus = BCM2836_NCPUS;
178
157
- mc->min_cpus = BCM2836_NCPUS;
179
Emcraft M2S-FG484
158
- mc->default_cpus = BCM2836_NCPUS;
180
M: Subbaraya Sundeep <sundeep.lkml@gmail.com>
159
+ mc->max_cpus = BCM283X_NCPUS;
181
+M: Peter Maydell <peter.maydell@linaro.org>
160
+ mc->min_cpus = BCM283X_NCPUS;
182
S: Maintained
161
+ mc->default_cpus = BCM283X_NCPUS;
183
F: hw/arm/msf2-som.c
162
mc->default_ram_size = 1024 * 1024 * 1024;
184
163
}
185
ASPEED BMCs
164
DEFINE_MACHINE("raspi3", raspi3_machine_init)
186
M: Cédric Le Goater <clg@kaod.org>
187
+M: Peter Maydell <peter.maydell@linaro.org>
188
R: Andrew Jeffery <andrew@aj.id.au>
189
R: Joel Stanley <joel@jms.id.au>
190
L: qemu-arm@nongnu.org
191
@@ -XXX,XX +XXX,XX @@ F: include/hw/net/ftgmac100.h
192
193
NRF51
194
M: Joel Stanley <joel@jms.id.au>
195
+M: Peter Maydell <peter.maydell@linaro.org>
196
L: qemu-arm@nongnu.org
197
S: Maintained
198
F: hw/arm/nrf51_soc.c
165
--
199
--
166
2.16.2
200
2.19.1
167
201
168
202
diff view generated by jsdifflib