[U-Boot] [PATCH 1/1] efi_loader: remove efi_exit_caches()
Tom Rini
trini at konsulko.com
Mon Jul 22 22:12:09 UTC 2019
On Mon, Jul 22, 2019 at 09:29:21PM +0200, Mark Kettenis wrote:
> > Date: Mon, 22 Jul 2019 09:36:38 -0400
> > From: Tom Rini <trini at konsulko.com>
> >
> > On Sun, Jul 21, 2019 at 10:46:24AM +0100, Peter Robinson wrote:
> > > > >>> On Fri, Jul 19, 2019 at 7:28 PM Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> > > > >>>>
> > > > >>>> In GRUB before 2.04 a bug existed which did not allow booting some ARM32
> > > > >>>> boards if U-Boot did not disable caches, cf.
> > > > >>>> https://lists.linaro.org/pipermail/cross-distro/2019-July/000933.html
> > > > >>>>
> > > > >>>> In ExitBootServices() we were disabling the caches by calling
> > > > >>>> cleanup_before_linux(). This workaround is not needed anymore.
> > > > >>>
> > > > >>> Do we want to remove this straight away? A lot of distributions will
> > > > >>> take time to move to grub 2.04 because it's been a long time between
> > > > >>> grub releases so they'll have quite a patch delta to re-align to the
> > > > >>> new release. Fedora for example will rebase to grub 2.04 in Fedora 32
> > > > >>> which will start development end of August but won't be released until
> > > > >>> next year.
> > > > >>
> > > > >> As described below this code does not remove any functionality that was
> > > > >> active in U-Boot v2019.04 or v2019.07.
> > > > >>
> > > > >> I can see nothing in https://fedoraproject.org/wiki/Updates_Policy
> > > > >> stopping GRUB 2.04 from being made available for stable Fedora releases.
> > > > >
> > > > > The maintainers believe that it's too intrusive to land now and they
> > > > > want maximum testing time before it gets to stable users, funnily
> > > > > enough people don't like it when their machines cease to boot.
> > > >
> > > > Why should anybody's machines cease to boot?
> > > >
> > > > If Fedora does not role out a new U-Boot they are fine. If Fedora roles
> > > > out a new U-Boot they should role out a matching GRUB and they are fine too.
> > > >
> > > > The venturous who build their own U-Boot should know how to role back
> > > > their system if needed.
> > >
> > > You've clearly never maintained a distribution across 1000s of device
> > > types and 100s of thousands of users.
> > >
> > > We will be shipping Fedora 31 with U-Boot 2019.10 and the current
> > > version of grub that the maintainers wish to support, if that requires
> > > me to revert a number of your changes I will, which will be an
> > > inconvenience and probably take more time than I have spare but I will
> > > survive. I find it strange you fix one OS only to break another. How
> > > will this work for users that want to boot a newly released device
> > > which has recently added U-Boot support to an already released stable
> > > OS?
> > >
> > > If you wish to actively break currently working use cases that's your
> > > prerogative that is your choice but I find breaking currently working
> > > use cases without a reasonable window to migrate dependencies actively
> > > hostile which has tended to not be the way U-Boot has worked in the
> > > past for such things as DM, so breaking a interface to the way OSes
> > > boot IMO is even worse.
> >
> > OK, we have a problem here. A better example than DM would be the
> > various work-arounds we have (or carried for ages) to allow using newer
> > U-Boot with various old and broken kernels. So no, we need to keep this
> > work-around for a long while. What's the EOL date for any Linux
> > distribution that uses this broken grub? The first U-Boot release post
> > that EOL date is when we can drop this particular bit of work-around
> > code.
>
> Hi Tom,
>
> Things are a bit more complicated. The breakage was introduced in
> 2019.04 as part of some efi_loader refacoring. Further refactoring in
> 2019.07 makes a simple revert impossible.
>
> I committed code to the OpenBSD/armv7 bootloader today that disables
> the architecturally defined caches and MMU. However, that isn't
> enough to fix the breakage on all boards as some board configurations
> enable the non-architectural L2 cache. I believe that even with grub
> 2.04 bootling a Linux kernel is broken on boards with such an L2 cache
> as well.
>
> If the L2 cache issue is addressed, OpenBSD will be fine. OpenBSD 6.5
> shipped with a U-Boot 2019.01 package, and OpenBSD 6.6 will have the
> fixed bootloader.
>
> I'm not sure how to fix the L2 cache issue though. I see two options:
>
> 1. Enable CONFIG_SYS_L2CACHE_OFF on all 32-bit ARM boards if the EFI
> loader is enabled. Some board maintainers could object though
> since this probably makes U-Boot a bit slower. And it would be bad
> if that would lead them towards disabling the EFI loader.
>
> 2. Disable the L2 cache whenever the EFI loader is first entered. I'm
> not sure if this is possible while keeping the caches enabled.
Thanks for explaining the background issues here, I was unaware. Would
it be possible to introduce a work-around in the new code paths such
that we continue to work around this issue? But perhaps we need to
confirm what you suspect is still not functional and get a fix for that?
As yes, we do want to be spec compliant, but we also need to function in
the real world, so to speak. And we also cannot disable L2 cache
globally and lead to EFI loader support being disabled by most boards
out of the box, which is not the intended situation.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190722/09b8eda5/attachment.sig>
More information about the U-Boot
mailing list