From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480259" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:09 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-platforms Patch 14/14] Vlv2TbltDevicePkg/PlatformInitPei: Update MemoryTypeInformation Date: Sun, 30 Jun 2019 19:55:53 -0700 Message-Id: <20190701025553.18596-15-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../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.
- + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ 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