From: Laszlo Ersek <lersek@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Jordan Justen <jordan.l.justen@intel.com>
Subject: Re: [PATCH 1/1] OvmfPkg/PlatformPei: support >=1TB high RAM, and discontiguous high RAM
Date: Tue, 11 Jul 2017 15:10:39 +0200 [thread overview]
Message-ID: <4948cf63-0a3b-589c-edc1-8962439ce74a@redhat.com> (raw)
In-Reply-To: <20170711103852.37fb455d@nial.brq.redhat.com>
On 07/11/17 10:38, Igor Mammedov wrote:
> On Tue, 11 Jul 2017 05:22:31 +0200
> Laszlo Ersek <lersek@redhat.com> wrote:
>
>> In OVMF we currently get the upper (>=4GB) memory size with the
>> GetSystemMemorySizeAbove4gb() function.
>>
>> The GetSystemMemorySizeAbove4gb() function is used in two places:
>>
>> (1) It is the starting point of the calculations in GetFirstNonAddress().
>> GetFirstNonAddress() in turn
>> - determines the placement of the 64-bit PCI MMIO aperture,
> that's probably broken in memory hotplug case as
> the first usable PCI MMIO address is at fwcfg("etc/reserved-memory-end")
No, it's not broken :) I wrote above, "starting point of the
calculations". The fw_cfg file "etc/reserved-memory-end" is specifically
considered already. (You explained that file to me when I previously
worked on this code, in 2016Q1 or so.) It's just a later point in the
calculation.
> though the file exists only when memory hotplug is enabled
> ( to make life of FW writers harder :/ )
No problem, OVMF deals with "etc/reserved-memory-end" being either
present or absent.
Basically the GetFirstNonAddress() function performs a "cascade of
increases" upwards, for determining the highest address plus one (i.e.,
the first non-address).
If you'd like to see the full function (with this patch applied), it
starts at:
https://github.com/lersek/edk2/blob/highram1tb/OvmfPkg/PlatformPei/MemDetect.c#L292
It is heavily commented.
Thanks!
Laszlo
next prev parent reply other threads:[~2017-07-11 13:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 3:22 [PATCH 0/1] OvmfPkg/PlatformPei: support >=1TB high RAM, and discontiguous high RAM Laszlo Ersek
2017-07-11 3:22 ` [PATCH 1/1] " Laszlo Ersek
2017-07-11 8:38 ` Igor Mammedov
2017-07-11 13:10 ` Laszlo Ersek [this message]
2017-07-26 0:13 ` Jordan Justen
2017-07-26 16:23 ` Laszlo Ersek
2017-08-04 8:50 ` Jordan Justen
2017-08-04 20:04 ` Laszlo Ersek
2017-07-25 21:39 ` [PATCH 0/1] " Laszlo Ersek
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=4948cf63-0a3b-589c-edc1-8962439ce74a@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