public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Shea Levy <shea@shealevy.com>
Cc: linux-kernel@vger.kernel.org, matt.fleming@intel.com
Subject: Re: Proposal: EFI boot stub configuration file
Date: Fri, 16 Mar 2012 14:28:51 -0700	[thread overview]
Message-ID: <4F63B093.9020104@zytor.com> (raw)
In-Reply-To: <4F63AFD5.3010607@shealevy.com>

On 03/16/2012 02:25 PM, Shea Levy wrote:
> Hello,
> 
> In some EFI boot environments (e.g. booting from an external medium or
> non-standard systems where tools like efibootmgr don't work), it is
> currently impossible to pass the right arguments to the kernel unless an
> EFI shell is launched. To ameliorate this, I propose that if
> image->load_options_size is 0 (indicating no arguments were passed) AND
> image->parent_handle is NULL (indicating that the image was loaded
> automatically by the firmware), then the kernel looks for a file in some
> fixed, possibly configurable place (e.g. \efi\linux\params), sets
> image->load_options_size to its size, and sets image->load_options to
> its contents. On any error whatsoever (finding the file, reading it,
> getting its size, whatever), any allocated memory would be freed and
> load_options_size would be set back to 0. Since the arguments are
> already converted to ASCII and parsed during the boot process, the file
> would be expected to be in UCS-2 format and no validation would be done
> in the configuration loading code. I'll write something up over the next
> week or so and submit it as an RFC patch series, but I thought I'd post
> this here first in case anyone has immediate feedback based on this
> description.
> 

A file in UCS-2 seems messed up.

Otherwise, seems like a reasonable idea, with a major caveat... since
the whole point of this is to do something when it isn't possible to set
NVRAM variables, it would make most sense to me if the configuration
file could be founin a specific location relative to the kernel image
itself.

	-hpa


  reply	other threads:[~2012-03-16 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 21:25 Proposal: EFI boot stub configuration file Shea Levy
2012-03-16 21:28 ` H. Peter Anvin [this message]
2012-03-16 21:36   ` Shea Levy
2012-03-16 21:32 ` Shea Levy

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=4F63B093.9020104@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=shea@shealevy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox