From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSFVs-0003Fr-DM for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:56:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSFVd-00032s-De for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:56:12 -0500 Received: from [199.232.76.173] (port=43137 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSFVb-00031B-FI for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:56:03 -0500 Received: from mx20.gnu.org ([199.232.41.8]:36470) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSFVX-0005H3-HL for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:55:59 -0500 Received: from gate.crashing.org ([63.228.1.57]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRwSg-0001aP-Us for qemu-devel@nongnu.org; Mon, 04 Jan 2010 18:35:47 -0500 Subject: Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable From: Benjamin Herrenschmidt In-Reply-To: <20100104225938.GC21659@redhat.com> References: <19BFDDD5-85E0-42EC-9D71-391CECC023F5@suse.de> <20100104104516.GD4672@valinux.co.jp> <20100104110758.GE8522@redhat.com> <1262635858.2173.371.camel@pasglop> <20100104211208.GA21488@redhat.com> <1262640330.2173.386.camel@pasglop> <20100104213021.GC21488@redhat.com> <1262642032.2173.388.camel@pasglop> <20100104222535.GA21659@redhat.com> <1262645508.2173.394.camel@pasglop> <20100104225938.GC21659@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 05 Jan 2010 10:33:19 +1100 Message-ID: <1262647999.2173.416.camel@pasglop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Blue Swirl , Isaku Yamahata , Alexander Graf , Aurelien Jarno , QEMU Developers > So, it appears that this is not the case for many platforms: bridge > itself does a byteswap to make devices behind it work according to spec, > but this does not apply to programming bridge itself. > > This seems common on BE platforms, this is why qemu has > ifdef TARGET_WORDS_BIGENDIAN there IIUC. Sadly, it is quite often that misleaded HW designers thing they are doing SW a service by making something BE instead of LE on a BE platform, but in the end just forcing everybody to special case :-) It's hard to say what is the most common. All powerpc chrp have it LE afaik, FSL tried to be smart (FAIL) and got their SoC config space access reg BE instead. Apple stuff is just "special", etc... In any case, it doesn't matter much as long as qemu gets normal MMIO emulation right. Host bridge config space is chipset specific and as such platform specific. Cheers, Ben.