Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GecfL-0000Y8-Uo for mharc-grub-devel@gnu.org; Mon, 30 Oct 2006 14:19:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GecfJ-0000X1-H0 for grub-devel@gnu.org; Mon, 30 Oct 2006 14:19:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GecfF-0000UD-US for grub-devel@gnu.org; Mon, 30 Oct 2006 14:19:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GecfF-0000U3-9r for grub-devel@gnu.org; Mon, 30 Oct 2006 14:19:17 -0500 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GecfE-0001mU-TG for grub-devel@gnu.org; Mon, 30 Oct 2006 14:19:17 -0500 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 0A0643CC7F4E4 for ; Mon, 30 Oct 2006 22:57:48 +0100 (CET) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id DB0343CC7F4DF for ; Mon, 30 Oct 2006 22:57:47 +0100 (CET) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Mon, 30 Oct 2006 21:19:12 +0200 User-Agent: KMail/1.8.2 References: <1161976767.15223.4.camel@basalt.austin.ibm.com> <200610281616.09907.okuji@enbug.org> <1162060526.7640.11.camel@diesel> In-Reply-To: <1162060526.7640.11.camel@diesel> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610302019.13075.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.107176, version=0.17.2 Subject: Re: [PATCH] generic ELF loading (updated) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2006 19:19:21 -0000 On Saturday 28 October 2006 20:35, Hollis Blanchard wrote: > On Sat, 2006-10-28 at 16:16 +0200, Yoshinori K. Okuji wrote: > > On Friday 27 October 2006 21:19, Hollis Blanchard wrote: > > > Comments please. Also see next mail to see how the PPC Linux loader > > > uses it. > > > > So this still loads an image to paddr directly, right? > > > > I think we need these features: > > > > - an ability to pass an address to load an image > > > > - an ability to pass the size of a loading area > > > > - an ability to get the size of a loaded image > > The PowerPC loader patch I sent already does 1 and 3, and you can easily > see how 2 can be done in the exact same way. Please look at that code, > in particular 'calcsize' and 'offset_paddr'. As for calcsize, I do not think it is a good idea to put this to architecture-specific code. We always need this feature, so it should be a part of the API. As for offset_paddr, I do not like modifying a member of a header. This changes a read value, so the state of a header changes after calling grub_elf*_load. This kind of side effect often makes debugging harder. I prefer to specify an address more explicitly. Okuji