From patchwork Mon Jan 19 12:42:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 430426 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C242D14017F for ; Mon, 19 Jan 2015 23:43:31 +1100 (AEDT) Received: from localhost ([::1]:37040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDBg2-0000KV-20 for incoming@patchwork.ozlabs.org; Mon, 19 Jan 2015 07:43:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDBfX-00086o-IO for qemu-devel@nongnu.org; Mon, 19 Jan 2015 07:43:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDBfS-0007bz-Hx for qemu-devel@nongnu.org; Mon, 19 Jan 2015 07:42:59 -0500 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:48755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDBfS-0007bv-CC for qemu-devel@nongnu.org; Mon, 19 Jan 2015 07:42:54 -0500 Received: from 5ec2da75.skybroadband.com ([94.194.218.117] helo=kentang.lan) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1YDBfQ-0003VY-IA; Mon, 19 Jan 2015 12:42:53 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, atar4qemu@gmail.com Date: Mon, 19 Jan 2015 12:42:07 +0000 Message-Id: <1421671327-13240-2-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1421671327-13240-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1421671327-13240-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 94.194.218.117 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 1/1] sun4u: switch m48t59 NVRAM to MMIO access X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Real sun4u systems memory-map the NVRAM on the (ISA) ebus, so switch over to MMIO from ioport access, adding the 68 year offset used by Sun systems. This allows all SPARC64 OSs included in my tests to correctly detect the NVRAM IC and read the hardware clock correctly upon boot. Note that this also requires a corresponding OpenBIOS update to switch the SPARC64 NVRAM accessors over from ioport to MMIO. Signed-off-by: Mark Cave-Ayland --- hw/sparc64/sun4u.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 86f5861..c315897 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -609,7 +609,7 @@ pci_ebus_init1(PCIDevice *pci_dev) 0, 0x1000000); pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar0); memory_region_init_alias(&s->bar1, OBJECT(s), "bar1", get_system_io(), - 0, 0x1000); + 0, 0x4000); pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->bar1); return 0; } @@ -873,7 +873,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, fd[i] = drive_get(IF_FLOPPY, 0, i); } fdctrl_init_isa(isa_bus, fd); - nvram = m48t59_init_isa(isa_bus, 0, 0x0074, NVRAM_SIZE, 0, 59); + nvram = m48t59_init_isa(isa_bus, 0x2000, 0, NVRAM_SIZE, 68, 59); initrd_size = 0; initrd_addr = 0;