All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avnish Chouhan <avnish@linux.ibm.com>
To: mchang@suse.com
Cc: grub-devel@gnu.org, Daniel Kiper <daniel.kiper@oracle.com>
Subject: Re: [PATCH] ieee1275: Use net config for boot location instead of firmware bootpath
Date: Wed, 15 Oct 2025 16:26:46 +0530	[thread overview]
Message-ID: <bb4493c55ba379e52c53ba7fefacc450@linux.ibm.com> (raw)
In-Reply-To: <mailman.10458.1760350090.1111.grub-devel@gnu.org>

On 2025-10-13 15:38, grub-devel-request@gnu.org wrote:
> Message: 1
> Date: Mon, 13 Oct 2025 14:52:24 +0800
> From: Michael Chang <mchang@suse.com>
> To: The development of GNU GRUB <grub-devel@gnu.org>
> Subject: [PATCH] ieee1275: Use net config for boot location instead of
> 	firmware bootpath
> Message-ID: <20251013065224.41388-1-mchang@suse.com>
> 
> On network boots, grub_ieee1275_net_config() is used to determine the
> boot device, but the path continues to be taken from the Open Firmware
> /chosen/bootpath property. This assumes the device node follows the
> generic IEEE-1275 syntax, which is not always the case. Different
> drivers may extend or redefine the format, and GRUB may then
> misinterpret the argument as a filename and set $prefix incorrectly.
> 
> The generic Open Firmware device path format is:
> 
>   device-name[:device-argument]
>   device-argument := [partition][,[filename]]
> 
> For example, a bootpath such as:
> 
> 
> /vdevice/l-lan@30000002:speed=auto,duplex=auto,1.2.243.345,,9.8.76.543,1.2.34.5,5,5,255.255.255.0,512
> 
> does not follow this form. The section after the colon (the
> device-argument) contains driver-specific options and network
> parameters, not a valid filename. GRUB interprets this string as a
> filename, which results in $prefix being set to "/", effectively losing
> the intended boot directory.
> 
> The firmware is not at fault here, since interpretation of device nodes
> is driver-specific. Instead, GRUB should use the filename provided in
> the cached DHCP packet, which is consistent and reliable. This is also
> the same mechanism already used on UEFI and legacy BIOS platforms.
> 
> This patch updates grub_machine_get_bootlocation() to prefer the result
> from grub_ieee1275_net_config() when complete, and only fall back to 
> the
> firmware bootpath otherwise.
> 
> Signed-off-by: Michael Chang <mchang@suse.com>

Reviewed-by: Avnish Chouhan <avnish@linux.ibm.com>

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

       reply	other threads:[~2025-10-15 10:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.10458.1760350090.1111.grub-devel@gnu.org>
2025-10-15 10:56 ` Avnish Chouhan [this message]
2025-10-13  6:52 [PATCH] ieee1275: Use net config for boot location instead of firmware bootpath Michael Chang via Grub-devel
2025-10-15 14:08 ` Daniel Kiper

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=bb4493c55ba379e52c53ba7fefacc450@linux.ibm.com \
    --to=avnish@linux.ibm.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    --cc=mchang@suse.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.