From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 943FFAC12B0 for ; Mon, 29 Jan 2024 18:58:20 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=f3Bd9kXnI66sHF/v1kwtUjr26+rn3Vw0cgT74kdxdHY=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706554699; v=1; b=C6AQoI+xL5bl81ZBD2132AHTluch/28RapAnC5JLQ3XAUEDk7Ytiq18H91MHXrbwJ142SbNi gEwOaktwNphkJI+Qf1e6EyRxTRC6Xgesrw+hvH8/RvvSrjuKq9N2r2ncxNMafTsdCB4Yir43BpW RehAzUM2aGipsX47B7xfCwIc= X-Received: by 127.0.0.2 with SMTP id BRwQYY7687511xdxKcDIaP9W; Mon, 29 Jan 2024 10:58:19 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mx.groups.io with SMTP id smtpd.web11.3677.1706554698428677491 for ; Mon, 29 Jan 2024 10:58:18 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="1984617" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="1984617" X-Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 10:58:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="22192078" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.212.128.183]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 10:58:18 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Liming Gao , Aaron Li , Liu Yun , Andrew Fish , Laszlo Ersek Subject: [edk2-devel] [Patch v3 0/2] MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB Date: Mon, 29 Jan 2024 10:58:06 -0800 Message-Id: <20240129185808.776-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: HLhvwYcEOycH0E8xGoMZDHd8x7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=C6AQoI+x; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io New in V3 ========== * Fix uncrustify formatting in Image.c * Add DEBUG_ERROR log message in CoreSetMemoryTypeInformationRange() if bin locations are already set. * Add details to commit message about improvements in S4 resume. New in V2 ========= * Break single patch into 2 patches * Moves GCD Initialization before RT data allocations * Set MemoryTypeInfo bin range from HOB feature * Update description of Memory Type Information GUID to describe additional use case as Owner GUID in a Resource Descriptor HOB for preferred memory range for Memory Type Information bins. Provide an optional method for PEI to declare a specific address range to use for the Memory Type Information bins. The current algorithm uses heuristics that tends to place the Memory Type Information bins in the same location, but memory configuration changes across boots or algorithm changes across a firmware updates could potentially change the Memory Type Information bin location. If the HOB List contains a Resource Descriptor HOB that describes tested system memory and has an Owner GUID of gEfiMemoryTypeInformationGuid, then use the address range described by the Resource Descriptor HOB as the preferred location of the Memory Type Information bins. If this HOB is not detected, then the current behavior is preserved. The HOB with an Owner GUID of gEfiMemoryTypeInformationGuid is ignored for the following conditions: * The HOB with an Owner GUID of gEfiMemoryTypeInformationGuid is smaller than the Memory Type Information bins. * The HOB list contains more than one Resource Descriptor HOB with an owner GUID of gEfiMemoryTypeInformationGuid. * The Resource Descriptor HOB with an Owner GUID of gEfiMemoryTypeInformationGuid is the same Resource Descriptor HOB that that describes the PHIT memory range. Update the DxeMain initialization order to initialize GCD services before any runtime allocations are performed. This is required to prevent runtime data fragmentation when the UEFI System Table and UEFI Runtime Service Table are allocated before both the memory and GCD services are initialized. Cc: Liming Gao Cc: Aaron Li Cc: Liu Yun Cc: Andrew Fish Cc: Laszlo Ersek Signed-off-by: Michael D Kinney Michael D Kinney (2): MdeModulePkg/Core/Dxe: Initialize GCD before RT memory allocations MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB MdeModulePkg/Core/Dxe/DxeMain.h | 6 ++ MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 23 ++-- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 72 ++++++++++++- MdeModulePkg/Core/Dxe/Image/Image.c | 13 ++- MdeModulePkg/Core/Dxe/Mem/Page.c | 102 ++++++++++++++++++ .../Include/Guid/MemoryTypeInformation.h | 14 ++- 6 files changed, 206 insertions(+), 24 deletions(-) -- 2.40.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114732): https://edk2.groups.io/g/devel/message/114732 Mute This Topic: https://groups.io/mt/104038198/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-