Skip to contentSkip to conversation

raspi4b: Reduce RAM to 1Gb on 32-bit hosts

PATCH Applied Cédric Le Goater 2 participants 2 messages Mar 29, 2024 – Apr 2, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 raspi4b: Reduce RAM to 1Gb on 32-bit hosts

Change the board revision number and RAM size to 1Gb on 32-bit hosts. On these systems, RAM has a 2047 MB limit and this breaks the tests.

Fixes 7785e8ea2204 ("hw/arm: Introduce Raspberry PI 4 machine")
---
 hw/arm/raspi4b.c | 4 ++++
 1 file changed, 4 insertions(+)
hw/arm/raspi4b.c +4 -0
index cb1b1f2f147e8685a1dba6f137335ea0bc89bca5..85877880fc706d216de04ff1e081d66e6080ebac 100644
@@ -112,7 +112,11 @@ static void raspi4b_machine_class_init(ObjectClass *oc, void *data)
     MachineClass *mc = MACHINE_CLASS(oc);
     RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
 
+#if HOST_LONG_BITS == 32
+    rmc->board_rev = 0xa03111; /* Revision 1.1, 1 Gb RAM */
+#else
     rmc->board_rev = 0xb03115; /* Revision 1.5, 2 Gb RAM */
+#endif
     raspi_machine_class_common_init(mc, rmc->board_rev);
     mc->init = raspi4b_machine_init;
 }
Signature · 1 line
2.44.0
#1 lore raw
Quoted 16 lines · Cédric Le Goater

Change the board revision number and RAM size to 1Gb on 32-bit hosts. On these systems, RAM has a 2047 MB limit and this breaks the tests.

Fixes 7785e8ea2204 ("hw/arm: Introduce Raspberry PI 4 machine")
---
 hw/arm/raspi4b.c | 4 ++++
 1 file changed, 4 insertions(+)
hw/arm/raspi4b.c +0 -0
index cb1b1f2f147e8685a1dba6f137335ea0bc89bca5..85877880fc706d216de04ff1e081d66e6080ebac 100644
@@ -112,7 +112,11 @@ static void raspi4b_machine_class_init(ObjectClass *oc, void *data)
     MachineClass *mc = MACHINE_CLASS(oc);

hw/arm/raspi4b.c static void raspi4b_machine_class_init(ObjectClass *oc, void *data) · line 122

Quoted 10 lines
hw/arm/raspi4b.c +4 -0
     RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
 
+#if HOST_LONG_BITS == 32
+    rmc->board_rev = 0xa03111; /* Revision 1.1, 1 Gb RAM */
+#else
     rmc->board_rev = 0xb03115; /* Revision 1.5, 2 Gb RAM */
+#endif
     raspi_machine_class_common_init(mc, rmc->board_rev);
     mc->init = raspi4b_machine_init;
 }

Running "make check" on a 32-bit host has clearly fallen off our CI config...

Applied to target-arm.next for 9.0, thanks.

-- PMM