From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3QKW-0004pb-Cz for qemu-devel@nongnu.org; Sun, 18 Apr 2010 04:58:16 -0400 Received: from [140.186.70.92] (port=37395 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3QKU-0004pF-BT for qemu-devel@nongnu.org; Sun, 18 Apr 2010 04:58:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3QKS-0006zl-Gp for qemu-devel@nongnu.org; Sun, 18 Apr 2010 04:58:14 -0400 Received: from mail-pz0-f204.google.com ([209.85.222.204]:52265) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3QKS-0006zc-By for qemu-devel@nongnu.org; Sun, 18 Apr 2010 04:58:12 -0400 Received: by pzk42 with SMTP id 42so2805769pzk.4 for ; Sun, 18 Apr 2010 01:58:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1271543643-28463-1-git-send-email-atar4qemu@google.com> References: <1271543643-28463-1-git-send-email-atar4qemu@google.com> Date: Sun, 18 Apr 2010 11:58:10 +0300 Message-ID: From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] Re: [patch 02/02] sparc32 use empty_slot for missing RAM v1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel@nongnu.org Thanks, applied both. On 4/18/10, Artyom Tarasenko wrote: > 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 > --- > diff --git a/Makefile.objs b/Makefile.objs > index ab1af88..f4d2faf 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -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 > diff --git a/default-configs/sparc-softmmu.mak b/default-configs/sparc-softmmu.mak > index 54899ff..becf880 100644 > --- a/default-configs/sparc-softmmu.mak > +++ b/default-configs/sparc-softmmu.mak > @@ -7,3 +7,4 @@ CONFIG_M48T59=y > CONFIG_PTIMER=y > CONFIG_FDC=y > CONFIG_VIRTIO_PCI=y > +CONFIG_EMPTY_SLOT=y > diff --git a/hw/sun4m.c b/hw/sun4m.c > index 90e661d..73b6949 100644 > --- a/hw/sun4m.c > +++ b/hw/sun4m.c > @@ -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,7 +821,11 @@ 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); > > slavio_intctl = slavio_intctl_init(hwdef->intctl_base, >