From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2A6ABD81194 for ; Thu, 18 Apr 2024 08:15:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=SlxnoC/oP+CCmWnbgIv0NHAj4tjXOTRCYzEiuntv6D8=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1713428113; v=1; b=alqv1aW1KitJLZDBuyHHOgQ6ZTCjp8+4ijTVrQTtZZtXYTGYnmHPY66DAWAHUDtSLXcl2B/y GAEA9TNaW6CkRpqIcTxguxj7BLW9gm1XuEqp0bnUs6nVu7aKmfIiaxdZN5RHSG2LNNTnjbj6wti rjiuHtTJQAXIbfFU+NiKgJdQIkAE4uuXzFwJamT2dWh+dXe7x5vEL1pWRF8oI45Qeo2oQfV4som dZnF519pvd5D1qqU+b+l0teWIsg6+DNKUANr1nWAjQRbFZ6qkTAwswM8Uuu2+bdf6/ojv1dvUKP FlE1LgsBJi+TIyTQiKTM0/1aSCo+6UWIdF7tnoid2JLKg== X-Received: by 127.0.0.2 with SMTP id xuKUYY7687511xPwwvwSHGYf; Thu, 18 Apr 2024 01:15:13 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mx.groups.io with SMTP id smtpd.web11.7810.1713428112509794993 for ; Thu, 18 Apr 2024 01:15:12 -0700 X-CSE-ConnectionGUID: AMadnuPITsiYztXzL3wRRA== X-CSE-MsgGUID: u7HOJ7BeSZuAhO5SapKDfA== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="9180269" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208,217";a="9180269" X-Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 01:15:10 -0700 X-CSE-ConnectionGUID: uKo14Cl2Se6swCtDzgmOgA== X-CSE-MsgGUID: MJmO6yKwRXOA1Iyq3o51Kw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208,217";a="27526953" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Apr 2024 01:15:10 -0700 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 18 Apr 2024 01:15:09 -0700 X-Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 18 Apr 2024 01:15:09 -0700 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 18 Apr 2024 01:15:09 -0700 X-Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.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; Thu, 18 Apr 2024 01:15:08 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.31; Thu, 18 Apr 2024 08:15:06 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c%7]) with mapi id 15.20.7472.037; Thu, 18 Apr 2024 08:15:06 +0000 From: "Ni, Ray" To: "Wu, Jiaxin" , "devel@edk2.groups.io" CC: "Zeng, Star" , Gerd Hoffmann , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v3 13/13] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic Thread-Topic: [PATCH v3 13/13] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic Thread-Index: AQHakV2SyGjvJ0Dg90a9fnXG0xvogbFtqjKa Date: Thu, 18 Apr 2024 08:15:06 +0000 Message-ID: References: <20240418065556.5696-1-jiaxin.wu@intel.com> <20240418065556.5696-14-jiaxin.wu@intel.com> In-Reply-To: <20240418065556.5696-14-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|CO1PR11MB4929:EE_ x-ms-office365-filtering-correlation-id: cfc6050a-e481-4797-d805-08dc5f7fa80d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: JayKWWNhyb/d+EFc9LhzB5IqCN0Oy04Ru+AiWeSvyJdxXDebgCyB9riTNfl0EWYuq0hRy43dtgAf0Kt7WMen8sRZ32EUn5i452oWIfMYb5m7rG5CDzEHX3B71d01+x1yAVci1x/+YxUkdZMmWyLW7HtbzZ4JYsvf96VazjOzFHCGL5eXNWIv3YFNQLs9LRxLZzQbDuT+A3dJITvRjlD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jZeFO8QWRqAKPYK5Ztd69aedpKd2+KGRmUu3mahbfkYNxP7ZPD8fIX?= =?iso-8859-1?Q?6eThdfzsJByCqE3Lulxt+Re5iad69Qvwhcj9wLE10oFWYVqvDDdt8id66H?= =?iso-8859-1?Q?+JSBz3jxgytpFqZlbCdp2pMdfU4zY73cUd6gCMoX67gNXu0XzmLH0M0iqo?= =?iso-8859-1?Q?RJT1GLkbVYvPQgliU1YYsyDcgody5tudPIxChG/uAVCtRZkBZ5QcFnEsnS?= =?iso-8859-1?Q?zZjtkx3+b9xvqG6b5y2J/vnrpdb6myaEMTiZtTxy7Wi7sDxwUbj87uPxvy?= =?iso-8859-1?Q?uehcrT+A1l5ql8SkZW+GqxbY/nQ0qruqIGBBAZc3YA1TZFUQCAC8OVhG6U?= =?iso-8859-1?Q?Fx038RLtz6Z8k=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: cfc6050a-e481-4797-d805-08dc5f7fa80d X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 08:15:06.4437 (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: 53IEX08khhthZV6Z4BkJnb+XGNEAiaiTvaZtMzWJ4E3ZSGDqkoLnHSf0ietBVIvTYWjhPwqRxD5cQ3x1/zVDKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4929 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 Resent-Date: Thu, 18 Apr 2024 01:15:12 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: phpXRIixg2pkM0nhkeYvARoOx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244A2682A5DB8DD88EEBBA68C0E2MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=alqv1aW1; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 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) --_000_MN6PR11MB8244A2682A5DB8DD88EEBBA68C0E2MN6PR11MB8244namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable + // + // Check whether the Required TileSize is enough. + // + if (TileSize > SIZE_8KB) { + DEBUG ((DEBUG_ERROR, "The Range of Smbase in SMRAM is not enough -- Re= quired TileSize =3D 0x%08x, Actual TileSize =3D 0x%08x\n", TileSize, SIZE_8= KB)); + FreePool (mCpuHotPlugData.SmBase); + FreePool (gSmmCpuPrivate->ProcessorInfo); + CpuDeadLoop (); + return RETURN_BUFFER_TOO_SMALL; } [Ray] Can you move the "TileSize" check just below the original TileSize ca= lculation logic? Others look good to me. -=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 (#117967): https://edk2.groups.io/g/devel/message/117967 Mute This Topic: https://groups.io/mt/105593584/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- --_000_MN6PR11MB8244A2682A5DB8DD88EEBBA68C0E2MN6PR11MB8244namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

+  //
+  // Check whether the Required TileSize is enough.
+  //
+  if (TileSize > SIZE_8KB) {
+    DEBUG ((DEBUG_ERROR, "The Range of Smbase in SMRAM= is not enough -- Required TileSize =3D 0x%08x, Actual TileSize =3D 0x%08x\= n", TileSize, SIZE_8KB));
+    FreePool (mCpuHotPlugData.SmBase);
+    FreePool (gSmmCpuPrivate->ProcessorInfo);
+    CpuDeadLoop ();
+    return RETURN_BUFFER_TOO_SMALL;
   }

[Ray] Can you move the "TileSize" check just below the original T= ileSize calculation logic? Others look good to me.
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#117967) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB8244A2682A5DB8DD88EEBBA68C0E2MN6PR11MB8244namp_--