From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvBw0-0005PU-K2 for qemu-devel@nongnu.org; Wed, 29 Oct 2008 10:22:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvBvy-0005P4-EY for qemu-devel@nongnu.org; Wed, 29 Oct 2008 10:22:07 -0400 Received: from [199.232.76.173] (port=44955 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvBvy-0005P1-7f for qemu-devel@nongnu.org; Wed, 29 Oct 2008 10:22:06 -0400 Received: from rv-out-0708.google.com ([209.85.198.245]:24591) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvBvx-0007HR-SZ for qemu-devel@nongnu.org; Wed, 29 Oct 2008 10:22:06 -0400 Received: by rv-out-0708.google.com with SMTP id f25so10948rvb.22 for ; Wed, 29 Oct 2008 07:22:04 -0700 (PDT) Message-ID: Date: Wed, 29 Oct 2008 15:22:04 +0100 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [PATCH 1/3] sh4: mmio based CF support on r2d board. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080923013136.490117fd.yoshii.takashi@gmail.com> <200810261517.m9QFHUR4026096@smtp12.dti.ne.jp> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 2008/10/27 Blue Swirl : > On 10/27/08, andrzej zaborowski wrote: >> 2008/10/26 Blue Swirl : >> > It would be better to make the init function take instead of mmio >> > pointer, two target_phys_addr_t parameters and do the physical memory >> > registration there. >> >> >> Why would it be better? This implementation seems more flexible. > > How is this more flexible? Now r2d.c has to know the number of > registers in the IDE controller which should be internal to ide.c. I think the size of the mapping is not related to the number of the registers - it should be the same as the mapping on the real machine. For example CF has 26 address pins so the mapping must be 2^26 bytes for a CF card's io region, additionally the prcoessor may have registers that let software remap or unmap those.