From 10460942ff2102d9b00c5d754851a3bc1d246972 Mon Sep 17 00:00:00 2001 From: Min Xu Date: Mon, 7 Mar 2022 10:26:39 +0800 Subject: OvmfPkg/PlatformInitLib: Create MemDetect.c BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3863 Move functions in PlatformPei\MemDetect.c to PlatformInitLib\MemDetect.c. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Cc: Sebastien Boeuf Acked-by: Gerd Hoffmann Reviewed-by: Jiewen Yao Signed-off-by: Min Xu --- OvmfPkg/Include/Library/PlatformInitLib.h | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'OvmfPkg/Include') diff --git a/OvmfPkg/Include/Library/PlatformInitLib.h b/OvmfPkg/Include/Library/PlatformInitLib.h index 9b99d4c..62020ef 100644 --- a/OvmfPkg/Include/Library/PlatformInitLib.h +++ b/OvmfPkg/Include/Library/PlatformInitLib.h @@ -132,4 +132,41 @@ PlatformAddReservedMemoryBaseSizeHob ( IN BOOLEAN Cacheable ); +VOID +EFIAPI +PlatformQemuUc32BaseInitialization ( + IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob + ); + +UINT32 +EFIAPI +PlatformGetSystemMemorySizeBelow4gb ( + IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob + ); + +/** + Initialize the PhysMemAddressWidth field in PlatformInfoHob based on guest RAM size. +**/ +VOID +EFIAPI +PlatformAddressWidthInitialization ( + IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob + ); + +/** + Peform Memory Detection for QEMU / KVM + +**/ +VOID +EFIAPI +PlatformQemuInitializeRam ( + IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob + ); + +VOID +EFIAPI +PlatformQemuInitializeRamForS3 ( + IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob + ); + #endif // PLATFORM_INIT_LIB_H_ -- cgit v1.1