42 while (!END_OF_HOB_LIST (Hob)) {
43 if (Hob.Header->
HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {
44 if ((Hob.ResourceDescriptor->
ResourceType == EFI_RESOURCE_MEMORY_RESERVED) && \
47 return Hob.ResourceDescriptor;
51 Hob.Raw = GET_NEXT_HOB (Hob);
66 IN OUT UINT64 *LowMemoryLength,
67 IN OUT UINT64 *HighMemoryLength
76 EFI_RESOURCE_ATTRIBUTE_PRESENT |
77 EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
78 EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
79 EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
80 EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
81 EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
87 if (BootMode != BOOT_ON_S3_RESUME) {
88 ResourceAttribute |= EFI_RESOURCE_ATTRIBUTE_TESTED;
91 *HighMemoryLength = 0;
92 *LowMemoryLength = SIZE_1MB;
101 while (!END_OF_HOB_LIST (Hob)) {
102 if (Hob.Header->
HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {
103 if ((Hob.ResourceDescriptor->
ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) ||
104 ((Hob.ResourceDescriptor->
ResourceType == EFI_RESOURCE_MEMORY_RESERVED) &&
113 *LowMemoryLength += (UINT64)(Hob.ResourceDescriptor->
ResourceLength);
115 *HighMemoryLength += (UINT64)(Hob.ResourceDescriptor->
ResourceLength);
120 Hob.Raw = GET_NEXT_HOB (Hob);
133 IN UINT32 TemporaryRamBase,
134 OUT UINT32 *TemporaryRamSize
141 if (TemporaryRamBase == 0) {
145 *TemporaryRamSize = 0;
151 if (TemporaryRamBase == (
AsmReadMsr64 (MsrNum) & 0xFFFFF000)) {
152 *TemporaryRamSize = (~(
AsmReadMsr64 (MsrNum + 1) & 0xFFFFF000) + 1);
VOID *EFIAPI GetHobList(VOID)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
EFI_STATUS EFIAPI PeiServicesGetBootMode(OUT EFI_BOOT_MODE *BootMode)
UINT64 EFIAPI AsmReadMsr64(IN UINT32 Index)
#define ASSERT_EFI_ERROR(StatusParameter)
#define MSR_IA32_MTRR_PHYSBASE0
UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE
UINT64 EFI_PHYSICAL_ADDRESS
EFI_PHYSICAL_ADDRESS PhysicalStart
EFI_RESOURCE_TYPE ResourceType
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute