From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.3600.1675298644181707943 for ; Wed, 01 Feb 2023 16:44:04 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=T883bUQN; spf=pass (domain: intel.com, ip: 134.134.136.31, 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=1675298644; x=1706834644; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5j+T2W5J2kOWYCwVfhqMjG68oLsxulvhCFUAscCGR0w=; b=T883bUQNs8odpdo5chVgpND+IwH1MoxBWaze2k+1BOAeW05dp6b4jd44 a0Xdu2LuXLmON45Y3ffCLjFHl6c321v2Nl954vIpz0f0R9+fJJoC+MqKG 0abUjXEF9E6feNWR23dmuGuOEOo8Q1/Szi6BsX4oL2IrFQ1T7d1DqIWOY tGLB/NSjmyu126oTGo9sLm1LrQfAfteMLVEuZcnxqTtGetyQBtt142nTu L8Pp3jUjt/nN9a3RElGDBqbeXvQkcGnYjhu2NYtfjM5EfbM1VdTnpLzjO h0vxRfGjBeKkJJrysc8l9xYsU0fIElGdyhc+vSC5J/Ea4qcfo25bUD8PT g==; X-IronPort-AV: E=McAfee;i="6500,9779,10608"; a="390706272" X-IronPort-AV: E=Sophos;i="5.97,266,1669104000"; d="scan'208";a="390706272" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2023 16:44:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10608"; a="667101221" X-IronPort-AV: E=Sophos;i="5.97,266,1669104000"; d="scan'208";a="667101221" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga007.fm.intel.com with ESMTP; 01 Feb 2023 16:44:03 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Feb 2023 16:44:02 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 1 Feb 2023 16:44:02 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 1 Feb 2023 16:44:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=II9BywwlTwfKp5zmWBTpTjdDMrUPkZ+sKb8xdFBGggxrmUee8sTNchSJqn0GqZdT2fvdX1zhhvIYDJs54rdWXXoFnvcBfVJ6d9Uf0LpUDhjN+xqxON/SqubXoWLnWkkf3JoRsJIdnEpIZr1gVio1TUt8R341siTgUd/GiwlNF3uyyNxALmQ66bDacl7crgjkPrXzZ/9OOJ5JVwlcirPCbNjyFJNJCvn/LY/LCzvpdYRZdw/Na9DNmi9sSXxLvXF3Gvw4nz49V1aDmr07GtbjriQM5/zNLozZLI8pqLMmAP2Vgb1qF+rDFY/Ueom//GxEIP2onLfPePL9ww2j1twPNQ== 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=L5QDGV2m7dSthCIgzSWvtR1EBSDbktcOF2s8EjGWXdk=; b=D4vd7RzlEgdezT4m9Du2t5BUQ6b6tDzQy0Dzld0cjQtQ6AmRX/5Q6IeteV1/33N2tEjAxaLaIDlcZNgS4tXx6NLt8ySo8FS4/M6cxbAelYrJQevsas6f5wUefnZlUIyIVzqa7h4L8mCd/D5ZxceM/gBJiLcbIk0qf0yvkkSALInzZ5/libt4qUvY5+he/k+jdB586iWJRDINUjp2kJVmNOUOuaDOH6kanUSanGuu1kvgjx0003ZvfpeR2zsoiSvg9lnqDeaDzFGIYCz/xCFjvmMX3kzhMGnpg6qKV1SzaWqS/fEzwc2VJD5bg+zUfNxSmP0s2dHGTrLK90gRG839JQ== 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 BL1PR11MB6049.namprd11.prod.outlook.com (2603:10b6:208:391::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.24; Thu, 2 Feb 2023 00:44:00 +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.036; Thu, 2 Feb 2023 00:44:00 +0000 From: "Wu, Jiaxin" To: Gerd Hoffmann CC: Laszlo Ersek , "Ni, Ray" , "devel@edk2.groups.io" , "Dong, Eric" , "Zeng, Star" , "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/mEyxrQqIa6m+b4AgA3P2TCABV4gAIAAu+CA Date: Thu, 2 Feb 2023 00:44:00 +0000 Message-ID: References: <20230118095620.9860-1-jiaxin.wu@intel.com> <20230118095620.9860-2-jiaxin.wu@intel.com> <20230118111913.xgjlxdhngzwhvf76@sirius.home.kraxel.org> <8142cc40-ca21-2748-a3de-d0432ccbdc07@redhat.com> <20230201131450.qygfyr4t3uidj7z6@sirius.home.kraxel.org> In-Reply-To: <20230201131450.qygfyr4t3uidj7z6@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_|BL1PR11MB6049:EE_ x-ms-office365-filtering-correlation-id: 20a8c54a-f3ff-47de-1ea0-08db04b69339 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hEw1FSemzgkrqnflvA2xZPIvo3vdbwwoU72FrmsLDBdCSjfQtNEwfIhfZqBAXrV9wmzXPD+BHUyiO1neoHnmyAaWZSrpLhjyYdFlFBSz9IttuNZjfPNtMBaCvRLgfbjmFAMWY+A67g9PG2YHj335t7gYUBI2vHR7v32IX3fW2FFP/XU51FLLZHEBhdypd1McZeGrXUBB4qZ0wKswDZLOweY8PI4SFb3CHeOpSVAJXnu8gTxUWCjWSpehG5x83JnnEtPp1LUQF9DHKKRKvQ4UkM/j37903A2srZ2NegCMKSxa/igSDDB6IBdhzX8DKN0RYF4ZNcQuSghktVGiQDZGdBaBlbyZsOj3yxVDcF8E1YnKwCo5vxxssYAI5twDlhZKtCxMhJI+aGl5kVgMfmY8GzKvxoLB02pGbRGqUo5fUImJML2CeLzIECdJEPcIIi/jGZ3pzLqulMiMW5j6iuxdT5x+StX6PGhcE8xkmgIv3rEPH7G5Z0sk69NnrTxrJUigtuL4BWLR4MZOqdu+TduG/mANTaJBjLhlQDXI+qczrUj9PXFNJogik3RCtYnIyOWRJRihbzGE+2iNJvOAmpM4+xz1LMiiCQWAj21rV7VhPOBciX9pBfjSZ8YwXHRiWFvboXCx18eQpsoLEPFu+kFdlVnQM+vLZ1oYYNsFlxcrfa7klo7HwMY9QoQcUfOocft0VHL1WyuoHHbrC5h0EiPx8A== 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)(136003)(396003)(346002)(376002)(366004)(39860400002)(451199018)(122000001)(5660300002)(6506007)(38100700002)(107886003)(9686003)(55016003)(83380400001)(41300700001)(33656002)(86362001)(186003)(26005)(38070700005)(316002)(2906002)(52536014)(71200400001)(8936002)(76116006)(66946007)(66556008)(66476007)(64756008)(66446008)(7696005)(4326008)(54906003)(478600001)(6916009)(82960400001)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sJoXnBzCs9n29O1NzFMe1cusizgSpzQAVnrC1VcwmFAx/YVCJJ7KHIEBsYsH?= =?us-ascii?Q?04w7C+5Ke6aIBvkbhO3cq3CCesNO6Sv0p9YmunR8TP3i7imNbgUmETjAuMLQ?= =?us-ascii?Q?kYgE+pcCrTn4gRug6iyAjDvfyzLjpV/mRUggyTDPFucScB8i7G+mBvyR7cLW?= =?us-ascii?Q?sjIuz/W7bXaW7nN/ipDksOxSos89qgYGny0WXShE5+z8arKRabxwJipYthlF?= =?us-ascii?Q?PddCk9CzQ+ew7Tuefo4L/LsCAw9mYRVnSG3Qh7VTF2FsgoDo7eqWdWFNqH5M?= =?us-ascii?Q?v77pyMgKHbbmCQqT206Dkz8GSWlXZsRR4dCgCGnxyl5XwnoMgpTfH3NEq7Bc?= =?us-ascii?Q?1Zdm5nzFD9JjZYn9CApHF6zbGb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-ascii?Q?A4jUtvhhNc3mAbhBS8NbKJpAA7CpSALxw3pbLW89vrSAAQ9Vq4GCDHlXa0P6?= =?us-ascii?Q?i2p+ZhRehQin4wxWa8edNWDUIhXzTHEYqvCqu277pOBpZkqjq+VosTtpnFfV?= =?us-ascii?Q?qjT8Tj0H3bPlzR1GGd+mqhk6acmebgyg6IRYDoyyA0DiQcpPDfoo2uNcKAfV?= =?us-ascii?Q?R0e5Mn2TAyaxJsKG+0H5gR7mquTYg6rPz+a73NIHpbwF+lRMSXE6k3R1tm15?= =?us-ascii?Q?K44y+8m1pglrBiarF5UMTJXjt+ZM7CeAE9pf9ACKMgayAqHbUI67ywjJ4wrI?= =?us-ascii?Q?BDPzUt1S9OQM0ygjzjo2HtTa2Lc5BY/jLc0g8fjx?= 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: 20a8c54a-f3ff-47de-1ea0-08db04b69339 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2023 00:44:00.3141 (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: XTPz1YS7MiMqR7jDFSNHcBaDaXs6RND0osTDB7ts7MVp32fo1eSETfDF3PE0qIe8pjy0iR29rgZlp1LnWsfi9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB6049 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 > Probably just nobody expected that big hobs being ever needed when this > was designed looooong ago. >=20 > But as laszlo outlined: There is the option to use a page allocation > for the array and store a pointer to the array in the HOB. Which is > probably the simplest approach given you have a single, linear array > then. >=20 Pointer is not the right direction usage in the HOB, it will still bring th= e complexity in standalone MM part. Because we need duplicate the same hobs= for Standalone MM usage, if the hobs contains the point, it will bring ano= ther steps to allocate the buffer again for SMM usage. > > For smbase case: I doubt CpuIndex is really required, because we can't > > avoid define another hob, and we can't avoid add statement for each > > hob cpu ranges (0 - 8191, 8192 - 16382,...), then what's meaning for > > the CpuIndex, we don't expect hob producer create smaller granularity > > CPU ranges that one hob CpuIndex associate with previous NumberOfCpus. >=20 > With multiple HOBs the consumer needs to know which HOB covers which CPU > range. So in addition to the number of cpus covered by the HOB you also > need to know what the first CPU is. >=20 I original thought that we can fix the CPU ranges for each CPU hob, but it = does need define the new hob guid again and again. Well, one hob guid with = cpuindex is fine. =20 > take care, > Gerd