Received: from [140.186.70.92] (port=59253 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pv4iN-0005bU-Eo for qemu-devel@nongnu.org; Thu, 03 Mar 2011 04:21:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pv4iI-0006dj-Ir for qemu-devel@nongnu.org; Thu, 03 Mar 2011 04:20:55 -0500 Received: from nm8-vm0.bullet.mail.ukl.yahoo.com ([217.146.183.238]:38292) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Pv4iI-0006dT-9R for qemu-devel@nongnu.org; Thu, 03 Mar 2011 04:20:50 -0500 Message-ID: <785479.73458.qm@web27208.mail.ukl.yahoo.com> Date: Thu, 3 Mar 2011 09:20:48 +0000 (GMT) From: Salvatore Lionetti Subject: Re: [Qemu-devel] Memory Map In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincent Palatin Cc: Blue Swirl , qemu-devel@nongnu.org Sure, i'm very interested in.=0AI've used another implementation that still= require large amount of data to be allocated (but with O(1) search time)= =0A=0AHave a good day=0A=0A=0A=0A=0A--- Mer 2/3/11, Vincent Palatin ha scritto:=0A=0A> Da: Vincent Palatin =0A> Oggetto: Re: [Qemu-devel] Memory Map=0A> A: "Salvatore Lionetti" <= salvatorelionetti@yahoo.it>=0A> Cc: "Blue Swirl" , qe= mu-devel@nongnu.org=0A> Data: Mercoled=EC 2 marzo 2011, 22:13=0A> Hi,=0A> = =0A> On Wed, Mar 2, 2011 at 12:11, Salvatore Lionetti=0A> =0A> wrote:=0A> > Still now, some memory region is called with= =0A> base+offset.=0A> >=0A> > So:=0A> >=0A> > [0x204] <=3D value (write fro= m uP register)=0A> > cause=0A> > read(opaque, offset=3D204, value)=0A> >=0A= > > while=0A> > [0x504] <=3D value (write from uP register)=0A> > cause=0A>= > read(opaque, offset=3D4, value)=0A> >=0A> > The two opaque are different= as expected.=0A> >=0A> > Where i am wrong?=0A> =0A> If you mean 0x5004 and= not 0x504 (as stated in your=0A> previous email),=0A> IMO it is a current = limitation of the Qemu feature called=0A> "subpage"=0A> (which is used when= you are mapping a memory area smaller=0A> than the MMU=0A> page size as in= your example).=0A> =0A> When using subpages in the current code, the "offs= et"=0A> becomes the=0A> distance to the MMU page boundary instead of the di= stance=0A> to the base=0A> address of the peripheral. This is somewhat impr= actical and=0A> confusing=0A> when you are mapping the same subpage sized M= MIO device at=0A> different=0A> addresses.=0A> As the emulation I'm working= on has a lot of subpage sized=0A> peripherals, I have written a patch to w= orkaround this=0A> limitation. I=0A> will send it to the list for comment i= f you want to try=0A> it.=0A> =0A> -- =0A> Vincent=0A> =0A=0A=0A