diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-05-08 14:16:49 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-05-18 15:48:48 +0000 |
commit | 356b96b3a2dc4b5aa05a680a7c6a2f094266fdd3 (patch) | |
tree | 913299f2ec8fdc311bf44cceb0dae2cf9597b540 /OvmfPkg/OvmfPkgIa32X64.dsc | |
parent | 2c06e76bba06e58bd1a903c7c319dda722676a8e (diff) | |
download | edk2-356b96b3a2dc4b5aa05a680a7c6a2f094266fdd3.tar.gz edk2-356b96b3a2dc4b5aa05a680a7c6a2f094266fdd3.tar.bz2 edk2-356b96b3a2dc4b5aa05a680a7c6a2f094266fdd3.zip |
OvmfPkg/PlatformPei: rewrite MemTypeInfo HOB production logic
The previous patch has no effect -- i.e., it cannot stop the tracking of
BS Code/Data in MemTypeInfo -- if the virtual machine already has a
MemoryTypeInformation UEFI variable.
In that case, our current logic allows the DXE IPL PEIM to translate the
UEFI variable to the HOB, and that translation is verbatim. If the
variable already contains records for BS Code/Data, the issues listed in
the previous patch persist for the virtual machine.
For this reason, *always* install PlatformPei's own MemTypeInfo HOB. This
prevents the DXE IPL PEIM's variable-to-HOB translation.
In PlatformPei, consume the records in the MemoryTypeInformation UEFI
variable as hints:
- Ignore all memory types for which we wouldn't by default install records
in the HOB. This hides BS Code/Data from any existent
MemoryTypeInformation variable.
- For the memory types that our defaults cover, enable the records in the
UEFI variable to increase (and *only* to increase) the page counts.
This lets the MemoryTypeInformation UEFI variable function as designed,
but it eliminates a reboot when such a new OVMF binary is deployed (a)
that has higher memory consumption than tracked by the virtual machine's
UEFI variable previously, *but* (b) whose defaults also reflect those
higher page counts.
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2706
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200508121651.16045-3-lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'OvmfPkg/OvmfPkgIa32X64.dsc')
0 files changed, 0 insertions, 0 deletions