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 30527D8027A for ; Mon, 29 Jan 2024 03:45:40 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=JP1WU5i6X0xx3XDw+qZAKR+fzxWWjICvnDds986FWgI=; 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=1706499939; v=1; b=Thpqlf7CjZzERKNwR9b5S+JA49Grt7pfmMvmSMm6FAwMZnM4OnG4ABvzZ+H/Oq0kuYASGezB kYxgaVljtsmWLNprY/+dRd7XuNPcL//oOvlkUz1KdDU2FbCFAIdvLoTzAGk/hSkBWfjlhGbI8lq z1rya7L85Nk6I6ZCsS/+Bo2k= X-Received: by 127.0.0.2 with SMTP id kGL6YY7687511xmAZFDCqlb5; Sun, 28 Jan 2024 19:45:39 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.6721.1706499938782819105 for ; Sun, 28 Jan 2024 19:45:39 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10967"; a="406565620" X-IronPort-AV: E=Sophos;i="6.05,226,1701158400"; d="scan'208";a="406565620" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2024 19:45:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10967"; a="960774663" X-IronPort-AV: E=Sophos;i="6.05,226,1701158400"; d="scan'208";a="960774663" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.209.52.235]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2024 19:45:20 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Liming Gao , Aaron Li , Liu Yun , Andrew Fish Subject: [edk2-devel] [Patch v2 0/2] MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB Date: Sun, 28 Jan 2024 19:45:12 -0800 Message-Id: <20240129034514.1898-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: KuSBXmXdPLp3q183sn0lxa0qx7686176AA= 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=Thpqlf7C; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) 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 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 | 1 - MdeModulePkg/Core/Dxe/Mem/Page.c | 101 ++++++++++++++++++ .../Include/Guid/MemoryTypeInformation.h | 14 ++- 6 files changed, 199 insertions(+), 18 deletions(-) -- 2.40.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114669): https://edk2.groups.io/g/devel/message/114669 Mute This Topic: https://groups.io/mt/104025662/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-