From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MIpXw-0002qq-2c for mharc-grub-devel@gnu.org; Mon, 22 Jun 2009 15:51:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIpXt-0002oJ-Sj for grub-devel@gnu.org; Mon, 22 Jun 2009 15:51:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIpXp-0002kW-9O for grub-devel@gnu.org; Mon, 22 Jun 2009 15:51:13 -0400 Received: from [199.232.76.173] (port=43103 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIpXp-0002kN-4Q for grub-devel@gnu.org; Mon, 22 Jun 2009 15:51:09 -0400 Received: from c60.cesmail.net ([216.154.195.49]:8016) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MIpXo-00067a-Md for grub-devel@gnu.org; Mon, 22 Jun 2009 15:51:08 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 22 Jun 2009 15:51:07 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id E081D34C6A for ; Mon, 22 Jun 2009 15:57:16 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20090621193333.GD21827@thorin> References: <20090621181748.GA21152@thorin> <20090621185009.GB21495@thorin> <1245611299.4250.13.camel@mj> <20090621193333.GD21827@thorin> Content-Type: text/plain Date: Mon, 22 Jun 2009 15:51:05 -0400 Message-Id: <1245700265.2754.4.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 (2.26.2-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: does module area require alignment? (Re: [PATCH] i386-qemu port) 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, 22 Jun 2009 19:51:14 -0000 On Sun, 2009-06-21 at 21:33 +0200, Robert Millan wrote: > On Sun, Jun 21, 2009 at 03:08:19PM -0400, Pavel Roskin wrote: > > On Sun, 2009-06-21 at 20:50 +0200, Robert Millan wrote: > > > > > Does anyone know why do we align ELF targets? When I did the coreboot port, > > > the ELF part was based on existing Ieee1275 code, so I guess I just mimicked > > > it. Is there some issue with non-i386 CPUs or with some Ieee1275 > > > implementations that makes this alignment a requirement? > > > > It was a hack for PowerPC openfirmware. I don't know why it was needed. > > I didn't have time and desire to debug openfirmware to find out what it > > wants. > > Is the hack you're referring to GRUB_MOD_GAP, GRUB_MOD_ALIGN or both? I'm referring to GRUB_MOD_GAP. > Btw, I suspect GRUB_MOD_GAP might be related to the modules overlapping with > the BSS because of a firmware loader bug. Is there a correlation between > the needed GRUB_MOD_GAP and the BSS size? I don't see any correlation. I made 3 images with the gap of 0x4000, 0x8000 and 0xc000. Then I added an uninitialized array to the kernel, 0x4000 bytes long, and made another 3 images with the same gap sizes. The images with the 0x4000 gap don't boot and the images with the gap sized 0x8000 and 0xc000 boot regardless of the array. That's PowerMac G3 "Blue and White". -- Regards, Pavel Roskin