summaryrefslogtreecommitdiffstats
path: root/hw/misc
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2016-02-11 11:17:32 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:43:57 -0600
commita1c40b8651dece5c75c2752d632d533642b20db5 (patch)
tree30ee4bc24ceda236ae894cf62d641c652df1bd24 /hw/misc
parent254b3a54bda787ba804574e2af4f1e455db125a6 (diff)
downloadhqemu-a1c40b8651dece5c75c2752d632d533642b20db5.zip
hqemu-a1c40b8651dece5c75c2752d632d533642b20db5.tar.gz
bcm2835_property: implement "get board revision" query
Return a valid value from the BCM2835 property mailbox query "get board revision". This query is used by U-Boot. Implementing it fixes the first obvious difference between qemu and real HW. The value returned is currently hard-coded to match the RPi2 I own. Other values are legal, e.g. different board manufacturer field values are likely to exist in the wild. Cc: Andrew Baumann <Andrew.Baumann@microsoft.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Andrew Baumann <Andrew.Baumann@microsoft.com> Message-id: 1454993910-24077-1-git-send-email-swarren@wwwdotorg.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/bcm2835_property.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c
index e42b43e..45bd6c1 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()
};
OpenPOWER on IntegriCloud