On 20.01.2014 22:29, Lubomir Rintel wrote: > From: Paulo Flabiano Smorigo <pfsmor...@br.ibm.com> > > A 64bit address property exposed via Matrox card's FCode to openfirmware is of > no use in 32bit GRUB and attempting to access the truncated address results in > a crash. > As IBM says itself, it's not problem with IBM hardware but with the card in question. GRUB should instead detect this condition by reading PCI config space. > Link: https://bugzilla.redhat.com/show_bug.cgi?id=973205 > > [lkund...@v3.sk: Clarify the commit message] > [lkund...@v3.sk: Add Changelog] > --- > ChangeLog | 10 ++++++++++ > grub-core/kern/ieee1275/cmain.c | 5 ++++- > grub-core/video/ieee1275.c | 9 ++++++--- > include/grub/ieee1275/ieee1275.h | 2 ++ > 4 files changed, 22 insertions(+), 4 deletions(-) > > diff --git a/ChangeLog b/ChangeLog > index c1b22f5..8bbb59f 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,5 +1,15 @@ > 2014-01-20 Paulo Flabiano Smorigo <pfsmor...@br.ibm.com> > > + * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set > + GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT flag if "model" property is > + "IBM". > + * grub-core/video/ieee1275.c (GRUB_MOD_INIT(ieee1275_fb)): Skip video > + initialization if GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT is set. > + * include/grub/ieee1275/ieee1275.h: Declare > + GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT. > + > +2014-01-20 Paulo Flabiano Smorigo <pfsmor...@br.ibm.com> > + > * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_cas_reboot): Add. > * (grub_ieee1275_set_boot_last_label): Add. > * grub-core/normal/main.c [GRUB_MACHINE_IEEE1275]: Include > diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c > index d92ae14..409c922 100644 > --- a/grub-core/kern/ieee1275/cmain.c > +++ b/grub-core/kern/ieee1275/cmain.c > @@ -88,7 +88,10 @@ grub_ieee1275_find_options (void) > is_qemu = 1; > > if (rc >= 0 && grub_strncmp (tmp, "IBM", 3) == 0) > - grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS); > + { > + grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS); > + grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT); > + } > > /* Old Macs have no key repeat, newer ones have fully working one. > The ones inbetween when repeated key generates an escaoe sequence > diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c > index 0b150ec..813ab38 100644 > --- a/grub-core/video/ieee1275.c > +++ b/grub-core/video/ieee1275.c > @@ -351,9 +351,12 @@ static struct grub_video_adapter > grub_video_ieee1275_adapter = > > GRUB_MOD_INIT(ieee1275_fb) > { > - find_display (); > - if (display) > - grub_video_register (&grub_video_ieee1275_adapter); > + if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT)) > + { > + find_display (); > + if (display) > + grub_video_register (&grub_video_ieee1275_adapter); > + } > } > > GRUB_MOD_FINI(ieee1275_fb) > diff --git a/include/grub/ieee1275/ieee1275.h > b/include/grub/ieee1275/ieee1275.h > index 35618f4..d31e1db 100644 > --- a/include/grub/ieee1275/ieee1275.h > +++ b/include/grub/ieee1275/ieee1275.h > @@ -145,6 +145,8 @@ enum grub_ieee1275_flag > GRUB_IEEE1275_FLAG_BROKEN_REPEAT, > > GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN, > + > + GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT > }; > > extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag > flag); >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bug-grub mailing list Bug-grub@gnu.org https://lists.gnu.org/mailman/listinfo/bug-grub