]> git.proxmox.com Git - qemu.git/commitdiff
sparc32 use empty_slot for missing RAM v1
authorArtyom Tarasenko <atar4qemu@googlemail.com>
Sat, 17 Apr 2010 22:34:03 +0000 (00:34 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 18 Apr 2010 08:55:20 +0000 (08:55 +0000)
use empty_slot device for the RAM which is not installed

Models without ECC don't trap when missing ram is accessed.

v0->v1 compile only once and fix indentation

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Makefile.objs
default-configs/sparc-softmmu.mak
hw/sun4m.c

index ab1af88af23f25b0ed161b415ab4b8dd00dbb1ac..f4d2faf06c896a02e08eb117e016136fe39632c7 100644 (file)
@@ -140,6 +140,7 @@ hw-obj-$(CONFIG_PFLASH_CFI02) += pflash_cfi02.o
 
 hw-obj-$(CONFIG_M48T59) += m48t59.o
 hw-obj-$(CONFIG_ESCC) += escc.o
+hw-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
 
 hw-obj-$(CONFIG_SERIAL) += serial.o
 hw-obj-$(CONFIG_PARALLEL) += parallel.o
index 54899ffc581447ba02be748db86ec1a76ce041ef..becf88096c8faada52c1caaad4b943672fbaecbc 100644 (file)
@@ -7,3 +7,4 @@ CONFIG_M48T59=y
 CONFIG_PTIMER=y
 CONFIG_FDC=y
 CONFIG_VIRTIO_PCI=y
+CONFIG_EMPTY_SLOT=y
index 90e661d5c269355d1344003f28cbf628093269c1..9a79120b1df2a5ff48a5cdd137c2269d93f54a2b 100644 (file)
@@ -36,6 +36,7 @@
 #include "isa.h"
 #include "fw_cfg.h"
 #include "escc.h"
+#include "empty_slot.h"
 #include "qdev-addr.h"
 #include "loader.h"
 #include "elf.h"
@@ -820,6 +821,10 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
 
     /* set up devices */
     ram_init(0, RAM_size, hwdef->max_mem);
+    /* models without ECC don't trap when missing ram is accessed */
+    if (!hwdef->ecc_base) {
+        empty_slot_init(RAM_size, hwdef->max_mem - RAM_size);
+    }
 
     prom_init(hwdef->slavio_base, bios_name);