From: avnish <avnish@imap.linux.ibm.com>
To: grub-devel@gnu.org
Cc: lsandova@redhat.com
Subject: Re: [PATCH v3 03/16] ieee1275: Disable GRUB video support for IBM power machines
Date: Fri, 08 Nov 2024 17:00:49 +0530 [thread overview]
Message-ID: <81e7078cbfd140c512346fa3ab9f935f@imap.linux.ibm.com> (raw)
In-Reply-To: <mailman.5684.1728596634.1206.grub-devel@gnu.org>
> Message: 3
> Date: Thu, 10 Oct 2024 15:43:21 -0600
> From: Leo Sandoval <lsandova@redhat.com>
> To: grub-devel@gnu.org
> Subject: [PATCH v3 03/16] ieee1275: Disable GRUB video support for IBM
> power machines
> Message-ID: <20241010214334.1749167-4-lsandova@redhat.com>
> Content-Type: text/plain; charset="US-ASCII"; x-default=true
>
> From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
>
> GRUB gets the display card node address from OpenFirmware, however this
> address
> is truncated to 32-bits (OpenFirmware works on 32-bits, so GRUB)
> effectively
> getting an invalid address. This change disables the video support on
> IBM power
> machines. More details can be found at [1].
>
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=973205
>
> Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
> Signed-off-by: Robbie Harwood <rharwood@redhat.com>
> ---
> grub-core/kern/ieee1275/cmain.c | 5 ++++-
> grub-core/video/ieee1275.c | 9 ++++++---
> include/grub/ieee1275/ieee1275.h | 2 ++
> 3 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/grub-core/kern/ieee1275/cmain.c
> b/grub-core/kern/ieee1275/cmain.c
> index e74de3248..810a089a9 100644
> --- a/grub-core/kern/ieee1275/cmain.c
> +++ b/grub-core/kern/ieee1275/cmain.c
> @@ -89,7 +89,10 @@ grub_ieee1275_find_options (void)
> }
>
> 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 ca3d3c3b2..5592e4bb7 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 4f6e6aaa0..db0ec5f4c 100644
> --- a/include/grub/ieee1275/ieee1275.h
> +++ b/include/grub/ieee1275/ieee1275.h
> @@ -145,6 +145,8 @@ enum grub_ieee1275_flag
> GRUB_IEEE1275_FLAG_POWER_VM,
>
> GRUB_IEEE1275_FLAG_POWER_KVM,
> +
> + GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT
> };
>
> extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum
> grub_ieee1275_flag flag);
> --
> 2.46.2
>
>
>
>
> ------------------------------
Reviewed-by: Avnish Chouhan <avnish@linux.ibm.com>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2024-11-08 11:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5684.1728596634.1206.grub-devel@gnu.org>
2024-11-05 12:01 ` [PATCH v3 01/16] ieee1275/openfw: IBM client architecture(CAS) reboot support avnish
2024-11-08 11:30 ` avnish [this message]
2024-11-12 6:06 ` [PATCH v3 02/16] term/terminfo: for ppc, reset console display attr when clear screen Avnish Chouhan
2024-10-10 21:43 [PATCH v3 00/16] First Distro-agnostic series taken from Fedora Rawhide Leo Sandoval
2024-10-10 21:43 ` [PATCH v3 03/16] ieee1275: Disable GRUB video support for IBM power machines Leo Sandoval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81e7078cbfd140c512346fa3ab9f935f@imap.linux.ibm.com \
--to=avnish@imap.linux.ibm.com \
--cc=grub-devel@gnu.org \
--cc=lsandova@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.