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 61DD874003A for ; Wed, 21 Feb 2024 03:48:30 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vvlEAboEqldU7p6Gb+BnwdH8BCtDpswRYK9iwxLTbW0=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708487308; v=1; b=M/C9OO6vModN+q5asRbarBg/VGxJCkC/tqwyN8NT023dJgCljZx1Gm4D3LmC3JlrWc8IaV1o 0YD3Q3sjdUFy32ZY3Z7dGjXXg2KmQht8WeTppMBbHnwZF2XAS21lkoE9CiKBzI+R7hJballrCUG EVJPwL50kiVl57c5a4h4uH8Y= X-Received: by 127.0.0.2 with SMTP id Axi0YY7687511xnQwIM3G9fI; Tue, 20 Feb 2024 19:48:28 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mx.groups.io with SMTP id smtpd.web11.5611.1708487308427204187 for ; Tue, 20 Feb 2024 19:48:28 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10990"; a="2498762" X-IronPort-AV: E=Sophos;i="6.06,174,1705392000"; d="scan'208";a="2498762" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2024 19:48:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10990"; a="936566147" X-IronPort-AV: E=Sophos;i="6.06,174,1705392000"; d="scan'208";a="936566147" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Feb 2024 19:48:28 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 20 Feb 2024 19:48:27 -0800 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 20 Feb 2024 19:48:27 -0800 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.41) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 20 Feb 2024 19:48:27 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A8/bGT5W3518qjhXgZAt1LGkJesin8OXckh8zE5bXyFj5ntcNhEEj439iaLrcERME83dKcu+rWr5oiNJAy8SFGxRu2jJUNfiDyVYbsPJYatzPlxDKBN/JyqINwAF5J0p1JMO1kdGDrJZvqFYOKyn+dyljAndChs/U4wOGDGs5MHGbJ2KaWwZSibcasgdP3GG+QjspCePrvF4xgMAC2oypjW3VHuwl/G43Uv0Hdvzm/BxHpGZUbJRVtQqIl8pD/XaEED3xkmHikINQob8XVv5J7YqhDAauOobcq7sof3Ahq8BRABV17sljkH/z2QNReDwcGXtt1z57ux841wJFhY8Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V/lRMNXtlqZb9p0HBobccBkbEYDxYhLw30Z1gY0SiAo=; b=Pa2ZSHU1+LzLblQ0nMUbiefhqX1gKu+r41mI1pLtR0NRQyJlNdpCYj6TDUsmdvrqAfmGm67krghQlieKaxnqbGr/23jhHOeyKS7nBhdii5542GBPKLZFlVKERPOgvCqSSjv/Fo89V8Tb65X7xvEaS0B7NbI9UkwWEv2LMPqYdjiClBbqab1+hX1dFbJrx6xzvAYJG3re5E4KvWK8TDo6d/vb6ijcqiXsqnGYwask7naxM/eU1STgvTf1/Sz8BcN159CngZgpCh7LcY638tZ12AKyj/VUxyUvW6Oigcw0tYCxAanwr25bQ3rzVMsftn4npfqFSp6UWKvKkfu/WFQGGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by IA1PR11MB7387.namprd11.prod.outlook.com (2603:10b6:208:421::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39; Wed, 21 Feb 2024 03:48:26 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8985:d1bc:9df6:61cf]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8985:d1bc:9df6:61cf%7]) with mapi id 15.20.7292.036; Wed, 21 Feb 2024 03:48:26 +0000 From: "Ni, Ray" To: Gerd Hoffmann , "devel@edk2.groups.io" CC: Oliver Steffen , Laszlo Ersek , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v2 5/5] UefiCpuPkg/MpInitLib: Add support for multiple HOBs to SaveCpuMpData() Thread-Topic: [PATCH v2 5/5] UefiCpuPkg/MpInitLib: Add support for multiple HOBs to SaveCpuMpData() Thread-Index: AQHaZCU7jrJW0NQ4EE23MF21q/tOCbEUJ7IA Date: Wed, 21 Feb 2024 03:48:25 +0000 Message-ID: References: <20240220174939.1288689-1-kraxel@redhat.com> <20240220174939.1288689-6-kraxel@redhat.com> In-Reply-To: <20240220174939.1288689-6-kraxel@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|IA1PR11MB7387:EE_ x-ms-office365-filtering-correlation-id: 17231a95-7f50-4cc4-c1e1-08dc328ff58b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 46idC1TpCJi6Xx9Nfoc1w/RgGiXltjMBiNEE7bpH7j+hM5xOheJM/yJkhVlLyV8/J5dk/PVj5SNlPJSJiBzFXea6NiE0MvII0al6JRUsI3P1SShaweCm6/X8mifWTNZXPUbEYbgPXLtCnykXeUYpxzMVFo2G4Hktj1OLHI5a2BzIZiOJRMSkmpaskMIG3g44CYmc4H6OO7qDUZ1XPLQvDawebbCrKHLaRHgSnL8bhg+INdzvcr2bDX7OMF79ZNJPZYohgkE0JAoCix2aVYoMONcWUuU15Xvsyk9DKc4fi7MYZXQ4+5IKrCii3jJEmsjrVRcgzz4K0/yMcGe2nhH2jQ92aXoOyFg1LSBaAk0Vsa8nFmNM8GvzO1bl9Ykb8QY7mq0jcWHkyV94T+j+AkfpJ6B87Jqb5x+7CK78dTriZjgeVWceUV/5Ii08CdrlMWhv6MHSCltSrL/AIS8PBckAteAKAXqpgB1VDcnnT+1tzRgXavJPnfcz2UeGt+5UmbXpAXAcVgWHIKSejBWL7Wj18zpepixNGmrH/xhfYR6isp0sgzpt2nwUeUaWYjIeqpdDo6kHsqAkbLFNKK1MoKJekiyUrUh/5MQ221Rhi9KwCMAqIoPbEubhx/rNzTo9qikk x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?m3sjtIDv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By7Q7iLz/OK?= =?us-ascii?Q?j88+xrLqUdiZ7rr2hc9XqcURH2zriNJ+XYS5fbw32VITC9z8ZuDv5vw9tMi+?= =?us-ascii?Q?YuI3x32egdsCk+cRKnUXSjE8p0dtBjx2enXtF1M2Prqxvp2i6iYwj7Zhooqd?= =?us-ascii?Q?rOuVe2gFLrO90jEQn2Qq6HuNyB8Rlj4Y49RX5F0XV/tUV8EKdzC011vJHYbZ?= =?us-ascii?Q?uhcu5i/QBsIepnq8fUB+IK3jBpr95YZ4qNtC8Dk5XUTRpNC4n2xa7dqLhVV3?= =?us-ascii?Q?MpTSquBG5KvSJr/BRGNLFxuZd1EVrFYJqA4gRmFarNDenDGXQTM2NiodbrrY?= =?us-ascii?Q?8YAQi22oT5GeLULSWPWWBTbiHlak/irIeceqYZg/2hosAudG/XfTQYqJ723K?= =?us-ascii?Q?I/jSLBWBc5FEyiUPO5uNl/MtaSlbpczLYr4BgT8lcW/Hb7eFQyKmqzu/ziJT?= =?us-ascii?Q?Tdn2dkQKTOn481zq8B5RBUqybQmVQUVWpSYizDka0wjXqYlGLYakrtSBP6if?= =?us-ascii?Q?59A2+yVtmuxgcnG3IIQlGUQUIDLSnRURxvQWoPEO/lHh9pvTfMKgDJKyZyTa?= =?us-ascii?Q?3qRhiuzgEAkvi264pvj2umiyRdAItBQfHB0hEQQHzHBANMiTvQXqRG9yCTOQ?= =?us-ascii?Q?KcqyK0CF8O+qU/6y7AjXiNgjXe69s+BGSfaiUNF5VURqpIzYMPPEOIngVSIK?= =?us-ascii?Q?K98MGd/ANCM4xML7lq0=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17231a95-7f50-4cc4-c1e1-08dc328ff58b X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2024 03:48:25.8146 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BORl7R6teK7UV9S3vRlKu2/q/3qLlSqlZvltzcySbunrC70BYrQpX5AT5aXfYi39yNQqqyhJWXjQ/8m1LWeNCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB7387 X-OriginatorOrg: intel.com 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,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: dFXOxPPrjH3Xm8Eo0lA3Jd2yx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="M/C9OO6v"; 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; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") >=20 > + MaxCpusPerHob =3D (MAX_UINT16 - sizeof (EFI_HOB_GUID_TYPE) - sizeof > (MP_HAND_OFF)) / sizeof (PROCESSOR_HAND_OFF); Above formula assumes the maximum HOB length could be 0xFFFF. But actually the maximum HOB length could be only 0xFFF8 because PeiCore::PeiCreateHob() contains following logic: if (0x10000 - Length <=3D 0x7) { return EFI_INVALID_PARAMETER; } Length =3D (UINT16)((Length + 0x7) & (~0x7)); The if-check is to guarantee (Length + 0x7) & ~0x7 doesn't produce value 0 when the Length > 0xFFF8. So, that means the formula should use 0xFFF8 instead of 0xFFFF (MAX_UINT16)= . -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115707): https://edk2.groups.io/g/devel/message/115707 Mute This Topic: https://groups.io/mt/104472313/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-