Skip to content

Commit

Permalink
hw/arm/raspi: Display the board revision in the machine description
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd authored and pm215 committed Oct 1, 2020
1 parent e79f01f commit 62f06f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/arm/raspi.c
Expand Up @@ -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;
Expand Down

0 comments on commit 62f06f7

Please sign in to comment.