From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MIigd-0008Bv-Vn for mharc-grub-devel@gnu.org; Mon, 22 Jun 2009 08:31:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIigb-0008AF-Ah for grub-devel@gnu.org; Mon, 22 Jun 2009 08:31:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIigW-000889-7P for grub-devel@gnu.org; Mon, 22 Jun 2009 08:31:44 -0400 Received: from [199.232.76.173] (port=45355 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIigW-00087Z-3j for grub-devel@gnu.org; Mon, 22 Jun 2009 08:31:40 -0400 Received: from aybabtu.com ([69.60.117.155]:51140) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIigV-0000yH-5R for grub-devel@gnu.org; Mon, 22 Jun 2009 08:31:39 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MIhdV-0003cb-LM for grub-devel@gnu.org; Mon, 22 Jun 2009 13:24:30 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MIigR-0007dI-O1 for grub-devel@gnu.org; Mon, 22 Jun 2009 14:31:35 +0200 Date: Mon, 22 Jun 2009 14:31:35 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090622123135.GA29332@thorin> References: <20090621181748.GA21152@thorin> <20090621185009.GB21495@thorin> <1245611299.4250.13.camel@mj> <20090621193333.GD21827@thorin> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <20090621193333.GD21827@thorin> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) Subject: [PATCH] define GRUB_MOD_ALIGN to 0 on non-ieee1275 (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 12:31:45 -0000 --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Well it seems that OLPC (i386-ieee1275) needs alignment, but coreboot doesn't. It must be some OFW-specific oddity. This patch makes the alignment ieee1275-specific on i386. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." --TB36FDmn/VVEgNH/ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ieee1275_align.diff" Index: kern/i386/coreboot/init.c =================================================================== --- kern/i386/coreboot/init.c (revision 2358) +++ kern/i386/coreboot/init.c (working copy) @@ -144,5 +144,5 @@ grub_machine_fini (void) grub_addr_t grub_arch_modules_addr (void) { - return ALIGN_UP((grub_addr_t) _end, GRUB_MOD_ALIGN); + return (grub_addr_t) _end; } Index: include/grub/i386/kernel.h =================================================================== --- include/grub/i386/kernel.h (revision 2358) +++ include/grub/i386/kernel.h (working copy) @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2005,2006,2007,2008 Free Software Foundation, Inc. + * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,13 @@ #ifndef GRUB_KERNEL_CPU_HEADER #define GRUB_KERNEL_CPU_HEADER 1 -#define GRUB_MOD_ALIGN 0x1000 +#include + +#ifdef GRUB_MACHINE_IEEE1275 +#define GRUB_MOD_ALIGN 0x1000 +#else +#define GRUB_MOD_ALIGN 0 +#endif /* Non-zero value is only needed for PowerMacs. */ #define GRUB_MOD_GAP 0x0 --TB36FDmn/VVEgNH/--