OvmfPkg: Introduce lazy accept in PlatformInitLib and PlatformPei

RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3937

There are below major changes in PlatformInitLib/PlatformPei
1. ProcessHobList
  The unaccepted memory is accepted if it is under 4G address.
  Please be noted: in current stage, we only accept the memory under 4G.
  We will re-visit here in the future when on-demand accept memory is
  required.

2. TransferTdxHobList
  Transfer the unaccepted memory hob to EFI_RESOURCE_SYSTEM_MEMORY hob
  if it is accepted.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Min M Xu
2022-11-01 13:13:46 +08:00
committed by mergify[bot]
parent 6ca9f410d1
commit d1e41c620f
2 changed files with 81 additions and 9 deletions

View File

@@ -42,6 +42,8 @@ Module Name:
#include <Library/PlatformInitLib.h>
#define MEGABYTE_SHIFT 20
VOID
EFIAPI
PlatformQemuUc32BaseInitialization (