* PowerMac hack breaks Efika
@ 2007-07-02 8:17 Robert Millan
2007-07-02 12:48 ` Stefan Reinauer
0 siblings, 1 reply; 5+ messages in thread
From: Robert Millan @ 2007-07-02 8:17 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: grub-devel
Hi,
The following lines in grub_ofconsole_init():
/* The latest PowerMacs don't actually initialize the screen for us, so we
* use this trick to re-open the output device. */
grub_ieee1275_interpret ("output-device output", 0);
break Efika (SmartFirmware) and possibly other implementations. After this
command is run, all console output is supressed.
I'm not sure why (found that via regression test), but on Efika the
output-device is screen (/pci@80000000/display@10).
I suppose the right fix would be to check for PowerMacs before running this,
but I'm not sure how. Any ideas?
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended
for spam harvesters. Writing to it will get you added to my black list.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PowerMac hack breaks Efika
2007-07-02 8:17 PowerMac hack breaks Efika Robert Millan
@ 2007-07-02 12:48 ` Stefan Reinauer
2007-07-02 17:22 ` Robert Millan
2007-07-04 16:10 ` Hollis Blanchard
0 siblings, 2 replies; 5+ messages in thread
From: Stefan Reinauer @ 2007-07-02 12:48 UTC (permalink / raw)
To: The development of GRUB 2
* Robert Millan <rmh@aybabtu.com> [070702 10:17]:
> The following lines in grub_ofconsole_init():
>
> /* The latest PowerMacs don't actually initialize the screen for us, so we
> * use this trick to re-open the output device. */
> grub_ieee1275_interpret ("output-device output", 0);
>
> break Efika (SmartFirmware) and possibly other implementations. After this
> command is run, all console output is supressed.
> I'm not sure why (found that via regression test), but on Efika the
> output-device is screen (/pci@80000000/display@10).
Can you examine the output property of the /chosen node and see what its
original vallue is?
> I suppose the right fix would be to check for PowerMacs before running this,
> but I'm not sure how. Any ideas?
There's some property in the / or /cpu or /openprom noe that can be
used. Don't have a ppc machine from Apple here right now.
Why does Apple Powerbook need this? What's their default output device?
Stefan
--
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info@coresystems.de • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PowerMac hack breaks Efika
2007-07-02 12:48 ` Stefan Reinauer
@ 2007-07-02 17:22 ` Robert Millan
2007-07-04 16:10 ` Hollis Blanchard
1 sibling, 0 replies; 5+ messages in thread
From: Robert Millan @ 2007-07-02 17:22 UTC (permalink / raw)
To: The development of GRUB 2; +Cc: jordi
On Mon, Jul 02, 2007 at 02:48:49PM +0200, Stefan Reinauer wrote:
> * Robert Millan <rmh@aybabtu.com> [070702 10:17]:
> > The following lines in grub_ofconsole_init():
> >
> > /* The latest PowerMacs don't actually initialize the screen for us, so we
> > * use this trick to re-open the output device. */
> > grub_ieee1275_interpret ("output-device output", 0);
> >
> > break Efika (SmartFirmware) and possibly other implementations. After this
> > command is run, all console output is supressed.
>
> > I'm not sure why (found that via regression test), but on Efika the
> > output-device is screen (/pci@80000000/display@10).
>
> Can you examine the output property of the /chosen node and see what its
> original vallue is?
I'm not sure if this is what you want: (I'm pretty new to OF)
ok cd /chosen
ok .properties
name "chosen"
stdin 0x7C5F0E8 (130412776)
stdout 0x7C5F038 (130412600)
bootpath ""
bootargs ""
memory 0x7C54E28 (130371112)
mmu 0x7C55818 (130373656)
> > I suppose the right fix would be to check for PowerMacs before running this,
> > but I'm not sure how. Any ideas?
>
> There's some property in the / or /cpu or /openprom noe that can be
> used. Don't have a ppc machine from Apple here right now.
I don't either, but Jordi Mallach does. I'm CCing him.
> Why does Apple Powerbook need this?
No idea (other than the C comment above). Maybe Hollis can explain.
> What's their default output device?
According to Jordi, output-device is set to "screen".
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended
for spam harvesters. Writing to it will get you added to my black list.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PowerMac hack breaks Efika
2007-07-02 12:48 ` Stefan Reinauer
2007-07-02 17:22 ` Robert Millan
@ 2007-07-04 16:10 ` Hollis Blanchard
2007-07-09 14:50 ` Robert Millan
1 sibling, 1 reply; 5+ messages in thread
From: Hollis Blanchard @ 2007-07-04 16:10 UTC (permalink / raw)
To: Robert Millan, Stefan Reinauer; +Cc: The development of GRUB 2
On Mon, 2007-07-02 at 14:48 +0200, Stefan Reinauer wrote:
> * Robert Millan <rmh@aybabtu.com> [070702 10:17]:
> > The following lines in grub_ofconsole_init():
> >
> > /* The latest PowerMacs don't actually initialize the screen for us, so we
> > * use this trick to re-open the output device. */
> > grub_ieee1275_interpret ("output-device output", 0);
> >
> > break Efika (SmartFirmware) and possibly other implementations. After this
> > command is run, all console output is supressed.
>
> > I'm not sure why (found that via regression test), but on Efika the
> > output-device is screen (/pci@80000000/display@10).
>
> Can you examine the output property of the /chosen node and see what its
> original vallue is?
>
> > I suppose the right fix would be to check for PowerMacs before running this,
> > but I'm not sure how. Any ideas?
>
> There's some property in the / or /cpu or /openprom noe that can be
> used. Don't have a ppc machine from Apple here right now.
>
> Why does Apple Powerbook need this? What's their default output device?
(Note: this is about PowerMacs too, not just PowerBooks.)
The default output device is a graphics card. However, console output
doesn't actually display to the default output device (presumably to
preserve Apple's logo splash screen). Yes, this violates section 7.4.5
of IEEE1275.
To get console output, we need to open the output device. However, we
can't hardcode a particular device (e.g. the "screen" device alias),
since that could break users with serial console.
'output-device' returns a string specifying the default output device.
'output' changes console output to the specified device. In other words,
this command opens the output device that should already be open.
I believe I tested this code on briQ, which shares a code lineage with
Efika, but Efika certainly could have broken something.
It's entirely possible that a particular firmware does not correctly
implement these commands. We already have a framework for such cases,
and we already work around SmartFirmware bugs with it.
1. define a GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag in
include/grub/ieee1275/ieee1275.h
2. call grub_ieee1275_set_flag() in grub_ieee1275_find_options()
3. use grub_ieee1275_test_flag() in grub_ofconsole_init()
-Hollis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PowerMac hack breaks Efika
2007-07-04 16:10 ` Hollis Blanchard
@ 2007-07-09 14:50 ` Robert Millan
0 siblings, 0 replies; 5+ messages in thread
From: Robert Millan @ 2007-07-09 14:50 UTC (permalink / raw)
To: The development of GRUB 2; +Cc: Stefan Reinauer
On Wed, Jul 04, 2007 at 11:10:15AM -0500, Hollis Blanchard wrote:
>
> It's entirely possible that a particular firmware does not correctly
> implement these commands. We already have a framework for such cases,
> and we already work around SmartFirmware bugs with it.
> 1. define a GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag in
> include/grub/ieee1275/ieee1275.h
> 2. call grub_ieee1275_set_flag() in grub_ieee1275_find_options()
> 3. use grub_ieee1275_test_flag() in grub_ofconsole_init()
Thank you; this worked. I'll check it in CVS later when the other issues
are sorted out.
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended
for spam harvesters. Writing to it will get you added to my black list.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-09 14:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-02 8:17 PowerMac hack breaks Efika Robert Millan
2007-07-02 12:48 ` Stefan Reinauer
2007-07-02 17:22 ` Robert Millan
2007-07-04 16:10 ` Hollis Blanchard
2007-07-09 14:50 ` 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.