From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Roy Franz <roy.franz@linaro.org>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/4] EFI/early: add /mapbs to map EfiBootServices{Code, Data}
Date: Thu, 11 Jun 2015 10:48:57 +0100 [thread overview]
Message-ID: <1434016137.30003.142.camel@citrix.com> (raw)
In-Reply-To: <557948250200007800083589@mail.emea.novell.com>
On Thu, 2015-06-11 at 07:34 +0100, Jan Beulich wrote:
> >>> On 10.06.15 at 19:22, <roy.franz@linaro.org> wrote:
> > On Wed, Jun 10, 2015 at 2:37 AM, Jan Beulich <JBeulich@suse.com> wrote:
> >>>>> On 10.06.15 at 11:26, <ian.campbell@citrix.com> wrote:
> >>> On Wed, 2015-06-10 at 10:15 +0100, Jan Beulich wrote:
> >>>> >>> On 10.06.15 at 10:56, <ian.campbell@citrix.com> wrote:
> >>>> > On Tue, 2015-06-09 at 14:53 +0100, Jan Beulich wrote:
> >>>> >> From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >>>> >>
> >>>> >> To help on certain platforms to run.
> >>>> >>
> >>>> >> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >>>> >> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> >>>> >
> >>>> > To be effective (or at least consistent) on ARM, would we also want to
> >>>> > change its efi_process_memory_map_bootinfo:
> >>>> > if ( desc_ptr->Type == EfiConventionalMemory
> >>>> > || desc_ptr->Type == EfiBootServicesCode
> >>>> > || desc_ptr->Type == EfiBootServicesData )
> >>>> > to include a check on map_bs?
> >>>>
> >>>> I'm not convinced, but I also don't know the history of why boot
> >>>> services areas are being included here in the first place - Roy?
> >>>> I.e. if the checks weren't there already, I'd agree that an addition
> >>>> similar to the other ones would be needed here, but with the x86
> >>>> side getting relaxed I don't see why you would want to tighten the
> >>>> ARM side at the same time.
> >
> > The boot services code/data is "memory available for general use", just
> > like EfiConventionalMemory after ExitBootServices() is called. Since the
> > memory
> > map being created here is going to be used after ExitBootServices() is
> > called,
> > I think this matches the UEFI specification. This matches x86 behavior
> > before
> > the patch (modulo some address range checks used to set cfg.addr.)
>
> Ouch - looks like I read this the wrong way round, and Ian was right
> in wanting a map_bs check added here:
I should have the courage of my convictions!
> EFI/ARM: don't treat EfiBootServices{Code,Data} as normal RAM under /mapbs
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> --- a/xen/arch/arm/efi/efi-boot.h
> +++ b/xen/arch/arm/efi/efi-boot.h
> @@ -131,9 +131,10 @@ static EFI_STATUS __init efi_process_mem
>
> for ( Index = 0; Index < (mmap_size / desc_size); Index++ )
> {
> - if ( desc_ptr->Type == EfiConventionalMemory
> - || desc_ptr->Type == EfiBootServicesCode
> - || desc_ptr->Type == EfiBootServicesData )
> + if ( desc_ptr->Type == EfiConventionalMemory ||
> + (!map_bs &&
> + (desc_ptr->Type == EfiBootServicesCode ||
> + desc_ptr->Type == EfiBootServicesData)) )
> {
> if ( i >= NR_MEM_BANKS )
> {
>
> Jan
>
next prev parent reply other threads:[~2015-06-11 9:49 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 13:49 [PATCH 0/4] misc EFI adjustments Jan Beulich
2015-06-09 13:52 ` [PATCH 1/4] x86/EFI: fix EFI_MEMORY_WP handling Jan Beulich
2015-06-09 13:57 ` Andrew Cooper
2015-06-09 13:53 ` [PATCH 2/4] EFI/early: add /mapbs to map EfiBootServices{Code, Data} Jan Beulich
2015-06-09 14:03 ` Andrew Cooper
2015-06-09 14:11 ` Konrad Rzeszutek Wilk
2015-06-09 15:26 ` Andrew Cooper
2015-06-09 15:24 ` Jan Beulich
2015-06-10 8:56 ` Ian Campbell
2015-06-10 9:15 ` Jan Beulich
2015-06-10 9:26 ` Ian Campbell
2015-06-10 9:37 ` Jan Beulich
2015-06-10 10:00 ` Ian Campbell
2015-06-10 10:00 ` Ian Campbell
2015-06-10 17:22 ` Roy Franz
2015-06-10 18:12 ` Andrew Cooper
2015-06-10 19:48 ` Konrad Rzeszutek Wilk
2015-06-10 19:55 ` Andrew Cooper
2015-06-10 20:06 ` Roy Franz
2015-06-11 6:34 ` Jan Beulich
2015-06-11 9:48 ` Ian Campbell [this message]
2015-06-11 19:33 ` Roy Franz
2015-06-09 13:53 ` [PATCH 3/4] EFI: support default attributes to map Runtime service areas with none given Jan Beulich
2015-06-09 14:08 ` Andrew Cooper
2015-06-09 15:26 ` Jan Beulich
2015-06-09 15:30 ` Andrew Cooper
2015-06-10 8:57 ` Ian Campbell
2015-06-09 13:54 ` [PATCH 4/4] x86/EFI: adjust EFI_MEMORY_WP handling for spec version 2.5 Jan Beulich
2015-06-09 14:08 ` Konrad Rzeszutek Wilk
2015-06-09 14:25 ` Konrad Rzeszutek Wilk
2015-06-09 15:28 ` Jan Beulich
2015-06-09 15:35 ` Konrad Rzeszutek Wilk
2015-06-09 14:15 ` Andrew Cooper
2015-06-09 15:35 ` [PATCH 0/4] misc EFI adjustments Konrad Rzeszutek Wilk
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=1434016137.30003.142.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=roy.franz@linaro.org \
--cc=xen-devel@lists.xenproject.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 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.