aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-09-24 13:18:01 +0200
committerPeter Maydell <peter.maydell@linaro.org>2020-10-01 15:31:01 +0100
commit62f06f71373f2c3123e9599e59c80fccea24c604 (patch)
treee2854aa54fca05cd9409580aa149cce92f47b838 /hw/arm
parente79f01f3ae65aae1baf01486d800f8b04a939d4e (diff)
downloadqemu-62f06f71373f2c3123e9599e59c80fccea24c604.zip
qemu-62f06f71373f2c3123e9599e59c80fccea24c604.tar.gz
qemu-62f06f71373f2c3123e9599e59c80fccea24c604.tar.bz2
hw/arm/raspi: Display the board revision in the machine description
Display the board revision in the machine description. Before: $ qemu-system-aarch64 -M help | fgrep raspi raspi2 Raspberry Pi 2B raspi3 Raspberry Pi 3B After: raspi2 Raspberry Pi 2B (revision 1.1) raspi3 Raspberry Pi 3B (revision 1.2) Reviewed-by: Luc Michel <luc.michel@greensocs.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20200924111808.77168-2-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/raspi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 811eaf5..46d9ed7 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -312,7 +312,9 @@ static void raspi_machine_class_init(ObjectClass *oc, void *data)
uint32_t board_rev = (uint32_t)(uintptr_t)data;
rmc->board_rev = board_rev;
- mc->desc = g_strdup_printf("Raspberry Pi %s", board_type(board_rev));
+ mc->desc = g_strdup_printf("Raspberry Pi %s (revision 1.%u)",
+ board_type(board_rev),
+ FIELD_EX32(board_rev, REV_CODE, REVISION));
mc->init = raspi_machine_init;
mc->block_default_type = IF_SD;
mc->no_parallel = 1;