public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Udit Kumar <udit.kumar@nxp.com>
Subject: Re: [PATCH] RFC Inform UEFI memory to Linux
Date: Fri, 15 Sep 2017 15:55:27 -0700	[thread overview]
Message-ID: <CAKv+Gu_c-yQ2p+rj-zXi7eO85butAviX=_oyoqbkuiN-HGzEMw@mail.gmail.com> (raw)
In-Reply-To: <20170915101338.agohuaoakeaokevb@bivouac.eciton.net>

On 15 September 2017 at 03:13, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Fri, Sep 15, 2017 at 08:02:34PM +0530, Meenakshi Aggarwal wrote:
>> From: Udit Kumar <udit.kumar@nxp.com>
>>
>> While creating Hob list, ArmPlatformPkg is hiding UEFI memory.
>> whereas this memory can be used by OS.
>>
>> This patch, allows OS to use UEFI code area.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
>> Signed-off-by: Udit Kumar <udit.kumar@nxp.com>
>
> I will let Ard comment on the technical aspect, since you've been
> discussing this offline.
>
> However, there is something broken in your setup: the patch should
> look like this:
> ---
> iff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
> b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
> index 2feb11f21d..d3fa894244 100644
> --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
> +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
> @@ -150,7 +150,7 @@ MemoryPeim (
>            } else {
>              // Create the System Memory HOB for the
>              // firmware with the non-present attribute
>              BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,
> -                                        ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT,
> +                                        ResourceAttributes,
>                                          PcdGet64 (PcdFdBaseAddress),
>                                          PcdGet32 (PcdFdSize));
>
> @@ -161,7 +161,7 @@ MemoryPeim (
>          } else {
>            // Create the System Memory HOB for the firmware
>            // with the non-present attribute
>            BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,
> -                                      ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT,
> +                                      ResourceAttributes,
>                                        PcdGet64 (PcdFdBaseAddress),
>                                        PcdGet32 (PcdFdSize));
>
> ---
>
> I am guessing you have inadvertently modified the line terminations
> from CRLF to LF (the evidence gets stripped out by SMTP).
> Please resubmit with this addressed.
>

Thanks for the patch. But please consider carefully what you're doing:
in the original code, the entire DRAM region is added, and
subsequently split up so the part that overlaps with the FD can be
registered with different attributes.

After your patch, we carefully isolate the region that overlaps the
FD, and subsequently register it with the exact same attributes, which
means we didn't have to isolate it in the first place.

My point is really that you can just remove lines 124 - 189 instead.


  reply	other threads:[~2017-09-15 22:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 14:32 [PATCH] RFC Inform UEFI memory to Linux Meenakshi Aggarwal
2017-09-15 10:13 ` Leif Lindholm
2017-09-15 22:55   ` Ard Biesheuvel [this message]
2017-09-18  4:07     ` Udit Kumar
2017-09-18  4:30       ` Ard Biesheuvel
2017-09-19 12:32 ` [PATCH v2] PeiLib : " Meenakshi Aggarwal
2017-09-19  8:07   ` Sakar Arora
2017-09-19 10:10     ` Udit Kumar
2017-09-19 11:20       ` Sakar Arora
2017-09-19 12:46         ` Udit Kumar
2017-09-19 12:48     ` Ard Biesheuvel
2017-09-20  5:32       ` Sakar Arora
2017-09-20  6:32         ` Ard Biesheuvel
2017-09-20  8:20           ` Sakar Arora
2017-09-25  5:47             ` Meenakshi Aggarwal
2017-11-30 10:07             ` Udit Kumar
2017-11-30 14:33               ` Ard Biesheuvel
2017-09-20 14:59   ` Gao, Liming
2017-09-21  5:59     ` Udit Kumar

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='CAKv+Gu_c-yQ2p+rj-zXi7eO85butAviX=_oyoqbkuiN-HGzEMw@mail.gmail.com' \
    --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