All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] portable exit() in IEEE-1275
@ 2008-01-13 19:45 Robert Millan
  2008-01-14 14:17 ` Pavel Roskin
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2008-01-13 19:45 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]


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

-- 
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 /.)

[-- Attachment #2: ieee1275_exit.diff --]
[-- Type: text/x-diff, Size: 537 bytes --]


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

--- ../../grub2/kern/powerpc/ieee1275/init.c	2008-01-03 23:43:46.000000000 +0100
+++ ./kern/powerpc/ieee1275/init.c	2008-01-13 20:20:50.000000000 +0100
@@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] portable exit() in IEEE-1275
  2008-01-13 19:45 [PATCH] portable exit() in IEEE-1275 Robert Millan
@ 2008-01-14 14:17 ` Pavel Roskin
  2008-01-14 14:30   ` Robert Millan
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Roskin @ 2008-01-14 14:17 UTC (permalink / raw)
  To: The development of GRUB 2


On Sun, 2008-01-13 at 20:45 +0100, Robert Millan wrote:
> 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".

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] portable exit() in IEEE-1275
  2008-01-14 14:17 ` Pavel Roskin
@ 2008-01-14 14:30   ` Robert Millan
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Millan @ 2008-01-14 14:30 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Jan 14, 2008 at 09:17:37AM -0500, Pavel Roskin wrote:
> 
> On Sun, 2008-01-13 at 20:45 +0100, Robert Millan wrote:
> > 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.

-- 
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 /.)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-14 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-13 19:45 [PATCH] portable exit() in IEEE-1275 Robert Millan
2008-01-14 14:17 ` Pavel Roskin
2008-01-14 14:30   ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.