From patchwork Sat Jun 5 20:25:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Breuer X-Patchwork-Id: 54781 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 456E5B7D4F for ; Sun, 6 Jun 2010 06:23:33 +1000 (EST) Received: from localhost ([127.0.0.1]:53590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKztu-0001uq-98 for incoming@patchwork.ozlabs.org; Sat, 05 Jun 2010 16:23:26 -0400 Received: from [140.186.70.92] (port=59772 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKztI-0001t8-TW for qemu-devel@nongnu.org; Sat, 05 Jun 2010 16:22:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKztG-00061K-EO for qemu-devel@nongnu.org; Sat, 05 Jun 2010 16:22:47 -0400 Received: from mail.mc.net ([209.172.128.24]:53240) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OKztG-000614-9t for qemu-devel@nongnu.org; Sat, 05 Jun 2010 16:22:46 -0400 Received: (qmail 14433 invoked by uid 420); 5 Jun 2010 20:22:46 -0000 Received: from unknown (HELO ?127.0.0.1?) (breuerr@209.172.177.18) by mail.mc.net with SMTP; 5 Jun 2010 20:22:46 -0000 Message-ID: <4C0AB2B8.2080906@mc.net> Date: Sat, 05 Jun 2010 15:25:28 -0500 From: Bob Breuer User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Blue Swirl References: In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: qemu-devel@nongnu.org, Artyom Tarasenko Subject: [Qemu-devel] Re: option-rom (was cg14) 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 Blue Swirl wrote: > On Fri, Jun 4, 2010 at 5:40 PM, Artyom Tarasenko > wrote: > >>>>> 2010/5/27 Bob Breuer : >>>>> + /* DBRI (audio) */ >>>>> + cpu_register_physical_memory_offset(0xEE0001000ULL, 0x10000, bad_mem, 0xE0001000); >>>>> >>>> Please add a new DBRI device ;-). >>>> >>> Or maybe just a field in hwdef + empty_slot? :-) >>> >> Or actually don't bother at all. What is expected at 0xee0001000 is >> not the DBRI device, but its FCode driver. >> I wrote a stub, but don't see that it helps to boot except one has a >> nice device name ( >> >> Probing /obio at 2,0 cgfourteen >> Probing /iommu@f,e0000000/sbus@f,e0001000 at f,0 espdma esp sd st >> ledma le SUNW,bpp >> Probing /iommu@f,e0000000/sbus@f,e0001000 at e,0 qemu,device-stub >> Probing /iommu@f,e0000000/sbus@f,e0001000 at 0,0 Nothing there >> >> ) and switching off slot "e" probing is not necessary. >> >> >> What would be nice is a generic '-option-rom' switch which would take >> a rom address and rom file or contents >> as params. Or do we have something like this? I mean for qemu-system-sparc. >> > > Maybe SysBusDeviceInfo should have something similar to PCI .romfile > field, or we should rather have a SBusDeviceInfo. That way ROM > handling would be automatic. > With empty_slot SS-20 OBP accesses just 2 addresses for slot E: 0xEE0001000 - 8bit read (FCode) 0xEE0010000 - 32bit write (put DBRI into reset) Did a little digging, slot E starts at 0xEE0000000 (0xE << 32 | slot << 28). On my SS-20, the DBRI FCode is only 48 bytes which is then mirrored every 64 bytes within at least the first 8K, and the actual registers are at offset 64K with a reported length of 256 bytes. Besides hooking up DBRI (empty_slot or not), I would propose the following additions to the sun4m_hwdef structure so that the other missing pieces can then be hooked up to empty_slot. Also, looks like OpenBIOS would need some additional ranges added under obio and sbus. From a SS-20: ok cd /obio ok .attributes ranges 00000000 00000000 0000000f f1000000 01000000 00000001 00000000 00000000 90000000 04000000 00000002 00000000 00000000 9c000000 04000000 00000003 00000000 00000000 f0000000 04000000 00000004 00000000 00000000 fc000000 04000000 device_type hierarchical name obio ok cd /iommu/sbus ok .attributes clock-frequency 017d7840 scsi-initiator-id 00000007 burst-sizes 00f8007f ranges 00000000 00000000 0000000e 00000000 10000000 00000001 00000000 0000000e 10000000 10000000 00000002 00000000 0000000e 20000000 10000000 00000003 00000000 0000000e 30000000 10000000 0000000e 00000000 0000000e e0000000 10000000 0000000f 00000000 0000000e f0000000 10000000 address ffeec000 reg 0000000f e0001000 00000020 slot-address-bits 0000001c up-burst-sizes 0000003f device_type hierarchical name sbus --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -98,6 +98,10 @@ struct sun4m_hwdef { target_phys_addr_t serial_base, fd_base; target_phys_addr_t afx_base, idreg_base, dma_base, esp_base, le_base; target_phys_addr_t tcx_base, cs_base, apc_base, aux1_base, aux2_base; + target_phys_addr_t dbri_base, sx_base; + struct { + target_phys_addr_t reg_base, vram_base; + } vsimm[4]; target_phys_addr_t ecc_base; uint32_t ecc_version; uint8_t nvram_machine_id;