Received: from [140.186.70.92] (port=47075 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PupaI-0002J1-Ah for qemu-devel@nongnu.org; Wed, 02 Mar 2011 12:11:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PupaC-0005w9-NF for qemu-devel@nongnu.org; Wed, 02 Mar 2011 12:11:29 -0500 Received: from nm18.bullet.mail.ukl.yahoo.com ([217.146.183.192]:39735) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PupaC-0005vm-8M for qemu-devel@nongnu.org; Wed, 02 Mar 2011 12:11:28 -0500 Message-ID: <262644.60257.qm@web27203.mail.ukl.yahoo.com> Date: Wed, 2 Mar 2011 17:11:26 +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: Blue Swirl Cc: qemu-devel@nongnu.org Hi,=0A=0Amany thanks for your response.=0A=0ANow i'm i've avoided the unreg= istering stuff, map done already at desired address space.=0A=0AStill now, = some memory region is called with base+offset.=0A=0ASo:=0A=0A[0x204] <=3D v= alue (write from uP register)=0Acause=0Aread(opaque, offset=3D204, value)= =0A=0Awhile=0A[0x504] <=3D value (write from uP register)=0Acause=0Aread(op= aque, offset=3D4, value)=0A=0AThe two opaque are different as expected.=0A= =0AWhere i am wrong?=0A=0A--- Ven 25/2/11, Blue Swirl ha scritto:=0A=0A> Da: Blue Swirl =0A> Oggetto: Re:= [Qemu-devel] Memory Map=0A> A: "Salvatore Lionetti" =0A> Cc: qemu-devel@nongnu.org=0A> Data: Venerd=EC 25 febbraio 2011, = 17:10=0A> On Thu, Feb 24, 2011 at 11:08 AM,=0A> Salvatore Lionetti=0A> =0A> wrote:=0A> > Hi,=0A> >=0A> > This is what my b= oard do=0A> >=0A> > cpu_register_physical_memory(0, 128*1024*1024, ...)=0A>= > cpu_register_physical_memory(0xFF800000, 8*1024*1024,=0A> ...)=0A> >=0A>= > and this layout does not change over the entire live=0A> (virtual) of th= e board.=0A> >=0A> > For the following offset (1st column) and size in=0A> = bytes (2nd column)=0A> > {0x000000, 512},=0A> > {0x000200, 16},=0A> > {0x00= 0300, 32},=0A> > {0x000400, 32},=0A> > {0x000500, 64},=0A> > {0x000600, 64}= ,=0A> > {0x000700, 128},=0A> > {0x000800, 30},=0A> > {0x000900, 256},=0A> >= {0x000A00, 44},=0A> > {0x000B00, 256},=0A> > {0x000C00, 24},=0A> > {0x000F= 00, 20},=0A> > {0x001000, 20},=0A> > {0x001100, 20},=0A> > {0x001400, 168},= =0A> > {0x001800, 24},=0A> > {0x002000, 4096},=0A> > {0x003000, 24},=0A> > = {0x003100, 24},=0A> > {0x004500, 36},=0A> > {0x005000, 224},=0A> > {0x00800= 0, 768},=0A> > {0x008300, 16},=0A> >=0A> > i do, for each item,=0A> >=0A> >= a =3D cpu_register_io_memory(r, w, o,=0A> DEVICE_NATIVE_ENDIAN)=0A> > cpu_= register_physical_memory(_base+offset, len, a)=0A> >=0A> > And _base could = be reprogrammed at any time. So before=0A> to change _base i:=0A> >=0A> > c= pu_unregister_io_memory(a)=0A> >=0A> > What i see is that accessing to _bas= e+=0A> > _base+0x005000 =3D> Wake up r/w with offset 0=0A> > _base+0x000204= =3D> Wake up r/w with offset 0x204=0A> >=0A> > So the question=0A> > - Am = i wrong something?=0A> =0A> cpu_unregister_io_memory() is the counterpart o= f=0A> cpu_register_io_memory(), it does not affect mappings=0A> created by= =0A> cpu_register_physical_memory(). They should be removed=0A> first.=0A> = =0A> > - Is possible to map address with last=0A> TARGET_PAGE_BITS (es 0x20= 0) bits set?=0A> =0A> Yes.=0A> =0A=0A=0A