From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7Yl7-000599-1k for qemu-devel@nongnu.org; Tue, 02 Dec 2008 12:10:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7Yl5-00058r-LC for qemu-devel@nongnu.org; Tue, 02 Dec 2008 12:10:00 -0500 Received: from [199.232.76.173] (port=56035 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7Yl5-00058o-I5 for qemu-devel@nongnu.org; Tue, 02 Dec 2008 12:09:59 -0500 Received: from mx20.gnu.org ([199.232.41.8]:14714) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L7Yl5-0004E0-9B for qemu-devel@nongnu.org; Tue, 02 Dec 2008 12:09:59 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L7Yl4-0004qG-6G for qemu-devel@nongnu.org; Tue, 02 Dec 2008 12:09:58 -0500 From: Paul Brook Subject: Re: [Qemu-devel] MMIO address changes Date: Tue, 2 Dec 2008 17:09:41 +0000 References: <200812011859.35859.paul@codesourcery.com> <200812021647.mB2Gldoe003402@smtp11.dti.ne.jp> In-Reply-To: <200812021647.mB2Gldoe003402@smtp11.dti.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812021709.41736.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: takasi-y@ops.dti.ne.jp Cc: qemu-devel@nongnu.org > diff --git a/exec.c b/exec.c > --- a/exec.c > +++ b/exec.c > @@ -2295,6 +2295,7 @@ void > cpu_register_physical_memory_offset(target_phys_addr_ t start_addr, > p->region_offset = 0; > } else { > p->phys_offset = phys_offset; > + p->region_offset = region_offset; > if ((phys_offset & ~TARGET_PAGE_MASK) <= IO_MEM_ROM || > (phys_offset & IO_MEM_ROMD)) > phys_offset += TARGET_PAGE_SIZE; I guess this makes sense, however.. > You can see the difference when you register a region overriding > other(perhaps bigger) region. > > hw/sh7750.c hits this by registering > 0xfc000000 .. 0xffffffff for CPU control registers, > then > 0xffe00000 .. 0xffe00028 > 0xffe80000 .. 0xffe80028 > 0xffd00000 .. 0xffd01000 > 0xffd80000 .. 0xffd81000 > ... You should not rely on overlapping regions doing anything sensible. Paul