diff options
| author | Peter Maydell | 2016-02-11 12:24:16 +0100 |
|---|---|---|
| committer | Peter Maydell | 2016-02-11 12:24:16 +0100 |
| commit | 36a9abd9be2f85c07e93378a5c5d1b180f5b2e15 (patch) | |
| tree | e759b3873d39ed5ad47605d41fe4934d1fe477be /hw | |
| parent | memory: fix usage of find_next_bit and find_next_zero_bit (diff) | |
| parent | bcm2835_property: implement "get board revision" query (diff) | |
| download | qemu-36a9abd9be2f85c07e93378a5c5d1b180f5b2e15.tar.gz qemu-36a9abd9be2f85c07e93378a5c5d1b180f5b2e15.tar.xz qemu-36a9abd9be2f85c07e93378a5c5d1b180f5b2e15.zip | |
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160211' into staging
target-arm queue:
* fix some missing traps for EL3 support
* enable EL3 on Cortex-A53 and Cortex-A57
* fix syndrome IL bit for Thumb coprocessor, VFP and Neon traps
* fix mishandling of architectural watchpoints
* avoid buffer overflow in sd.c
* fix max-cpus check in virt board
* implement 'get board revision' query for BCM2835
# gpg: Signature made Thu 11 Feb 2016 11:23:47 GMT using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg: aka "Peter Maydell <pmaydell@gmail.com>"
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
* remotes/pmaydell/tags/pull-target-arm-20160211:
bcm2835_property: implement "get board revision" query
hw/arm/virt: fix max-cpus check
sd: limit 'req.cmd' while using as an array index
target-arm: Implement checking of fired watchpoint
cpu: Add callback to check architectural watchpoint match
target-arm: Fix IL bit reported for Thumb VFP and Neon traps
target-arm: Fix IL bit reported for Thumb coprocessor traps
target-arm: Correct misleading 'is_thumb' syn_* parameter names
target-arm: Enable EL3 for Cortex-A53 and Cortex-A57
target-arm: Implement NSACR trapping behaviour
target-arm: Add isread parameter to CPAccessFns
target-arm: Update arm_generate_debug_exceptions() to handle EL2/EL3
target-arm: Use access_trap_aa32s_el1() for SCR and MVBAR
target-arm: Implement MDCR_EL3 and SDCR
target-arm: Fix typo in comment in arm_is_secure_below_el3()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/arm/bcm2835_peripherals.c | 2 | ||||
| -rw-r--r-- | hw/arm/bcm2836.c | 2 | ||||
| -rw-r--r-- | hw/arm/raspi.c | 2 | ||||
| -rw-r--r-- | hw/arm/virt.c | 10 | ||||
| -rw-r--r-- | hw/misc/bcm2835_property.c | 4 | ||||
| -rw-r--r-- | hw/sd/sd.c | 7 |
6 files changed, 18 insertions, 9 deletions
diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c index 18b72ecb69..e4fb48b803 100644 --- a/hw/arm/bcm2835_peripherals.c +++ b/hw/arm/bcm2835_peripherals.c @@ -58,6 +58,8 @@ static void bcm2835_peripherals_init(Object *obj) /* Property channel */ object_initialize(&s->property, sizeof(s->property), TYPE_BCM2835_PROPERTY); object_property_add_child(obj, "property", OBJECT(&s->property), NULL); + object_property_add_alias(obj, "board-rev", OBJECT(&s->property), + "board-rev", &error_abort); qdev_set_parent_bus(DEVICE(&s->property), sysbus_get_default()); object_property_add_const_link(OBJECT(&s->property), "dma-mr", diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 69c7438317..8a4d13c7d9 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -39,6 +39,8 @@ static void bcm2836_init(Object *obj) TYPE_BCM2835_PERIPHERALS); object_property_add_child(obj, "peripherals", OBJECT(&s->peripherals), &error_abort); + object_property_add_alias(obj, "board-rev", OBJECT(&s->peripherals), + "board-rev", &error_abort); qdev_set_parent_bus(DEVICE(&s->peripherals), sysbus_get_default()); } diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 0c9427c40e..7d3d21ab32 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -128,6 +128,8 @@ static void raspi2_init(MachineState *machine) &error_abort); object_property_set_int(OBJECT(&s->soc), smp_cpus, "enabled-cpus", &error_abort); + object_property_set_int(OBJECT(&s->soc), 0xa21041, "board-rev", + &error_abort); object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_abort); setup_boot(machine, 2, machine->ram_size); diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 15658f49c4..44bbbea92b 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1013,7 +1013,7 @@ static void machvirt_init(MachineState *machine) MemoryRegion *sysmem = get_system_memory(); MemoryRegion *secure_sysmem = NULL; int gic_version = vms->gic_version; - int n, max_cpus; + int n, virt_max_cpus; MemoryRegion *ram = g_new(MemoryRegion, 1); const char *cpu_model = machine->cpu_model; VirtBoardInfo *vbi; @@ -1051,15 +1051,15 @@ static void machvirt_init(MachineState *machine) * many redistributors we can fit into the memory map. */ if (gic_version == 3) { - max_cpus = vbi->memmap[VIRT_GIC_REDIST].size / 0x20000; + virt_max_cpus = vbi->memmap[VIRT_GIC_REDIST].size / 0x20000; } else { - max_cpus = GIC_NCPU; + virt_max_cpus = GIC_NCPU; } - if (smp_cpus > max_cpus) { + if (max_cpus > virt_max_cpus) { error_report("Number of SMP CPUs requested (%d) exceeds max CPUs " "supported by machine 'mach-virt' (%d)", - smp_cpus, max_cpus); + max_cpus, virt_max_cpus); exit(1); } diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c index e42b43e72d..45bd6c18ce 100644 --- a/hw/misc/bcm2835_property.c +++ b/hw/misc/bcm2835_property.c @@ -43,8 +43,7 @@ static void bcm2835_property_mbox_push(BCM2835PropertyState *s, uint32_t value) resplen = 4; break; case 0x00010002: /* Get board revision */ - qemu_log_mask(LOG_UNIMP, - "bcm2835_property: %x get board revision NYI\n", tag); + stl_phys(&s->dma_as, value + 12, s->board_rev); resplen = 4; break; case 0x00010003: /* Get board MAC address */ @@ -258,6 +257,7 @@ static void bcm2835_property_realize(DeviceState *dev, Error **errp) } static Property bcm2835_property_props[] = { + DEFINE_PROP_UINT32("board-rev", BCM2835PropertyState, board_rev, 0), DEFINE_PROP_UINT32("ram-size", BCM2835PropertyState, ram_size, 0), DEFINE_PROP_END_OF_LIST() }; diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 7580449f97..dd614b0890 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -669,8 +669,10 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, /* Not interpreting this as an app command */ sd->card_status &= ~APP_CMD; - if (sd_cmd_type[req.cmd] == sd_ac || sd_cmd_type[req.cmd] == sd_adtc) + if (sd_cmd_type[req.cmd & 0x3F] == sd_ac + || sd_cmd_type[req.cmd & 0x3F] == sd_adtc) { rca = req.arg >> 16; + } DPRINTF("CMD%d 0x%08x state %d\n", req.cmd, req.arg, sd->state); switch (req.cmd) { @@ -1341,7 +1343,8 @@ static int cmd_valid_while_locked(SDState *sd, SDRequest *req) if (req->cmd == 16 || req->cmd == 55) { return 1; } - return sd_cmd_class[req->cmd] == 0 || sd_cmd_class[req->cmd] == 7; + return sd_cmd_class[req->cmd & 0x3F] == 0 + || sd_cmd_class[req->cmd & 0x3F] == 7; } int sd_do_command(SDState *sd, SDRequest *req, |
