[edk2-devel] [edk2-platforms Patch 14/14] Vlv2TbltDevicePkg/PlatformInitPei: Update MemoryTypeInformation

Michael D Kinney michael.d.kinney at intel.com
Mon Jul 1 02:55:53 UTC 2019


Reduce extra reboots when UEFI Shell is run followed by an OS boot.
The extra reboot is due to use of EfiLoaderCode that exceeds the
MemoryTypeInformation bin size.  EfiLoaderCode should not be tracked.
Remove all memory types that should not be tracked, and update the
remaining bin sizes based on observed memory usage on an X64 DEBUG
profile.

Cc: Zailiang Sun <zailiang.sun at intel.com>
Cc: Yi Qian <yi.qian at intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney at intel.com>
---
 .../PlatformInitPei/MemoryPeim.c              | 21 +++++--------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c
index e6189b7713..64b606637a 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c
@@ -1,11 +1,9 @@
 /** @file
 
-  Copyright (c) 2004  - 2016, Intel Corporation. All rights reserved.<BR>
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
-                                                                                   

-
 Module Name:
 
 
@@ -40,19 +38,10 @@ Abstract:
 
 EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
   { EfiACPIReclaimMemory,       0x40  },    // 0x40 pages = 256k for ASL
-  { EfiACPIMemoryNVS,           0x100 },    // 0x100 pages = 1 MB for S3, SMM, HII, etc
-  { EfiReservedMemoryType,      0x600 },    // 48k for BIOS Reserved
-  { EfiMemoryMappedIO,          0     },
-  { EfiMemoryMappedIOPortSpace, 0     },
-  { EfiPalCode,                 0     },
-  { EfiRuntimeServicesCode,     0x200 },
+  { EfiACPIMemoryNVS,           0x40  },    // 0x40 pages = 256k MB for S3, SMM, HII, etc
+  { EfiReservedMemoryType,      0x80  },    // 512k for BIOS Reserved
+  { EfiRuntimeServicesCode,     0x100 },
   { EfiRuntimeServicesData,     0x100 },
-  { EfiLoaderCode,              0x100 },
-  { EfiLoaderData,              0x100 },
-  { EfiBootServicesCode,        0x800 },
-  { EfiBootServicesData,        0x2500},
-  { EfiConventionalMemory,      0     },
-  { EfiUnusableMemory,          0     },
   { EfiMaxMemoryType,           0     }
 };
 
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43073): https://edk2.groups.io/g/devel/message/43073
Mute This Topic: https://groups.io/mt/32267629/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list