public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Mark Salter <msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Leif Lindholm
	<leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Ard Biesheuvel
	<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
	<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"roy.franz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<roy.franz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Catalin Marinas <Catalin.Marinas-5wv7dgnIgG8@public.gmane.org>
Subject: Re: [PATCH] efi/arm64: efistub: don't abort if base of DRAM is occupied
Date: Tue, 15 Jul 2014 15:31:11 +0100	[thread overview]
Message-ID: <20140715143110.GB26465@leverpostej> (raw)
In-Reply-To: <1405434206.25580.31.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>

On Tue, Jul 15, 2014 at 03:23:26PM +0100, Mark Salter wrote:
> On Tue, 2014-07-15 at 14:54 +0100, Leif Lindholm wrote:
> > On Tue, Jul 15, 2014 at 09:11:00AM -0400, Mark Salter wrote:
> > > On Tue, 2014-07-15 at 11:02 +0100, Leif Lindholm wrote:
> > > > > @@ -273,6 +282,10 @@ static void __init free_boot_services(void)
> > > > >                       continue;
> > > > >               }
> > > > >  
> > > > > +             /* Don't free anything below kernel */
> > > > > +             if (md->phys_addr < PHYS_OFFSET)
> > > > > +                     continue;
> > > > > +
> > > > 
> > > > Is the spin table area really allocated as BOOT_SERVICES_*?
> > > 
> > > No. It is EFI_RESERVED_TYPE. But if UEFI is allowed below the kernel,
> > > then there could be BS code/data memory which we'd want to ignore.
> > 
> > Well, if it is boot service code/data - then there is no need for us
> > to keep it around after ExitBootServices().
> > 
> > /
> >     Leif
> 
> One would think, but EFI has proven to be less than strictly compliant
> in that regard in the past. I'm inclined to keep the boot services
> around until after SetVirtualAddressMap just in case.

Why should we add a work around for a potential bug that doesn't exist
yet?

That just provides fertile ground for such a bug to spring into
existence and for people to ignore it when bringing up their SoC. The
comment doesn't explain the rationale and the code doesn't make sense
given a sane implementation.

For the moment it's better to be strict, IMO. Otherwise there are plenty
of other potential bugs we could attempt to work around to enable people
to write firmware with even lower standards...

If we have to work around something then we should have an actual issue
to work around first.

Thanks,
Mark.

  parent reply	other threads:[~2014-07-15 14:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 15:25 [PATCH] efi/arm64: efistub: don't abort if base of DRAM is occupied Ard Biesheuvel
     [not found] ` <1405351521-12010-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-14 15:27   ` Ard Biesheuvel
2014-07-14 18:40   ` Mark Salter
     [not found]     ` <1405363248.25580.12.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2014-07-15 10:02       ` Leif Lindholm
     [not found]         ` <20140715100221.GU4179-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-07-15 11:05           ` Mark Rutland
2014-07-15 13:11           ` Mark Salter
     [not found]             ` <1405429860.25580.25.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2014-07-15 13:54               ` Leif Lindholm
     [not found]                 ` <20140715135418.GV4179-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-07-15 14:23                   ` Mark Salter
     [not found]                     ` <1405434206.25580.31.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2014-07-15 14:31                       ` Mark Rutland [this message]
2014-07-15 14:49                       ` Leif Lindholm
     [not found]                         ` <20140715144944.GW4179-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-07-15 15:04                           ` Mark Salter
     [not found]                             ` <1405436677.25580.34.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2014-07-15 15:28                               ` Leif Lindholm
     [not found]                                 ` <20140715152836.GX4179-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-07-16 13:13                                   ` Mark Salter
     [not found]                                     ` <1405516428.25580.58.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2014-07-22 17:08                                       ` Leif Lindholm
     [not found]                                         ` <20140722170818.GD4179-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-07-22 19:28                                           ` Mark Salter
     [not found]                                             ` <1406057330.12484.21.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2014-07-22 21:28                                               ` Leif Lindholm
2014-07-15 11:00     ` Mark Rutland

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=20140715143110.GB26465@leverpostej \
    --to=mark.rutland-5wv7dgnigg8@public.gmane.org \
    --cc=Catalin.Marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=roy.franz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /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