Here's an incomplete (missing powerpc & sparc) version of the patch that
would sanitize this function call.

In the meantime i386 just puts the value in %ecx (third argument) to match
what powerpc is doing.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
diff -urp grub2/kern/i386/ieee1275/startup.S ieee1275_statup/kern/i386/ieee1275/startup.S
--- grub2/kern/i386/ieee1275/startup.S	2008-01-15 21:05:44.000000000 +0100
+++ ieee1275_statup/kern/i386/ieee1275/startup.S	2008-01-15 21:06:18.000000000 +0100
@@ -34,5 +34,5 @@
 
 start:
 _start:
-	movl %eax, %ecx
+	movl %eax, EXT_C(grub_ieee1275_entry_fn)
 	jmp EXT_C(cmain)
diff -urp grub2/kern/powerpc/ieee1275/cmain.c ieee1275_statup/kern/powerpc/ieee1275/cmain.c
--- grub2/kern/powerpc/ieee1275/cmain.c	2008-01-15 17:13:55.000000000 +0100
+++ ieee1275_statup/kern/powerpc/ieee1275/cmain.c	2008-01-15 21:06:38.000000000 +0100
@@ -102,12 +102,9 @@ grub_ieee1275_find_options (void)
     }
 }
 
-void cmain (uint32_t r3, uint32_t r4, uint32_t r5);
 void
-cmain (UNUSED uint32_t r3, UNUSED uint32_t r4, uint32_t r5)
+cmain (void)
 {
-  grub_ieee1275_entry_fn = (int (*)(void *)) r5;
-
   grub_ieee1275_finddevice ("/chosen", &grub_ieee1275_chosen);
 
   grub_ieee1275_find_options ();
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to