summaryrefslogtreecommitdiffstats
path: root/hw/ppc/ppc405_boards.c
diff options
context:
space:
mode:
authorBALATON Zoltan2022-09-24 14:27:52 +0200
committerDaniel Henrique Barboza2022-10-17 21:15:09 +0200
commit68b9a2e38d7183f64dddc5faec9a16c70a4f095c (patch)
treed172ca8d0ca763b634b3ede5ccb1d164c65e3cec /hw/ppc/ppc405_boards.c
parentppc4xx: Introduce Ppc4xxSdramBank struct (diff)
downloadqemu-68b9a2e38d7183f64dddc5faec9a16c70a4f095c.tar.gz
qemu-68b9a2e38d7183f64dddc5faec9a16c70a4f095c.tar.xz
qemu-68b9a2e38d7183f64dddc5faec9a16c70a4f095c.zip
ppc4xx_sdram: Get rid of the init RAM hack
The do_init parameter of ppc4xx_sdram_init() is used to map memory regions that is normally done by the firmware by programming the SDRAM controller. Do this from board code emulating what firmware would do when booting a kernel directly from -kernel without a firmware so we can get rid of this do_init hack. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <d6c44c870befa1a075e21f1a59926dcdaff63f6b.1664021647.git.balaton@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'hw/ppc/ppc405_boards.c')
-rw-r--r--hw/ppc/ppc405_boards.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 083f12b23e..1eaeca8806 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -288,8 +288,6 @@ static void ppc405_init(MachineState *machine)
machine->ram_size, &error_fatal);
object_property_set_link(OBJECT(&ppc405->soc), "dram",
OBJECT(machine->ram), &error_abort);
- object_property_set_bool(OBJECT(&ppc405->soc), "dram-init",
- kernel_filename != NULL, &error_abort);
object_property_set_uint(OBJECT(&ppc405->soc), "sys-clk", 33333333,
&error_abort);
qdev_realize(DEVICE(&ppc405->soc), NULL, &error_fatal);
@@ -349,6 +347,7 @@ static void ppc405_init(MachineState *machine)
/* Load ELF kernel and rootfs.cpio */
} else if (kernel_filename && !machine->firmware) {
+ ppc4xx_sdram_enable(&ppc405->soc.cpu.env);
boot_from_kernel(machine, &ppc405->soc.cpu);
}
}