mirror of https://github.com/acidanthera/audk.git
OvmfPkg: Use BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED defined in MdeModulePkg
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3937 BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is defined in MdeModulePkg. The files which use the definition are updated as well. 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:
parent
32c5a470ad
commit
9b648112a5
|
@ -20,10 +20,9 @@
|
|||
#include <IndustryStandard/UefiTcgPlatform.h>
|
||||
#include <Library/PlatformInitLib.h>
|
||||
#include <OvmfPlatforms.h>
|
||||
#include <Pi/PrePiHob.h>
|
||||
#include "PeilessStartupInternal.h"
|
||||
|
||||
#define EFI_RESOURCE_MEMORY_UNACCEPTED 7
|
||||
|
||||
/**
|
||||
* Construct the HobList in SEC phase.
|
||||
*
|
||||
|
@ -92,7 +91,7 @@ ConstructFwHobList (
|
|||
//
|
||||
while (!END_OF_HOB_LIST (Hob)) {
|
||||
if (Hob.Header->HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {
|
||||
if (Hob.ResourceDescriptor->ResourceType == EFI_RESOURCE_MEMORY_UNACCEPTED) {
|
||||
if (Hob.ResourceDescriptor->ResourceType == BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED) {
|
||||
PhysicalEnd = Hob.ResourceDescriptor->PhysicalStart + Hob.ResourceDescriptor->ResourceLength;
|
||||
ResourceLength = Hob.ResourceDescriptor->ResourceLength;
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#include <Library/PeiServicesLib.h>
|
||||
#include <Library/TdxLib.h>
|
||||
#include <Library/SynchronizationLib.h>
|
||||
#include <Pi/PrePiHob.h>
|
||||
#include <WorkArea.h>
|
||||
#include <ConfidentialComputingGuestAttr.h>
|
||||
|
||||
#define ALIGNED_2MB_MASK 0x1fffff
|
||||
#define EFI_RESOURCE_MEMORY_UNACCEPTED 7
|
||||
#define ALIGNED_2MB_MASK 0x1fffff
|
||||
|
||||
/**
|
||||
This function will be called to accept pages. Only BSP accepts pages.
|
||||
|
@ -211,7 +211,7 @@ ValidateHobList (
|
|||
EFI_RESOURCE_MEMORY_MAPPED_IO_PORT,
|
||||
EFI_RESOURCE_MEMORY_RESERVED,
|
||||
EFI_RESOURCE_IO_RESERVED,
|
||||
EFI_RESOURCE_MEMORY_UNACCEPTED
|
||||
BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED
|
||||
};
|
||||
|
||||
if (VmmHobList == NULL) {
|
||||
|
@ -387,7 +387,7 @@ ProcessHobList (
|
|||
if (Hob.Header->HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {
|
||||
DEBUG ((DEBUG_INFO, "\nResourceType: 0x%x\n", Hob.ResourceDescriptor->ResourceType));
|
||||
|
||||
if (Hob.ResourceDescriptor->ResourceType == EFI_RESOURCE_MEMORY_UNACCEPTED) {
|
||||
if (Hob.ResourceDescriptor->ResourceType == BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED) {
|
||||
DEBUG ((DEBUG_INFO, "ResourceAttribute: 0x%x\n", Hob.ResourceDescriptor->ResourceAttribute));
|
||||
DEBUG ((DEBUG_INFO, "PhysicalStart: 0x%llx\n", Hob.ResourceDescriptor->PhysicalStart));
|
||||
DEBUG ((DEBUG_INFO, "ResourceLength: 0x%llx\n", Hob.ResourceDescriptor->ResourceLength));
|
||||
|
@ -488,7 +488,7 @@ TransferTdxHobList (
|
|||
ResourceType = Hob.ResourceDescriptor->ResourceType;
|
||||
ResourceAttribute = Hob.ResourceDescriptor->ResourceAttribute;
|
||||
|
||||
if (ResourceType == EFI_RESOURCE_MEMORY_UNACCEPTED) {
|
||||
if (ResourceType == BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED) {
|
||||
ResourceType = EFI_RESOURCE_SYSTEM_MEMORY;
|
||||
ResourceAttribute |= (EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_TESTED);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue