Skip to contentSkip to conversation

portable exit() in IEEE-1275

PATCH In review Robert Millan 2 participants 3 messages Jan 13, 2008 – Jan 14, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 portable exit() in IEEE-1275

This patch reimplements grub_exit() portably as a wrapper. The exit client service is defined in IEEE-1275.

Anyway, just to be sure: Please, can someone test my patch to check it won't break on Apple, IBM... ?

Signature · 5 lines
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 /.)

* kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper for grub_ieee1275_exit(), in order to improve portability.

kern/powerpc/ieee1275/init.c renamed from ../grub2/kern/powerpc/ieee1275/init.c +1 -4
@@ -55,10 +55,7 @@ grub_millisleep (grub_uint32_t ms)
 void
 grub_exit (void)
 {
-  /* Trap to Open Firmware.  */
-  asm ("trap");
-
-  for (;;);
+  grub_ieee1275_exit ();
 }
 
 /* Translate an OF filesystem path (separated by backslashes), into a GRUB
#1 lore raw
Quoted 5 lines · Robert Millan

This patch reimplements grub_exit() portably as a wrapper. The exit client service is defined in IEEE-1275.

Anyway, just to be sure: Please, can someone test my patch to check it won't break on Apple, IBM... ?

Works fine on PowerMac G3. Looks much better. Instead of the scary trap message with addresses and registers, grub exits with "EXIT called ok".

Signature · 2 lines
Regards,
Pavel Roskin
#2 lore raw
Quoted 11 lines · Pavel Roskin
Quoted 5 lines · Robert Millan

This patch reimplements grub_exit() portably as a wrapper. The exit client service is defined in IEEE-1275.

Anyway, just to be sure: Please, can someone test my patch to check it won't break on Apple, IBM... ?

Works fine on PowerMac G3. Looks much better. Instead of the scary trap message with addresses and registers, grub exits with "EXIT called ok".

Thanks. I just checked that in.

Signature · 5 lines
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 /.)