From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web09.17307.1657676389127271619 for ; Tue, 12 Jul 2022 18:39:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=iqzcqYcQ; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657676389; x=1689212389; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=b5TaDAvMv8VMgTphX05Ue94Wol04jbzRaJIdrvUyWb0=; b=iqzcqYcQleWkAFb8xGGNmm6oyp2OEqKfsDXkuKjesNgikFpQFwY/m2VU Z189cHiFBcJf15RhRf3RIrjI4m0C6/1C6lbkCK4xQxqleGTAWgVVKHO6S MpJm9mxhofQmPXblj5fu8hcMiuJwuQBxxsmNu3HMRllT6FLjFB/WNEOg3 KolE9jicn6Ei3pCR+9M5F+GI0SSnq7grRs5KzPGGHShZ8BnDyV7+JrrUe ISy9xMl0ueAxs33BiO/wmALkacBbSuy07Dbi7bno0KZ5rOBFEuLOcLozR x1B1gVOe97kZfX9eBM66St9tPe6E0cM1/WKTGK8QLQMzHDEYWRn6kt1w6 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10406"; a="285108749" X-IronPort-AV: E=Sophos;i="5.92,266,1650956400"; d="scan'208";a="285108749" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 18:39:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,266,1650956400"; d="scan'208";a="545649588" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 12 Jul 2022 18:39:47 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 12 Jul 2022 18:39:47 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 12 Jul 2022 18:39:47 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 12 Jul 2022 18:39:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZKYm5Kcl4kShT77xx8mIbVa1YL0jAoZvZwVebLDJW+X6AHlsNUZVLFOBq681pxBZ0ffO5zJXN4HpSV/Sp9ewz7DnYk71V43umQ5RspSmx9lTDVOm6ni5Z6DqRtjhpSoKK5Xup6UIsu7FqFxn1GveuSNpzbs0SVbrgwGqeGsT77Hvva8aCTBJEDl0Pfrc3FtTTplZ5+tSJPQ3JDI7PKeMVkUuzJ77onsdfCkBeBFHkG9p58EihPEmSYCLoTSHpEUJb7jpCDn1N1wZxQI4LqCFwDVIbR7240Jw0x2U2X66lAhnmtCfP/JDhsTiR7C39jGBWazDwQQMTqeIVdLtSeL/9A== 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=fHiPEivYCEcu+7Xg/i/oljOw762hxrMHMX1V2KJ/SHc=; b=Gujn16+zqQpQY/+Wb9zl1gkAZIMZnt2zykb3iWlyog/f4z0gC5YLEyPpqjtBhTvbqU4UHiRCzpb9SsPK6P5t2SxqJ6gZslFlWcTaWAryEo1VRRw5DIBqSm3UBQMf4pS8mJwowqdZV0BsDyk9FgnlMs+UXURnLS4x/Rk5Bx3ZK+BiloJomE3UBwfqg5tzDDsILartWJx6yJSLR6xgxbaTluTFfFJvo7EzY9W+qIiOAboMcnRW6txAL8sj7DmvbjAvTvuuyTIHRzzVWAumuwUnFFVhnzKR0mccTnPPyhkNPtKXTAMIT3C/QEOiWI/2D7/LcQZD/0w9OOa6JTqS2mKR1w== 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 MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by SJ0PR11MB5165.namprd11.prod.outlook.com (2603:10b6:a03:2ad::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.16; Wed, 13 Jul 2022 01:39:44 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174%10]) with mapi id 15.20.5417.026; Wed, 13 Jul 2022 01:39:43 +0000 From: "Ni, Ray" To: "Kuo, Ted" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" , "S, Ashraf Ali" , "De, Debkumar" , "Han, Harry" , "West, Catharine" Subject: Re: [edk2-devel][PATCH v2 1/2] UefiCpuPkg: Update SEC_IDT_TABLE struct Thread-Topic: [edk2-devel][PATCH v2 1/2] UefiCpuPkg: Update SEC_IDT_TABLE struct Thread-Index: AQHYldIw6XD4LqWmbECN8nTp/To53q17hxsQ Date: Wed, 13 Jul 2022 01:39:43 +0000 Message-ID: References: In-Reply-To: Accept-Language: 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-office365-filtering-correlation-id: 39c52753-c1ff-4aff-a8e0-08da64708fcc x-ms-traffictypediagnostic: SJ0PR11MB5165:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pVKEs7efahIWJ4dqO+gzUhlbGpoT0OhRRUsjDYO1A0dsT+/+LKxi9keLTzdoUDrIRgcItKC4U5Ek3FZR36/TvzHkZ6ii6OKXk8gdiUESZeoXdccvv/o9SzltgYebGXbSPaXK/WRfthGO+FKlF2pZqGZXxkaJL6mX9+k224dOb7gVimD/f/vDqdBqnLzP5dPfQqPEdeB8mRRnLkSroLEVtE3/g6uO0Zm4gQPir22UI50nmoS/NcYOQvjxSBsSXj9aoDtBIexul+Moq68Ja2DAoAs2++F2e8k1+1C2Kbf3Fn089LZZJqlDF8wYK8O0fq7lUMEasvxmnY8JYnywvs75CPNZh8AoXZtoQvPkku3rbijjRjQ/oCrXHSJc7YUq8iCKii0NbM+7XbdAY0OOy4LjjFy2yG2wdFxwEoDJMRHJl7asD1Ecb2M+IvSTSDtN6WJddYyV/9wG0fDEHtrZWh5mbY2edPQz0Q3sNS59o5HXs6zH4Mns8grs+3I6qB6qcAUQQbpyFyjxym8qf6G7TEO6jK7WpoF9EVPlZdfdaZxjiSqNpphrUT77mz8Hqb4EDD3axrjOL+zX9gpO0ZkRSd3Uwjn5kqFOqUfqh7XsitUGo+h7RBGAa8wfC0W55AqJChmB5A/qcVsXqvd9ZjB/CCzKlbqHE7YKoWLaAATluA856DGPK9BP3JL4aXd9gJmDtY4rKyLz6nKn93i3457zzh71HA4EQiyOjUSeFAy/ZeQig/TnrK3ztkjFAzseLtMC6ZP7SnYd2skStSSwnDtylvGUclEE1jIfMYatw+xt6LgySDJWT4sjErwYr+DscaDxXooU8kr70fRbD7qLTkG8oThM/PjXGPMswdcniH/L+g9qA7E= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(366004)(346002)(376002)(136003)(396003)(15650500001)(82960400001)(8936002)(5660300002)(53546011)(52536014)(55016003)(9686003)(83380400001)(8676002)(33656002)(66946007)(41300700001)(38100700002)(2906002)(110136005)(122000001)(478600001)(7696005)(64756008)(66556008)(4326008)(186003)(54906003)(107886003)(76116006)(66446008)(316002)(86362001)(6506007)(71200400001)(66476007)(26005)(38070700005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?M7K7y0JTuvVzq4vrOcUfQ/2OoAlUtovg4H97asWv0j2WmqrzSBHDmKsfLuZa?= =?us-ascii?Q?GwtUmTi3g3Izv3egc5mI0v0A8F3BILCOmL9X6P4mc48uw2695ir02Wu78zGl?= =?us-ascii?Q?w6853xHuhY2+H1u81Cpf6Yid8N2Vl3Waj05ikv7VGvMjXt8+uDArRcTzVpAY?= =?us-ascii?Q?8EJnzp7gAW/wiHaPcM3XDqPMypCvxohxEv37bVO5qKOmlU4NhsD2jPtDiIp7?= =?us-ascii?Q?9AnBLaNH1A528ByXA2qqjK5XYI0C/o/XOHJPXIKWbPAEoiJjVHNOy1VDO+8Z?= =?us-ascii?Q?qQGi4hZkXWBQz2VxM/c0Y/JdyBctQIPx01bvQPewPlHt47dCdS320OMglSNx?= =?us-ascii?Q?V0AUZWfAEH/WYRg+s4I0qGZxQLjLCcM0lCS0wsBhdRPvHg8Pf3HVs0lgD8O+?= =?us-ascii?Q?hjin8lwVEheZoYYncvQcju/ee7vgxfoUeMIqPZAD70l7NqokNbVGqs061WbR?= =?us-ascii?Q?yMTwtIHSfSrqRu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l?= =?us-ascii?Q?VTpozJ7fWSypQbaPLa9mA2Grnc8/j6o9rw0bbd6FAC3TrXn+d43W9Yu/hUNV?= =?us-ascii?Q?lctXR17zaY+MaQWvmwad04e/RDV5c72GLsl76D8/cfadM850zlnfAwFoBoOW?= =?us-ascii?Q?07ynRDsGTprveOZXa+ZyQrkYZGMe5suHmSTNK0KL1I5d8o8QVd3wlAQNbbiW?= =?us-ascii?Q?IYe4mhRd1nkeJD4YQtY=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39c52753-c1ff-4aff-a8e0-08da64708fcc X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2022 01:39:43.7703 (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: 8t5fEP1XVP5pgpwpfOwjvbuc75cUE9z9mn59u1s6yHQEBtfDmIEXcFo/oFA0MB0JC/0xClPspAjPb7/rEfFs3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5165 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I don't see any change comparing this against v1. Reviewed-by: Ray Ni > -----Original Message----- > From: Kuo, Ted > Sent: Tuesday, July 12, 2022 5:31 PM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Ni, Ray > ; S, Ashraf Ali ; De, Debkumar = ; Han, Harry > ; West, Catharine > Subject: [edk2-devel][PATCH v2 1/2] UefiCpuPkg: Update SEC_IDT_TABLE stru= ct >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3957 > The reserved IDT table size in SecCore is too small for X64. Changed the = type > of IdtTable in SEC_IDT_TABLE from UINT64 to IA32_IDT_GATE_DESCRIPTOR to h= ave > sufficient size reserved in IdtTable for X64. dff >=20 > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Ray Ni > Cc: Ashraf Ali S > Cc: Debkumar De > Cc: Harry Han > Cc: Catharine West > Signed-off-by: Ted Kuo > --- > UefiCpuPkg/SecCore/SecMain.c | 1 + > UefiCpuPkg/SecCore/SecMain.h | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c > index 4edf0ce972..fe03d8019a 100644 > --- a/UefiCpuPkg/SecCore/SecMain.c > +++ b/UefiCpuPkg/SecCore/SecMain.c > @@ -211,6 +211,7 @@ SecStartup ( >=20 >=20 > IdtTableInStack.PeiService =3D 0; >=20 > for (Index =3D 0; Index < SEC_IDT_ENTRY_COUNT; Index++) { >=20 > + ZeroMem ((VOID *)&IdtTableInStack.IdtTable[Index], sizeof (IA32_IDT_= GATE_DESCRIPTOR)); >=20 > CopyMem ((VOID *)&IdtTableInStack.IdtTable[Index], (VOID *)&mIdtEntr= yTemplate, sizeof (UINT64)); >=20 > } >=20 >=20 >=20 > diff --git a/UefiCpuPkg/SecCore/SecMain.h b/UefiCpuPkg/SecCore/SecMain.h > index 189fcf9326..1be57c2248 100644 > --- a/UefiCpuPkg/SecCore/SecMain.h > +++ b/UefiCpuPkg/SecCore/SecMain.h > @@ -43,8 +43,8 @@ typedef struct _SEC_IDT_TABLE { > // Note: For IA32, only the 4 bytes immediately preceding IDT is used = to store >=20 > // EFI_PEI_SERVICES** >=20 > // >=20 > - UINT64 PeiService; >=20 > - UINT64 IdtTable[SEC_IDT_ENTRY_COUNT]; >=20 > + UINT64 PeiService; >=20 > + IA32_IDT_GATE_DESCRIPTOR IdtTable[SEC_IDT_ENTRY_COUNT]; >=20 > } SEC_IDT_TABLE; >=20 >=20 >=20 > /** >=20 > -- > 2.35.3.windows.1