public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Jordan Justen <jordan.l.justen@intel.com>,
	edk2-devel-01 <edk2-devel@lists.01.org>
Subject: Re: [PATCH v2 1/1] OvmfPkg/PlatformPei: support >=1TB high RAM, and discontiguous high RAM
Date: Sat, 5 Aug 2017 03:54:38 +0200	[thread overview]
Message-ID: <b01fd8c5-67d7-4fce-6258-b67e26b361a9@redhat.com> (raw)
In-Reply-To: <150189226552.3956.16656969706399914884@jljusten-skl>

On 08/05/17 02:17, Jordan Justen wrote:
> On 2017-08-04 16:00:43, Laszlo Ersek wrote:

>> +    if (E820Entry.Type == EfiAcpiAddressRangeMemory &&
>> +        E820Entry.BaseAddr >= BASE_4GB) {
>> +      if (MaxAddress == NULL) {
>> +        UINT64 Base;
>> +        UINT64 End;
>> +
>> +        //
>> +        // Round up the start address, and round down the end address.
>> +        //
>> +        Base = ALIGN_VALUE (E820Entry.BaseAddr, (UINT64)EFI_PAGE_SIZE);
>> +        End = (E820Entry.BaseAddr + E820Entry.Length) &
>> +              ~(UINT64)EFI_PAGE_MASK;
> 
> I had set non-aligned Base/End one level out, and then rounded them here.
> 
>> +        if (Base < End) {
>> +          AddMemoryRangeHob (Base, End);
>> +          DEBUG ((
>> +            DEBUG_VERBOSE,
>> +            "%a: AddMemoryRangeHob [0x%Lx, 0x%Lx)\n",
>> +            __FUNCTION__,
>> +            Base,
>> +            End
>> +            ));
>> +        }
>> +      } else {
>> +        UINT64 Candidate;
>> +
>> +        Candidate = E820Entry.BaseAddr + E820Entry.Length;
> 
> Therefore I already had End here.
> 
>> +        if (Candidate > *MaxAddress) {
>> +          *MaxAddress = Candidate;
>> +          DEBUG ((
>> +            DEBUG_VERBOSE,
>> +            "%a: MaxAddress=0x%Lx\n",
>> +            __FUNCTION__,
>> +            *MaxAddress
>> +            ));
>> +        }
> 
> I just had:
> 
>         *MaxAddress = MAX(*MaxAddress, End);

Whenever you go to the trouble of coding up your suggestions, please
post them too! I'd welcome and appreciate that. I might even answer with
an R-b, and then it's faster for everyone. (And it's nice to have some
patches with dual S-o-b's :) )

> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

Thank you, pushed as commit 1fceaddb12b5.

Laszlo


      reply	other threads:[~2017-08-05  1:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 23:00 [PATCH v2 0/1] OvmfPkg/PlatformPei: support >=1TB high RAM, and discontiguous high RAM Laszlo Ersek
2017-08-04 23:00 ` [PATCH v2 1/1] " Laszlo Ersek
2017-08-05  0:17   ` Jordan Justen
2017-08-05  1:54     ` Laszlo Ersek [this message]

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=b01fd8c5-67d7-4fce-6258-b67e26b361a9@redhat.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