diff mbox series

[v2,12/12] hw/arm/raspi: Support more models

Message ID 20250204002240.97830-13-philmd@linaro.org (mailing list archive)
State New
Headers show
Series hw/arm/raspi: Allow creating any Raspberry Pi machine | expand

Commit Message

Philippe Mathieu-Daudé Feb. 4, 2025, 12:22 a.m. UTC
Allow to create the following machines:

  - Zero2W
  - 400
  - CM4 and CM4S

Fill the arrays with the BCM2712-based machines (raspi5),
but since we don't model the SoC, these machines can't
be created (and aren't listed in the 'help' output).

List taken from:
https://github.com/raspberrypi/documentation/blob/9b126446a5/documentation/asciidoc/computers/raspberry-pi/revision-codes.adoc

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/arm/raspi.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox series

Patch

diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 86ecc988e06..2346550eec5 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -71,6 +71,7 @@  typedef enum RaspiProcessorId {
     PROCESSOR_ID_BCM2837 = 2,
     PROCESSOR_ID_BCM2838 = 3,
     PROCESSOR_ID_BCM2711 = 3,
+    PROCESSOR_ID_BCM2712 = 4,
 } RaspiProcessorId;
 
 static const struct {
@@ -82,6 +83,7 @@  static const struct {
     [PROCESSOR_ID_BCM2836] = {TYPE_BCM2836, BCM283X_NCPUS,  1 * GiB},
     [PROCESSOR_ID_BCM2837] = {TYPE_BCM2837, BCM283X_NCPUS,  1 * GiB},
     [PROCESSOR_ID_BCM2838] = {TYPE_BCM2838, BCM283X_NCPUS,  8 * GiB},
+    [PROCESSOR_ID_BCM2712] = {NULL,         BCM283X_NCPUS,  16 * GiB},
 };
 
 static const struct {
@@ -106,6 +108,17 @@  static const struct {
     { },
     {PROCESSOR_ID_BCM2837, "CM3+"},
     {PROCESSOR_ID_BCM2711, "4B"},
+    {PROCESSOR_ID_BCM2837, "Zero2W"},
+    {PROCESSOR_ID_BCM2711, "400"},
+
+    {PROCESSOR_ID_BCM2711, "CM4"},
+    {PROCESSOR_ID_BCM2711, "CM4S"},
+    { },
+    {PROCESSOR_ID_BCM2712, "5"},
+    {PROCESSOR_ID_BCM2712, "CM5"},
+    {PROCESSOR_ID_BCM2712, "500"},
+    {PROCESSOR_ID_BCM2712, "CM5lite"},
+    { },
 };
 
 uint64_t board_ram_size(uint32_t board_rev)