Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Gegsv-0005gN-I8 for mharc-grub-devel@gnu.org; Mon, 30 Oct 2006 18:49:41 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gegsu-0005fU-2s for grub-devel@gnu.org; Mon, 30 Oct 2006 18:49:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gegso-0005f0-AL for grub-devel@gnu.org; Mon, 30 Oct 2006 18:49:38 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gegso-0005eq-3I for grub-devel@gnu.org; Mon, 30 Oct 2006 18:49:34 -0500 Received: from [207.69.195.62] (helo=pop-altamira.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gegso-0003Tp-2i for grub-devel@gnu.org; Mon, 30 Oct 2006 18:49:34 -0500 Received: from user-0vvdf2d.cable.mindspring.com ([63.246.188.77] helo=[192.168.0.2]) by pop-altamira.atl.sa.earthlink.net with esmtp (Exim 3.36 #1) id 1Gegsl-0002SB-00 for grub-devel@gnu.org; Mon, 30 Oct 2006 18:49:31 -0500 From: Hollis Blanchard To: The development of GRUB 2 In-Reply-To: <200610302019.13075.okuji@enbug.org> References: <1161976767.15223.4.camel@basalt.austin.ibm.com> <200610281616.09907.okuji@enbug.org> <1162060526.7640.11.camel@diesel> <200610302019.13075.okuji@enbug.org> Content-Type: text/plain Date: Mon, 30 Oct 2006 17:49:30 -0600 Message-Id: <1162252170.28437.1.camel@diesel> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 (2.6.3-1.fc5.5) Content-Transfer-Encoding: 7bit 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 23:49:40 -0000 On Mon, 2006-10-30 at 21:19 +0200, Yoshinori K. Okuji wrote: > 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. What exactly would you suggest? Using a hook to modify the struct phdr (or veto it) seems quite elegant to me. -Hollis