From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io, kraxel@redhat.com
Cc: Oliver Steffen <osteffen@redhat.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Jordan Justen <jordan.l.justen@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Pawel Polawski <ppolawsk@redhat.com>
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformInitLib: pass through reservations from qemu
Date: Fri, 23 Dec 2022 12:55:52 +0100 [thread overview]
Message-ID: <CAMj1kXF8Z2ga3WoMvy3gvE1thkR7qCyoMdwEChGxGniss+XwWw@mail.gmail.com> (raw)
In-Reply-To: <20221207053215.2527430-1-kraxel@redhat.com>
On Wed, 7 Dec 2022 at 06:32, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> qemu uses the etc/e820 fw_cfg file not only for memory, but
> also for reservations. Handle reservations by adding resource
> descriptor hobs for them.
>
> A typical qemu configuration has a small reservation between
> lapic and flash:
>
> # sudo cat /proc/iomem
> [ ... ]
> fee00000-fee00fff : Local APIC
> feffc000-feffffff : Reserved <= HERE
> ffc00000-ffffffff : Reserved
> [ ... ]
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Merged as #3828
> ---
> OvmfPkg/Library/PlatformInitLib/MemDetect.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> index b8feae4309de..a7a4e028ad50 100644
> --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> @@ -228,6 +228,22 @@ PlatformScanOrAdd64BitE820Ram (
> ));
> }
> }
> + } else if (E820Entry.Type == EfiAcpiAddressRangeReserved) {
> + if (AddHighHob) {
> + DEBUG ((
> + DEBUG_INFO,
> + "%a: Reserved: Base=0x%Lx Length=0x%Lx\n",
> + __FUNCTION__,
> + E820Entry.BaseAddr,
> + E820Entry.Length
> + ));
> + BuildResourceDescriptorHob (
> + EFI_RESOURCE_MEMORY_RESERVED,
> + 0,
> + E820Entry.BaseAddr,
> + E820Entry.Length
> + );
> + }
> }
> }
>
> --
> 2.38.1
>
>
>
>
>
>
next prev parent reply other threads:[~2022-12-23 11:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 5:32 [PATCH 1/1] OvmfPkg/PlatformInitLib: pass through reservations from qemu Gerd Hoffmann
2022-12-23 11:55 ` Ard Biesheuvel [this message]
2023-01-12 17:09 ` [edk2-devel] " Lendacky, Thomas
2023-01-16 17:09 ` Ard Biesheuvel
2023-01-16 20:10 ` Lendacky, Thomas
2023-01-17 16:49 ` Ard Biesheuvel
2023-01-17 21:43 ` Lendacky, Thomas
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=CAMj1kXF8Z2ga3WoMvy3gvE1thkR7qCyoMdwEChGxGniss+XwWw@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