Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KYt3Q-0004IM-SG for mharc-grub-devel@gnu.org; Thu, 28 Aug 2008 21:45:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KYt3O-0004HS-IR for grub-devel@gnu.org; Thu, 28 Aug 2008 21:45:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KYt3M-0004Ga-Kd for grub-devel@gnu.org; Thu, 28 Aug 2008 21:45:33 -0400 Received: from [199.232.76.173] (port=40959 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYt3M-0004GS-Ay for grub-devel@gnu.org; Thu, 28 Aug 2008 21:45:32 -0400 Received: from c60.cesmail.net ([216.154.195.49]:49992) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1KYt3L-00033l-Ss for grub-devel@gnu.org; Thu, 28 Aug 2008 21:45:32 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 28 Aug 2008 21:45:28 -0400 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id B9F414F1869 for ; Thu, 28 Aug 2008 21:45:28 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 Content-Type: text/plain Date: Thu, 28 Aug 2008 21:45:27 -0400 Message-Id: <1219974327.20608.28.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 (2.22.3.1-1.fc9) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [PATCH] Add grub_prefix for PowerPC 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: Fri, 29 Aug 2008 01:45:34 -0000 ChangeLog: * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and grub/cpu/kernel.h. Add start label for consistency with other platforms. Add grub_prefix immediately after start. Add jump to the code after grub_prefix. * include/grub/powerpc/kernel.h: Provide valid values for GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END. Index: kern/powerpc/ieee1275/crt0.S =================================================================== --- kern/powerpc/ieee1275/crt0.S (revision 1832) +++ kern/powerpc/ieee1275/crt0.S (working copy) @@ -17,13 +17,31 @@ * along with GRUB. If not, see . */ +#include +#include + .extern __bss_start .extern _end .text .align 2 - .globl _start -_start: + .globl start, _start +start: +_start: + b codestart + + . = EXT_C(start) + GRUB_KERNEL_CPU_PREFIX + +VARIABLE(grub_prefix) + /* to be filled by grub-mkelfimage */ + + /* + * Leave some breathing room for the prefix. + */ + + . = EXT_C(start) + GRUB_KERNEL_CPU_DATA_END + +codestart: li 2, 0 li 13, 0 Index: include/grub/powerpc/kernel.h =================================================================== --- include/grub/powerpc/kernel.h (revision 1832) +++ include/grub/powerpc/kernel.h (working copy) @@ -26,8 +26,7 @@ rewrite grub-mkimage to generate valid ELF files. */ #define GRUB_MOD_GAP 0x8000 -/* prefix not supported on powerpc yet. */ -#define GRUB_KERNEL_CPU_PREFIX 0 -#define GRUB_KERNEL_CPU_DATA_END 0 +#define GRUB_KERNEL_CPU_PREFIX 0x4 +#define GRUB_KERNEL_CPU_DATA_END 0x44 #endif -- Regards, Pavel Roskin