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 8CEFA780091 for ; Tue, 5 Dec 2023 05:49:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=S/TphPymDTpCrINur043ZiZxOvRhirlp+38n3LIEpB8=; c=relaxed/simple; d=groups.io; h=From:To: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=1701755356; v=1; b=PFseUTmtjxjC7N7ySLmohS0Gw7LRXkSg8GJoLb2xZFPZJmZ+4+D2j3/VmcnlnVXaPekPJFDM cORNVis3vZcmpe0gaYaMwupNDAYzLvjxFIl0AHydgKWDwWa/vNlNMbJGYn6Di6dQg2T019S1VAe XrpM2zpDLOXex40LPFIEiyfM= X-Received: by 127.0.0.2 with SMTP id LlzCYY7687511xuL3ybIwRpP; Mon, 04 Dec 2023 21:49:16 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.93095.1701755355027796431 for ; Mon, 04 Dec 2023 21:49:15 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="378875424" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="378875424" X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 21:49:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="720580515" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="720580515" X-Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.43]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 21:49:13 -0800 From: "duntan" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH 0/6] Create and consume a new gMpInformationHobGuid2 in UefiCpuPkg. Date: Tue, 5 Dec 2023 13:48:54 +0800 Message-Id: <20231205054900.926-1-dun.tan@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,dun.tan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: sauTKof1iDf5wsg54Es0EAnrx7686176AA= 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=PFseUTmt; 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 Create and consume gMpInformationHobGuid2 in UefiCpuPkg in this patch series. Currently, there is a gMpInformationHobGuid defined, created and consumed only in StandaloneMmPkg. The HOB contains the EFI_PROCESSOR_INFORMATION structure for each CPU and the number of processors. This is the same as the information that PiSmmCpuDxeSmm uses MpService Protocol to get. This new gMpInformationHobGuid2 also contains the NumberOfProcessors and the EFI_PROCESSOR_INFORMATION for each CPU. lso the HOB is extended to support the case that the maximum HOB length is not enough for all CPU. So there might be more than one HOB instance in the HOB list. Each HOB describes the corresponding CPU index range. The plan is to create gMpInformationHob2Guid in CpuMpPei module. Then PiSmmCpuDxeSmm and other MM_STANDALONE modules can consume the hob. This can avoid calling MpService Protocol in PiSmmCpuDxeSmm. Also the issue that one gMpInformationHobGuid might be not enough when CPU number is 1~2000 or bigger can be solved. Also the code to extracting information from gSmmBaseHobGuid is modified to remove the assumption that there is only one HOB instance of gSmmBaseHobGuid. Dun Tan (6): UefiCpuPkg: Create gMpInformationHobGuid2 in UefiCpuPkg UefiCpuPkg: Build MpInfo2HOB in CpuMpPei UefiCpuPkg: Consume MpInfo2Hob in PiSmmCpuDxe UefiCpuPkg: Add a new field in MpInfo2 HOB UefiCpuPkg: Cache core type in MpInfo2 HOB UefiCpuPkg: Avoid assuming only one smmbasehob UefiCpuPkg/CpuMpPei/CpuMpPei.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ UefiCpuPkg/CpuMpPei/CpuMpPei.h | 6 +++++- UefiCpuPkg/CpuMpPei/CpuMpPei.inf | 3 ++- UefiCpuPkg/Include/Guid/MpInformation2.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 351 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 8 ++++---- UefiCpuPkg/UefiCpuPkg.dec | 3 +++ 8 files changed, 515 insertions(+), 62 deletions(-) create mode 100644 UefiCpuPkg/Include/Guid/MpInformation2.h -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112062): https://edk2.groups.io/g/devel/message/112062 Mute This Topic: https://groups.io/mt/102987136/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-