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 EE539D802CF for ; Thu, 7 Dec 2023 07:32:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=b8TGFFLTvsNtUxmM8cnDG6lcekzuIiKwRjIsVfLVFg8=; 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=1701934371; v=1; b=fY8arJPTSn9D6Mlu/FqE4lW5N7KeXEm7USMvexuSTGUbqkjenJcQGe1Z+XtvpItV9DAK4kev aOnfG/ns7YndK8f7Ayon1kuA9uVRztcMWGAryTxqkpQdeKYsCEh3VOigqg2bkP/B8LplXVW9v8j z5e8NxekD6tdWfNDi/Fy96W8= X-Received: by 127.0.0.2 with SMTP id Q6afYY7687511xlkKHc3jpDD; Wed, 06 Dec 2023 23:32:51 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.78332.1701934370597915821 for ; Wed, 06 Dec 2023 23:32:50 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="393061658" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="393061658" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 23:32:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="800643979" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="800643979" X-Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.43]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 23:32:44 -0800 From: "duntan" To: devel@edk2.groups.io Subject: [edk2-devel] [Patch V2 0/6] Create and consume a new gMpInformationHobGuid2 in UefiCpuPkg. Date: Thu, 7 Dec 2023 15:32:25 +0800 Message-Id: <20231207073230.264-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: WeGpW4tHPonoiYCfKnk1Lpl2x7686176AA= 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=fY8arJPT; 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) In the V2 patch set, modify some function protype and some variables naming. Original message: 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 | 353 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 8 ++++---- UefiCpuPkg/UefiCpuPkg.dec | 3 +++ 8 files changed, 512 insertions(+), 67 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 (#112159): https://edk2.groups.io/g/devel/message/112159 Mute This Topic: https://groups.io/mt/103030291/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-