summary refs log tree commit diff stats
path: root/hw/arm/aspeed_ast2600.c
diff options
context:
space:
mode:
authorPeter Delevoryas <pdel@fb.com>2022-06-30 09:21:13 +0200
committerCédric Le Goater <clg@kaod.org>2022-06-30 09:21:13 +0200
commit4dd9d55416695b651d8146e057acff8954bc203d (patch)
treee13c11e2dab438c8f7b240a9b53042d45e9fe24a /hw/arm/aspeed_ast2600.c
parente37976d733f75eab74018e6632f29c0335a4ddcd (diff)
downloadfocaccia-qemu-4dd9d55416695b651d8146e057acff8954bc203d.tar.gz
focaccia-qemu-4dd9d55416695b651d8146e057acff8954bc203d.zip
aspeed: Add memory property to Aspeed SoC
Multi-SoC machines can use this property to specify a memory container
for each SoC. Single SoC machines will just specify get_system_memory().

Signed-off-by: Peter Delevoryas <pdel@fb.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220624003701.1363500-3-pdel@fb.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/arm/aspeed_ast2600.c')
-rw-r--r--hw/arm/aspeed_ast2600.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index a4d90daf37..e4aa908fab 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -291,7 +291,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
         object_property_set_int(OBJECT(&s->cpu[i]), "cntfrq", 1125000000,
                                 &error_abort);
         object_property_set_link(OBJECT(&s->cpu[i]), "memory",
-                                 OBJECT(get_system_memory()), &error_abort);
+                                 OBJECT(s->memory), &error_abort);
 
         if (!qdev_realize(DEVICE(&s->cpu[i]), NULL, errp)) {
             return;
@@ -329,7 +329,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
         error_propagate(errp, err);
         return;
     }
-    memory_region_add_subregion(get_system_memory(),
+    memory_region_add_subregion(s->memory,
                                 sc->memmap[ASPEED_DEV_SRAM], &s->sram);
 
     /* DPMCU */