From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.11031.1674968934376147266 for ; Sat, 28 Jan 2023 21:08:55 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=BNN1HCrm; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: jiaxin.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674968934; x=1706504934; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=htr0xsYBqeAdebiz/+GiIsyGkMaHGMpeqJ5x9381UUQ=; b=BNN1HCrmst0bSJNFcZ5NMcufFUBPiiRaP1scTwqy5VhfTqzl2cLzURNK sQ67EIEfFjwxAHupQQcHHwmKL6eCaBKKQCspIF0LQHXtNXW6jR5ZADI+5 TbtCuS59GIc74WLGZdKTgs0xn24C3WqN1xwntXtVj0wTT4dRjia1M7MAd fyATpnUzuS20CZlLiGzNrcV1c40a6wVOwqGNFxQ3w8Jne+FtV+wnpX4Dy E++BBLppLDxmqvi/T/tivyprZdEzE69Q5KmSoUZFks+UTV1DR2j15/f9f BSlWCY7WN5ZrWe32rxn6xpM7NVp54ujOEi75fFoT3MgI6/atB2eeBMDvk g==; X-IronPort-AV: E=McAfee;i="6500,9779,10604"; a="307012806" X-IronPort-AV: E=Sophos;i="5.97,254,1669104000"; d="scan'208";a="307012806" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2023 21:08:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10604"; a="613645927" X-IronPort-AV: E=Sophos;i="5.97,254,1669104000"; d="scan'208";a="613645927" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 28 Jan 2023 21:08:53 -0800 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.16; Sat, 28 Jan 2023 21:08:53 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.16; Sat, 28 Jan 2023 21:08:52 -0800 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.16 via Frontend Transport; Sat, 28 Jan 2023 21:08:52 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) 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.16; Sat, 28 Jan 2023 21:08:52 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DZfHCrSAFDkhttaAQVGfCDZVbWwkOMF5vwk/2FI5krOY6vxtBa0HhkAQKx+t+fE35+2xc6jLbl0ZN1BFsYWHBcPAwMl7deEyy4QPwX842p6uw36wij/jyn5SoDy7xXbCenlg6JTHHaVeANHQ6D6TYovUC0e+BHjWFKBrF7GV4hdv92S6MX3MHbzcoOPvC0SkTbMjjbnUYD+EFIogrwo/MeCmbL+BKmHsS+Pi/mnLwpAStdOSkTFYC+AS+A9/lTzwGPW5jAf6LWokLL6JMhiwU1/VeMgC/hWcJvR/qpx6TavmUDRAqp6lIMx3N2iz5RUEmHV024Qav7VrLN1z80xr0w== 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=9jPE8p1FQzjxQ92F6HMQyjWRMvQ92MxPVytVA5UvYMw=; b=bIMc/tYPc0S+mnFaDBAWMY+ZtSE/Z2dPbPyF1o3xJjYQSwvobPb6HLkmqgTMHiBr1emoW8RQdFWXQ/CjLtsAJROihEbebwKjNsOumovLByh25OPXYYQDr3svmV0ySoy2XRpJk9y5722LmMIvAnCkBn47r5glXPE3K4CfJteuFPbjup7+n3lSZ8ULUeVW+VLALA/hoPDxfgNtRHJdp1oGlXl6cNwr6xU2dL5+mOJk0TJVSluYJVo+PAvpx0coBLSzbhYtI3OacSdAHXQkIL5dbAc6YgdwGpP7W4rG46E8KKh5uErIs9f+Ejady+luuqmHvovCUrvhPdiul9nON7i6wA== 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 Received: from MN0PR11MB6158.namprd11.prod.outlook.com (2603:10b6:208:3ca::18) by MW3PR11MB4586.namprd11.prod.outlook.com (2603:10b6:303:5e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.28; Sun, 29 Jan 2023 05:08:50 +0000 Received: from MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::e5d9:d16e:172b:aa01]) by MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::e5d9:d16e:172b:aa01%3]) with mapi id 15.20.6043.030; Sun, 29 Jan 2023 05:08:50 +0000 From: "Wu, Jiaxin" To: Gerd Hoffmann , "Ni, Ray" CC: "devel@edk2.groups.io" , "Dong, Eric" , "Zeng, Star" , Laszlo Ersek , "Kumar, Rahul R" , "Kinney, Michael D" , "Zimmer, Vincent" Subject: Re: [PATCH v3 1/5] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data Thread-Topic: [PATCH v3 1/5] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data Thread-Index: AQHZK05nsd04206oLkSe/mEyxrQqIa6lVGwAgA+UPrA= Date: Sun, 29 Jan 2023 05:08:49 +0000 Message-ID: References: <20230118095620.9860-1-jiaxin.wu@intel.com> <20230118095620.9860-2-jiaxin.wu@intel.com> <20230118111913.xgjlxdhngzwhvf76@sirius.home.kraxel.org> <20230119071324.4xvry2vvvfdr5m5y@sirius.home.kraxel.org> In-Reply-To: <20230119071324.4xvry2vvvfdr5m5y@sirius.home.kraxel.org> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR11MB6158:EE_|MW3PR11MB4586:EE_ x-ms-office365-filtering-correlation-id: df4f2a01-0ff3-4d7d-2ed8-08db01b6e831 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 10m25Mztk3aqBXxSdva5txnNHedrvUvZXLQBk/UwkAJrGB/l6CdPoL6O+Ci1baAxZ7mHuH7yomCzSd9cBtAOihPk8ceAe/4H6FFwZ/GbXHGqloEeIs/T3YvOiCt0RO0y/DgH12i/v4ChraA5FFEUR9PnSgoVrumtg+/mk6wKVnShUJrdoKR1O+4JMJYZXXCVPsyMCkI+kg6VwPeGoTwsWC5znniGXOG8zdUGEHhJgllV8vdK24Nmjh4WIR9FTr+ztLfLMgs7D9ZR45HC7Q0gdQblL/NCMR6RWmsnYAQoGnOyUbvzRBSAJYCl7vBZyzHUqLgZ+8VMUeoeFeSQrzxBGZULDuieVavVdgGzGUs/PT10kxzLeYxAAU5PEB8Qebemyplo6vi5qQXgl7KkV1U3nvZKFNzOnTwDotvSzLUqvLRf6+kYBd2WoI3ipotT4npND8SF2dQOdjvvNFAQ0rB8UF4VAYXXv5nQy4Kws2GgigqcFOqQGMU477icqA5R15k1oAUMwG7f+7+CGbP/IcjRsvvlfxEKGsP0QAaPrA3oG3YYu3BkKCpOOCp669dngJSEAY4fwtvC24DytgqbYyH+1nkvu5NibXEAU+hjMvM1Rew00bausJlM2RGJgrODFTRtTWmlPSRJS3x8Mf0/svQC3G5AH31BCVrUyQt6aI794Is9M741wVjyt16OVX5/4x03iuEwOIwGD+ChEilYYIkd8Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR11MB6158.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(396003)(136003)(346002)(39860400002)(366004)(376002)(451199018)(4744005)(52536014)(2906002)(5660300002)(54906003)(71200400001)(316002)(110136005)(6636002)(107886003)(478600001)(7696005)(41300700001)(8936002)(66446008)(8676002)(4326008)(66556008)(76116006)(64756008)(66476007)(66946007)(55016003)(186003)(9686003)(82960400001)(6506007)(26005)(86362001)(83380400001)(38070700005)(33656002)(38100700002)(122000001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5/naPLhrlbfsJqa1N42ynBZTiR4wL9jWbAJUeAYRUUlbYZqpp7Nl1oC77Y/y?= =?us-ascii?Q?I9I4fjW2rOlsdxMTwM/dDQMT8ap+Q54xBpIGDxLZR71YFBK7/mC8yTzrmoCc?= =?us-ascii?Q?RoAeKL73GAe0/MT9ebwC975dA5KSD5BwZI0N+if0SrZHNEs+tc4IRA03i5/f?= =?us-ascii?Q?DiO93z/N3lFXYDtsuAgo32V4NP3+u+Q63VJZhaKPkF5Ns31SUn+ng59vvI/t?= =?us-ascii?Q?gfluse5k9gFacbscBRPrg5KdV1qxqU7rlAGGA+5+lcK0rED8i0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9Pn/NciTbNqR5u7VCaKuE8w2V0IX3JOCpLNfv?= =?us-ascii?Q?rB1IfHKD9oHP8UI7QdFqDveUbvNptF1jq0WQ9QdcrNiVJeQ/9iw6c1FYnfT/?= =?us-ascii?Q?X5Noq504j2FKtDttz+dM+y5ybFs8LJwBbYeUXYrvSauDCjFzvkagq5UB3CUF?= =?us-ascii?Q?NAQAK3QvPOyeuWat39j6fktJsJp+55jMQVu23UbQQqqvLVSl0k9NCFMmAdX5?= =?us-ascii?Q?MhGi/RbiS56MZ2PCuilabW9HvWrSTqiFKZCFgeN5K2smOBjAhknrhm5bUx57?= =?us-ascii?Q?uWVpj+usMjhg/e7I3nrsp4FSwKDaSBsRz9uFsNFC/VXCjLAv24UOErD6/GX3?= =?us-ascii?Q?4cC0nuK1CwhzkqPQ2A498vo8wcvyzgBdZzah1yszoLYUyvT908Tu7uKEEqg/?= =?us-ascii?Q?JV+icD+t5zTK76tTWLKDcmEkYhdM6YF1L2SsDgJE?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: df4f2a01-0ff3-4d7d-2ed8-08db01b6e831 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2023 05:08:49.3645 (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: 2s5Al2dZjCAjWI0t/KYktU0IaupLwXTIMBKiG7bByf1vaTvalfFYwIsR5Uz9bD0SrzvsB7Tc8aJiANabUEoi2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4586 Return-Path: jiaxin.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable >=20 > For the smbase case it might also be possible to store the base > address and the per-cpu entry size, then use >=20 > smbase =3D base + size * cpuindex >=20 > to calculate the per-cpu base address. Puts some restrictions on the > memory allocation (must be one big block), not sure this is possible, > that part of the code is not (yet?) posted for review. It's not a good idea that only store the start address of smbase and the pe= r-cpu entry size. There are multiple algorithms to calculate each cpu's smb= ase, if hob producer (any peim) & consumer (SMM CPU driver) use different a= lgorithm for each cpu's smbase, then there will be a big problem. So, we ne= ed straightforward provide the each processors smbase in the hob to keep th= em consistency. >=20 > take care, > Gerd