From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LLK9j-0001H2-8s for qemu-devel@nongnu.org; Fri, 09 Jan 2009 11:24:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LLK9f-0001Bh-Sf for qemu-devel@nongnu.org; Fri, 09 Jan 2009 11:24:16 -0500 Received: from [199.232.76.173] (port=44061 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LLK9f-0001Be-Mc for qemu-devel@nongnu.org; Fri, 09 Jan 2009 11:24:15 -0500 Received: from hall.aurel32.net ([88.191.82.174]:58314) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LLK9f-0006Ll-Aw for qemu-devel@nongnu.org; Fri, 09 Jan 2009 11:24:15 -0500 Received: from anguille.univ-lyon1.fr ([134.214.4.207]) by hall.aurel32.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LLK9d-0000sQ-VH for qemu-devel@nongnu.org; Fri, 09 Jan 2009 17:24:14 +0100 Message-ID: <49677A28.5030602@aurel32.net> Date: Fri, 09 Jan 2009 17:24:08 +0100 From: Aurelien Jarno MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH][RFC] elf loader: use the virtual address References: <20090109154756.GA27086@volta.aurel32.net> <761ea48b0901090757j7277ecbfo74dd1b6415fbeaa8@mail.gmail.com> In-Reply-To: <761ea48b0901090757j7277ecbfo74dd1b6415fbeaa8@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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 Laurent Desnogues a écrit : > On Fri, Jan 9, 2009 at 4:47 PM, Aurelien Jarno wrote: >> Most Linux kernels have their physical address corresponding to they >> virtual address in the ELF header. This is however not true anymore for >> the PowerPC kernels (>= 2.6.25). >> >> For PowerPC, the kernel needs to be started with address translation >> enabled (that's even true for the firmware), and thus the kernel loaded >> at the virtual address. >> >> As all the other kernels/bios I have looked have the same virtual and >> physical address, I don't think it will break other targets. This is >> what is done in the patch below. Alternatively, we can add a new >> argument to the load_elf functions, to select between virtual and >> physical load address. >> >> Any opinon? > > I wonder if some platforms don't use the address_offset parameter > to simulate that behaviour. PowerPC already does that. The offset is relative to the load address, so it should still be read correctly. > Anyway wouldn't a parameter be cleaner and allow more flexibility? > Maybe that's what I am going to implement. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net