From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPbH7-0000o2-2B for qemu-devel@nongnu.org; Wed, 02 May 2012 11:15:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPbH2-0005Ek-4p for qemu-devel@nongnu.org; Wed, 02 May 2012 11:15:28 -0400 Received: from mail.mc.net ([209.172.128.24]:54654) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SPbH1-0005EE-V2 for qemu-devel@nongnu.org; Wed, 02 May 2012 11:15:24 -0400 Message-ID: <4FA14F7B.80404@mc.net> Date: Wed, 02 May 2012 10:15:07 -0500 From: Bob Breuer MIME-Version: 1.0 References: <4F9D797E.500@ilande.co.uk> <4F9D97F3.8080608@codemonkey.ws> <4F9E5028.7010306@redhat.com> <4F9E82C7.10706@ilande.co.uk> <4F9E9268.70408@redhat.com> <4F9E9906.8060401@ilande.co.uk> <4FA0300B.7080001@ilande.co.uk> In-Reply-To: <4FA0300B.7080001@ilande.co.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Memory API: handling unassigned physical memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland Cc: Blue Swirl , qemu-devel@nongnu.org On 5/1/2012 1:48 PM, Mark Cave-Ayland wrote: > On 01/05/12 07:57, Blue Swirl wrote: > >>> Therefore I can't change it to my (modified) sbus_mmio_map() function >>> because it would break other non-SPARC platforms, and AIUI there is >>> nothing >>> in the memory API that allows me to move a subregion to a different >>> MemoryRegion parent, even if I can get a reference to it with >>> sysbus_mmio_get_region() after the sysbus_mmio_map() call - or have I >>> misunderstood something? >> >> Sysbus is used as a generic class for motherboard devices, there is an >> assumption that there is no higher level bus. What we need here is a >> full blown bus. The translations and mappigs between bus addresses and >> motherboard addresses should be done in a Sysbus to SBus bridge >> device, just like PCI host bridges do. > > Since SBus is mapped directly to physical addresses, is this mapping not > just 1:1? Or does it make sense to re-work all the offsets of the > various peripherals to be from the base address of the first slot? It would be nice to have the device offsets be relative to the slot. User-pluggable sbus devices should be possible. I've just pushed an update of a dbri sbus device model to github ( https://github.com/breuerr/qemu/commits/dbri-pre2 ). This device was built-in to at least the SS-20, but also available as an sbus add-in card (SunLink ISDN). There's an fcode rom so it can be probed by OBP, and if we could get something like "-device SUNW,,DBRIe,slot=1" to work, then a user could add it to most of the sun4m machine models. Bob