From patchwork Fri Apr 16 23:14:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 50360 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 20EC4B7D0E for ; Sat, 17 Apr 2010 09:21:22 +1000 (EST) Received: from localhost ([127.0.0.1]:58935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2ulV-0001sT-45 for incoming@patchwork.ozlabs.org; Fri, 16 Apr 2010 19:16:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2ukF-0001sI-EE for qemu-devel@nongnu.org; Fri, 16 Apr 2010 19:14:43 -0400 Received: from [140.186.70.92] (port=47387 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2ukD-0001s8-LU for qemu-devel@nongnu.org; Fri, 16 Apr 2010 19:14:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2ukB-00079s-RC for qemu-devel@nongnu.org; Fri, 16 Apr 2010 19:14:41 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:62819) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2ukB-00079g-LT for qemu-devel@nongnu.org; Fri, 16 Apr 2010 19:14:39 -0400 Received: by fg-out-1718.google.com with SMTP id e21so490057fga.10 for ; Fri, 16 Apr 2010 16:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=/903VpyNuc9dGCXQmcMGdc2h2+LMbuDkh+SntECx6W8=; b=PLAk8cYZeitHF0woUpltznePyf0WTaAoCYPHILhiOzrAcVrfKmehnPcvZWYppa60pu 6GFyHo9N9m7CQPAzP44QgEOvwH+U0FU/V3tPEroCPhoa78ZbzNb/2ZBZF3sO5WJQtPop qzgyy7P4xHddTTbcwYXiMG/m7Y+jSpo0raQ44= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=Ax/7vVypcjdzOWOzmcYfxlr7RLS7ouudb1MfXliY9hmuavYiTftqHb3scRMq6+3b6t Z8+5TT7qV9wSJ3B20HjmtoGBl4ZpoFt+TqZsZuMoz3ea1sYxGKD+XfEgkxxCECf6pC7j UHmL0k7j/DfFKgMxNQJ0gONFeh/T+zADVudVs= Received: by 10.223.63.76 with SMTP id a12mr1035009fai.10.1271459678663; Fri, 16 Apr 2010 16:14:38 -0700 (PDT) Received: from localhost (e181218163.adsl.alicedsl.de [85.181.218.163]) by mx.google.com with ESMTPS id 19sm5006516fkr.9.2010.04.16.16.14.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Apr 2010 16:14:38 -0700 (PDT) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Sat, 17 Apr 2010 01:14:37 +0200 Message-Id: <1271459677-21942-1-git-send-email-atar4qemu@google.com> X-Mailer: git-send-email 1.6.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: blauwirbel@gmail.com, Artyom Tarasenko Subject: [Qemu-devel] [patch 02/02] sparc32 use empty_slot for missing RAM X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org use empty_slot device for the RAM which is not installed Models without ECC don't trap when missing ram is accessed. Signed-off-by: Artyom Tarasenko --- Makefile.target | 2 +- hw/sun4m.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.target b/Makefile.target index 95c9d23..6362927 100644 --- a/Makefile.target +++ b/Makefile.target @@ -248,7 +248,7 @@ obj-sparc-y += cirrus_vga.o else obj-sparc-y = sun4m.o lance.o tcx.o sun4m_iommu.o slavio_intctl.o obj-sparc-y += slavio_timer.o slavio_misc.o sparc32_dma.o -obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o +obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o empty_slot.o endif obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o diff --git a/hw/sun4m.c b/hw/sun4m.c index 90e661d..fb49af5 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,