public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gabriel L. Somlo" <gsomlo@gmail.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: "Marvin Häuser" <Marvin.Haeuser@outlook.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"eric.dong@intel.com" <eric.dong@intel.com>,
	"star.zeng@intel.com" <star.zeng@intel.com>,
	"jordan.l.justen@intel.com" <jordan.l.justen@intel.com>,
	"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
	"ruiyu.ni@intel.com" <ruiyu.ni@intel.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: Proposition of a BmEnumerateBootOptions() hook.
Date: Tue, 15 May 2018 10:49:43 -0400	[thread overview]
Message-ID: <20180515144941.GI2284@hedwig.ini.cmu.edu> (raw)
In-Reply-To: <9d7aa3e0-d342-ab5a-f54b-2a853a5fcf57@redhat.com>

On Tue, May 15, 2018 at 03:52:34PM +0200, Laszlo Ersek wrote:
>
> [...]
>
> > APPLE BLESS
> >
> > This might be interesting for the OVMF maintainers.
> > I did not want to mention this concept at first, because I don't think
> > there is a terrible huge demand or interest, however I would like to
> > be able to implement Apple bless support for OVMF without having to
> > fork and modify edk2 drivers.
> > I did not check about a concrete way of implementation, however I will
> > shortly describe what needs to be involved.
> >
> > Secondary partitions: Supporting this will be easy when accepting the
> > hook proposed above and considering my comments regarding NV vs
> > volatile variables. No boot options are proactively added for those
> > installs and they are scanned on demand, which can be done entirely in
> > the proposed hook function.
> 
> I think it could also be done in AfterConsole(). I realize it might
> incur more pflash traffic -- like any other Boot#### option generation
> -- than what you might consider optimal, but functionally that shouldn't
> be a barrier.
> 
> > Primary partition: The so-called "Startup Volume" unfortunately is a
> > bit trickier. For it, a practically invalid Boot Option is added,
> > which is an expanded device path to the volume to be booted, however
> > without having a File Device Path Node appended.
> 
> This doesn't immediately seem invalid -- if memory serves, you can have
> \EFI\BOOT\BOOT<arch>.efi on fixed media as well, and if a boot option
> only names the HD() in question, that default boot path will be launched
> off of it.
> 
> > I had hoped to be able to use EFI_LOAD_FILE_PROTOCOL, however
> > obviously EFI_SIMPLE_FILE_SYSTEM_PROTOCOL will attach to the mentioned
> > DevicePath, which means LoadFile will not be called. Support for this
> > would need to be done via a platform-specific error handler for when
> > the DevicePath is determined to be invalid, which can then either fix
> > it up and return success or fail as well. I have not looked into this
> > in detail and I can understand if you are not interested in supporting
> > such a scenario. However if you do, I will look into it as soon as
> > possible and probably perform a few tests in OVMF.
> 
> I have a more general comment in the end: I doubt I could legally test
> an OSX guest on non-Apple hardware, so I won't try (and I'll most likely
> not buy or otherwise procure OSX, let alone Apple hardware, just for
> this). That means, if you post patches, my main focus will be on keeping
> the current behavior regression-free, and (secondarily) the
> implementation preferably simple & separated.
> 
> I've added Gabriel and Gerd to the CC list because I believe they might
> be interested in OSX guests (I seem to remember that a sizeable
> out-of-tree patchset is necessary for OSX guests anyway).

For whatever it's worth:

The size of the out-of-tree patchset (available at github.com/gsomlo/edk2,
branches gls-hfsplus -> gls-macboot -> gls-miscopt, with the latter
containing everything, cumulatively) is mainly due to the HFS+ driver
needed to access OSX disk images. The 'macboot' bits are from a GSoC
project by Reza Jelveh, and I haven't had a chance to really understand
how they work yet, since I think HFS+ support in a form acceptable to EDK2
are the bigger priority (and "gls-hfsplus" is not in a form acceptable
to EDK2 at the moment :)

Anyhow, the patched OVMF can boot Sierra right now, there's an
only-slightly-outdated writeup about it at
www.contrib.andrew.cmu.edu/~somlo/OSXKVM/

My long-term wish is to get everything cleaned up and palatable for
upstream inclusion, but haven't found time to really get into it over
the last couple of years.

Cheers,
--Gabriel


  reply	other threads:[~2018-05-15 14:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 19:00 Proposition of a BmEnumerateBootOptions() hook Marvin H?user
2018-05-15  5:40 ` Zeng, Star
2018-05-15  8:22 ` Laszlo Ersek
2018-05-15 13:02   ` Marvin Häuser
2018-05-15 13:52     ` Laszlo Ersek
2018-05-15 14:49       ` Gabriel L. Somlo [this message]
2018-05-15 15:38       ` Marvin Häuser
2018-05-15 16:12         ` Laszlo Ersek
2018-05-15 17:14           ` Marvin Häuser
2018-05-15 18:31             ` Laszlo Ersek
2018-05-17  7:57             ` Ni, Ruiyu
2018-05-17 11:43               ` Marvin Häuser

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-list 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=20180515144941.GI2284@hedwig.ini.cmu.edu \
    --to=devel@edk2.groups.io \
    /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