From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web12.1452.1649294721398909963 for ; Wed, 06 Apr 2022 18:25:21 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=DX1amao6; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: ted.kuo@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649294721; x=1680830721; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=uXv5DE/3HptB5t7vC1wFpzIJIkh55abGSV6ncaikBCI=; b=DX1amao6UTT7VpJRTbXuTkYtQtJONXauqWsHupYiY/L0G4vmuHtbWXar TGLRbtzcPsWTdhw2uihVBlVmHMi30gmwH5wU0yCJbq93C9PeNXUpiAC1+ v4BowV7F6O/DKm8JIht/TYEvRKREC8x1VrLNrTXXVSieUxyV1qFH4UFfu wYHnKI2dGd6SdnrMtIr04314LVQaE3q/g0Sh/vUOqVzRGHPBcW2ypucPv oJ/LTrrcnhHa5zLpBHDKWQa0BogthhPBNbZHwKvlndIVWLtrngpf0tIi9 ohxK8ILmg0VN4YvQMFwO1Z0VV/0dj1YR9niHPgjsEOUHxlDWu3TyTDDw5 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="258790703" X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="258790703" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 18:25:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="851490355" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga005.fm.intel.com with ESMTP; 06 Apr 2022 18:25:20 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 6 Apr 2022 18:25:20 -0700 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.2308.27 via Frontend Transport; Wed, 6 Apr 2022 18:25:20 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) 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.2308.27; Wed, 6 Apr 2022 18:25:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mz399eYzGo7VjqsBJaS4mLGT4dcHmtWNsPZsyoPULQpnao/owrvBs7XpRvxZwGz0C6+eycFEyXF+axtDrb7hNYgpHo5OgTMX7TBCkFx38P2gSVhCbQd/rlJjj7VEq0w1C4wotY7GBNerGDlIDgMbpNxrMDtaAPzZ8FWfz6SzFiQr8E8fdcNePCV4Bawyy5VT0wejxE0ffsyLwSK9MU/wdwLSYafIxwCyJ2SPkIHBiC4CiuVJJhp7BfyvQVrOk4wHSZglukiqLipW680a3Gs7+H+0Hfu7BGwuAokYt89J/4aQPSrDiGmBrBG4sGA0B40ea5nCAXG5upiJyJdeygDqyA== 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=hzKnwB8jFRljNzBA2q0ZVaOuHZPEoBajDtfabFQflAw=; b=ELocjzLBn4/i/WOFvbqbjQVfbrSy5tVt6zpuwhN3l8C/krLhnTSApSsD5mX5K8pIaL9amPxN2dByDr9RZrejMO5xT7c0swR0udNdrPw9XJ8EMeGIW4FQuBl3MeZAhCW9zSqDJSEXb5RRaB4Af3BOm5wpvjTTKz6jItPcmVLyytzrhB8FAOe3vUTjSmHTD7GHXAFa64ecasvvAdUjJzSh2yQW5FNvOHlQ2Nweu6Eq3sEgzQIQSNHs5lOOQ3l+zsOiTYzuLEZKkPjLi29mFCaA+E4m/ecvvrSBFabCHmjjIReR34aTwKOS7BdT3auen5utc2CtMvi71dnh3IWW921YaQ== 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 MW5PR11MB5932.namprd11.prod.outlook.com (2603:10b6:303:1a2::5) by CH0PR11MB5395.namprd11.prod.outlook.com (2603:10b6:610:ba::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Thu, 7 Apr 2022 01:25:18 +0000 Received: from MW5PR11MB5932.namprd11.prod.outlook.com ([fe80::99c1:4af2:442d:4ffa]) by MW5PR11MB5932.namprd11.prod.outlook.com ([fe80::99c1:4af2:442d:4ffa%7]) with mapi id 15.20.5123.031; Thu, 7 Apr 2022 01:25:17 +0000 From: "Kuo, Ted" To: Andrew Fish , "devel@edk2.groups.io" , "Ni, Ray" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" , "Zeng, Star" , "S, Ashraf Ali" Subject: Re: [edk2-devel][PATCH v3 1/8] IntelFsp2Pkg: X64 compatible changes to support PEI in 64bit Thread-Topic: [edk2-devel][PATCH v3 1/8] IntelFsp2Pkg: X64 compatible changes to support PEI in 64bit Thread-Index: AQHYShIakhn/0x83K0ajwN72AFoYyazjklEAgAAUl5A= Date: Thu, 7 Apr 2022 01:25:17 +0000 Message-ID: References: <584D9D92-ADCC-4DE0-A506-70363B642D0A@apple.com> In-Reply-To: <584D9D92-ADCC-4DE0-A506-70363B642D0A@apple.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 859496b9-e620-4757-aab0-08da1835795a x-ms-traffictypediagnostic: CH0PR11MB5395:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UsK67hO2vtxhHW4ipPLi5IKnhyyZG9YezSo8mFZDbBF96aX+ogUht5UOY5XfdcD5PcRff6eozJ/CwuVS0Bpa97fr9e0w7r4O6AwJHMVhskh3QPlH4NWDwYrdJz8EYlO+/vWGENYyl7BDJBUoz2HoDPCE9tBpJAk4b69uf+TI7SJD8Cp5xGIdqChkvSIUhy9V+qkwLgV74LwyLXtqv3yP/w73CQ/A0FkK59FGACG7KEeksJElfaDxW+LOOWCQ9yTz1T1/ycO1jmiHlQOnUlfhCH8RY1U/HlyM2a/4OcRljEMNKCwGBxUvh8GGrjmC8vgVZBFV6L7jGWPmaoxZqxGnt8WUQc84IcJ/KW0+S2APuhVCY+NYz43K6+FwVRo0r2pa/pUaA7dqarTAIdX+vtuN3SpyvHyue0OyS5rby23anKBS+s9+fxG8rz5LEunkHzwaGCTY9YwPIaz5oSx9LMkdISxYTS1GesefWfYLMZ2Ak1hlGwf5/2PlOfEppNRFrK4dTRhsMBGmI6wMSOigFMtedWPtRkZ4sXTuRcHpdfuR9X+1fbqVafIZ/Wq2TZNlKwXN+oINa6V86Mt7nQvC9kyEezn+8ZdfFVIQbdGfgivnnAcvKJtNy5xzSyL+tzA13Fw4QRiU2g/8YvdJYVzGgZYdI8cB35m+Pn5wwWNPdUOmGtpOf4bhFeyBQQqGj2GgHXI2P7HM3UEjaysEyYZ7dI7Nzwy/9G82VIGKz7t3zUQYcMyPjKrBgN3ZEQHu2CrDx4aJNffi8vKbEuAsxXAimHp6X82C7wKHtFG1Af8MIHrJBJyOcBLevQxr4s2hsp4YrL+dOY1myzyNOM8SNF9+o1qARQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR11MB5932.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(186003)(26005)(5660300002)(107886003)(33656002)(2906002)(82960400001)(38070700005)(19627235002)(76116006)(8936002)(52536014)(38100700002)(8676002)(6636002)(66556008)(66946007)(53546011)(7696005)(64756008)(66446008)(508600001)(66476007)(6506007)(9686003)(4326008)(122000001)(110136005)(86362001)(966005)(54906003)(71200400001)(55016003)(83380400001)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?v3iR2bvSJP+Oj0gwTndLlBtURPwLq+lhYRP7jpo2nT4RYwbe6RkeiaBmP3Vt?= =?us-ascii?Q?Cedpu4gYRzriNLAoh4ZzhXDX/r4vdzySkfanzJDCQb+A2dDNfosUkHU/togh?= =?us-ascii?Q?aTAsyAKbPH5gn0Id5TGUKvvokyTeQDatxRmMeTNe6Ru/fGxMgkfIHpr8hRhX?= =?us-ascii?Q?8b7tTO+E4KJPR/iJNaX/zRLubRLvGXQM1bcbtMosuUp3nIGbY3QGGNCA9tke?= =?us-ascii?Q?gHXndIsA2Eh7enrn0q+luTPoDCPkxXrJ6vzAZo6pPQGUhVM+crh8hyZoRYrz?= =?us-ascii?Q?5G30nc1J0q5pLmmifOiZLMDzlSd+oPCurxguLc2nQG8s4TOZ10CFHaQGJ6IL?= =?us-ascii?Q?qWlLhs+pgGKliAsVYaLurDXRzdu5lgZ0KcczE72HNqe+NFNByOGcKt634z/Y?=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tJHjgD9IwtvyoUfIN48+9I8Qf?= =?us-ascii?Q?2+63THF/Kt36Mkoi8YgrR0l0JAxPKZlpGOej0w6p3VXh3WVrEDRu33WDblpV?= =?us-ascii?Q?XrpO6z0jgptAX/RjxA7tfEA6Hq4qNuxQW4+2wfNDi4OjGsJj0onhMjvpImFQ?= =?us-ascii?Q?dkeCrnM4dxgilpH+3atzSScspesolT85OTq0CDZMZ7kRtixvQSfoZ/TcckT8?= =?us-ascii?Q?Ib2abzFSR7AXHWprnvIrjDcO9VeG5uex/U3rajwRKJ0olBRWcj4uViv0d4u3?= =?us-ascii?Q?IVyZAUKt50BmxNo8AOCOItD6f5lQLIrKyFHKtAtZ7tttfHIyXFaxsdPig3lH?= =?us-ascii?Q?Gid5Xy40UipOMtazFqlIe8ni+6iYKDZxF/H01Wfq/yNLZRayD53mSLav+Twd?= =?us-ascii?Q?2PFE81HUqDVzSmJyHEL20QHNMACm70scCUecPBMeL/Xt3JewkWxoIrzdYHlc?= =?us-ascii?Q?vE1TXoluLQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5932.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 859496b9-e620-4757-aab0-08da1835795a X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2022 01:25:17.3258 (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: pXIgF3o5JvsDaACwYficevqPzP8W2sqaaHjarRGSVdKk4BdxoOrfmCe+G/E4pZkpCgKMH1tYsMVSXBiESva92Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5395 Return-Path: ted.kuo@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Andrew, Please see my inline comment. Thanks, Ted -----Original Message----- From: Andrew Fish =20 Sent: Thursday, April 7, 2022 8:06 AM To: devel@edk2.groups.io; Ni, Ray Cc: Kuo, Ted ; Chiu, Chasel ; Des= imone, Nathaniel L ; Zeng, Star ; S, Ashraf Ali Subject: Re: [edk2-devel][PATCH v3 1/8] IntelFsp2Pkg: X64 compatible change= s to support PEI in 64bit > On Apr 6, 2022, at 4:57 PM, Ni, Ray wrote: >=20 >> -; UINT32 >> +; UINTN >> ; EFIAPI >> -; AsmReadEsp ( >> +; AsmReadStackPointer ( >> ; VOID >> ; ); >> ;-----------------------------------------------------------------------= ------- >> -global ASM_PFX(AsmReadEsp) >> -ASM_PFX(AsmReadEsp): >> +global ASM_PFX(AsmReadStackPointer) >> +ASM_PFX(AsmReadStackPointer): >> mov eax, esp >> ret >>=20 >=20 > I guess it's possible that bootloader sets up the stack above 4G. > If that's the case, above code doesn't work. >=20 >=20 Is there an issue with the SecSwitchStack too? [Ted]: I believe we already handled it in IntelFsp2Pkg/FspSecCore/X64/Stack= .nasm in the patch [edk2-devel][PATCH v3 4/8] IntelFsp2Pkg: FspSecCore supp= ort for X64. Thanks, Andrew Fish >=20 >=20 >=20 >=20