[1835] 2008-08-29 Pavel Roskin <[email protected]>

Pavel Roskin <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 1835
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1835
Author:   proski
Date:     2008-08-29 21:46:17 +0000 (Fri, 29 Aug 2008)

Log Message:
-----------
2008-08-29  Pavel Roskin  <[email protected]>

	* 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.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/include/grub/powerpc/kernel.h
    trunk/grub2/kern/powerpc/ieee1275/crt0.S

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2008-08-29 19:55:23 UTC (rev 1834)
+++ trunk/grub2/ChangeLog	2008-08-29 21:46:17 UTC (rev 1835)
@@ -1,3 +1,12 @@
+2008-08-29  Pavel Roskin  <[email protected]>
+
+	* 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.
+
 2008-08-29  Bean  <[email protected]>
 
 	* configure.ac: Change host_os to cygwin for mingw.

Modified: trunk/grub2/include/grub/powerpc/kernel.h
===================================================================
--- trunk/grub2/include/grub/powerpc/kernel.h	2008-08-29 19:55:23 UTC (rev 1834)
+++ trunk/grub2/include/grub/powerpc/kernel.h	2008-08-29 21:46:17 UTC (rev 1835)
@@ -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

Modified: trunk/grub2/kern/powerpc/ieee1275/crt0.S
===================================================================
--- trunk/grub2/kern/powerpc/ieee1275/crt0.S	2008-08-29 19:55:23 UTC (rev 1834)
+++ trunk/grub2/kern/powerpc/ieee1275/crt0.S	2008-08-29 21:46:17 UTC (rev 1835)
@@ -17,13 +17,31 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <grub/symbol.h>
+#include <grub/cpu/kernel.h>
+
 .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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.