From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.17974.1653237150052115418 for ; Sun, 22 May 2022 09:32:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=MHdiWei1; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: jian.j.wang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653237150; x=1684773150; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=m0u+wUqORvL5f2OvukdiYDW3NEOP90koFEDsM/mhYko=; b=MHdiWei1TM1XfA8EbyTwMr6LS4HmVxZ8e5hIFVpK9uzKhCjBdvzAPqGC Zz8zkGJIkrNd7+Ogo/KpHAqzXUqoRSgPZ45HAs9Mis9AYEE88wkxGGdzW twYTozWKit/2JNByuniDWZ+LynNQwqbYrjpGfiZTuTeznfO+nIaQ6p4JU fedgk/7m39Pxl4z6OW4dWATivZACNQPgVI1YkvwbF8ThL6giEv5DklsBF b9084aXCu6SxpSiOpoImuYL+raZro8RZKX/MlBLnEcm9uZ4Vr68TCiFcT wWp8nmOhG5tjKUGrN9LgJix31Z2Jp7R1ifebWOrj9+/dET2PUDOobXkBf A==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="336072201" X-IronPort-AV: E=Sophos;i="5.91,244,1647327600"; d="scan'208";a="336072201" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2022 09:32:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,244,1647327600"; d="scan'208";a="702607135" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga004.jf.intel.com with ESMTP; 22 May 2022 09:32:29 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) 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; Sun, 22 May 2022 09:32:28 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 22 May 2022 09:32:28 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.2308.27 via Frontend Transport; Sun, 22 May 2022 09:32:28 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 22 May 2022 09:32:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HuOExrxQiF2GPNKyhy5caC82KZYER/h+pS2Byv8I6jB1DCBSLObPDiyah2pOmeAJJ470xm5f1Q0FhppVpS2NMKj6tCLxYSDii2XObxba5PsCipmwoAuuGXfYgPXRDiulrr/T5NR5PljbWyGEtj5djyMlF5tnjD7aSZH8JkW4i2ip5sSVxRBaplDOoFAkOOmYOSHu9eRfDZte5mARQdoAW+zcFAuoQMXGrgHkN1Ebcnz+XPPu8tZXP+vFNeHVYMI96rXQvLWH5y2oK1ffpMdaPmWwDIQEv+ANT+hHr195rCKLgLYInFOR6TJ0j1bEove3v6r2dyfTXUu1NdpD8lj6SA== 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=+iGKTih2+dsqkjZU1bjhojzibg3IWmY4LROAohBF97o=; b=Kb/aON0Ls5RxlOa6RTP4ufHYcEpqC1vqB5Gozmv5OQ6MdcEliywkdONKwKpLJEsoxOlrApjHsa3weRcJoNCgCxWUR3qcmxM/ovdUp+d5qR4WRpTxwty7w8C16u8O5PGTQ3LC2MQvxnPGtptg+2O0Om4Mv3fktOMqjkjltJXUNpHm2dgUcmAUcEeCJiqX/DQRJgDkK9SB3JAJhFFNljXzV48ZumbOgnyRgaiqtF8ZvLyrvYJB2ey8GJTfQyTMPzFWT+mbZDo7eLBtfVkkROMdyovSzEm6XxN3T2V/DoD1fSfHAJAwiuL0yxLXataK9kiYo94E98sBYxaNU3C2xT6QsA== 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 CO1PR11MB4945.namprd11.prod.outlook.com (2603:10b6:303:9c::8) by SN6PR11MB3501.namprd11.prod.outlook.com (2603:10b6:805:d4::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.22; Sun, 22 May 2022 16:32:26 +0000 Received: from CO1PR11MB4945.namprd11.prod.outlook.com ([fe80::a420:db2c:31db:7906]) by CO1PR11MB4945.namprd11.prod.outlook.com ([fe80::a420:db2c:31db:7906%9]) with mapi id 15.20.5273.022; Sun, 22 May 2022 16:32:26 +0000 From: "Wang, Jian J" To: "devel@edk2.groups.io" , "Ni, Ray" CC: "Dong, Eric" Subject: Re: [edk2-devel] [PATCH 2/5] CpuException: Init global variables in-place Thread-Topic: [edk2-devel] [PATCH 2/5] CpuException: Init global variables in-place Thread-Index: AQHYbFQtSdcU0RBsg064iRp3/gzCUq0rGlbQ Date: Sun, 22 May 2022 16:32:26 +0000 Message-ID: References: <20220520141549.108-1-ray.ni@intel.com> <20220520141549.108-3-ray.ni@intel.com> In-Reply-To: <20220520141549.108-3-ray.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.401.20 dlp-product: dlpe-windows 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: d217a2a9-642c-4c75-fc56-08da3c10a7fc x-ms-traffictypediagnostic: SN6PR11MB3501: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: uikibp4F79U2K4MrCXMD2NqHoQD9T+TJFFOE8aq4WpjYzhkPWWi5DgVEegNzbYGCLXPmVZAEyblbLx+cKB0+WSHWE2cxSPbNg7q71nsRLbaudDM7JJHW4ZnnHKvGH6PCW3/XoTHotcuUXnGQ+tqpfmVHhzLU9HCJ8yMp+dwLeayY3eIoXaQxIX21/QEBf0WOGT8FVOoRomTRZak9jeBTFgL+T0RFdwqBv1sB2gCsKCgvs+7/H4rlz7Z22PD6fvqlXmfvGIhuz/KHV0EbaMMTTMphVp7GaziPNPayEM3js3OXxzXXjfm10PzuzSsIYr0h+zE5dbGoju3hdwELckUBwCAXXRfic0ppUmADjsB2e4Rsu37FOaMXaPLAJPiBIhh81dyExENbjVLzlRv5TVTAUkKoBoaQBJtTLt5LcvrYNl3seqQQOSKbl3cNtU0jtr8VCF0yxL4e1Xh1f3nLk0/jDiH+OdHkahx4HEfmCqT/JrY8V6C80TYab8Q5tzMyMjeQoSqohwo7Jbc6QYd9iyLOUYngdoaaxFOAl3b6mkXhDCwRmdI3F+rcL0QxrqNlKOUt7C23NpFjWmiVoahBQ1L+arC71ujFWgh3+0lZ7NDLsaRrLw445QLiAPDGX7d8oM6y+QQv5IEvKbRzN5KxfuRwA6mmzKbZU4SgCo8k3swmN0/1YAe+Rzl/CROVyKbZfIqRgQ+u13px9fYdmXYdZAQygSF5FPpEjgxXqJRJDcOM7tHoIRLLPvEWXMkzUrYCPkud7L9r8GzcXr4MirqUfHefw1q1gg8NKnzWQGDCP9v43VxhCtisn4aAtH25WX5RvMLRmv5BiVbgl2x0PIt2kdFfrg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4945.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(71200400001)(38100700002)(66946007)(66556008)(86362001)(8676002)(55016003)(33656002)(4326008)(64756008)(66446008)(66476007)(76116006)(2906002)(107886003)(186003)(110136005)(122000001)(508600001)(6636002)(53546011)(82960400001)(966005)(5660300002)(316002)(83380400001)(6506007)(8936002)(26005)(9686003)(7696005)(52536014)(38070700005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aLi6uFdxvfX8sYC+o6ZTpIJb4m9Q354b3iDJ8Ada8+8w9vCX7eIY4rTZJejV?= =?us-ascii?Q?Yk95bP/mMmIXeBFU5BIHSRC2EoUthOkjusYZ0KWSva6Tq4O8hEaKc7jh1LZ0?= =?us-ascii?Q?NdeDqxFu5J9g7MDdGsSkKqgevBcssdJNValV80DsU2xetCSY8JEzTX8e6Lwa?= =?us-ascii?Q?oUcoGp1wHKQLjmNB/NilzOl5+VmU4XPsx4PXkgGjnlvavxp+NGp0/Kz6KZ/S?= =?us-ascii?Q?mYoT4wHrEuxylwidULOIVsLk7THXeDH5dEgogFL8lCzD5nbWDiOaczqrLCYj?= =?us-ascii?Q?5c3zVGR4+u6Jqt4xlq/Yt0P8E98LeV6vh5PXtqeUurBdLS/8qZ3PWbaY8RUf?= =?us-ascii?Q?M+B2nFlxYZK1OoI4Oxe6jwrvIFXwicCBOu4x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aoCb9y5jjlokwSMr/ShRAkvX2V+C7ZtgA8D6AOW4ZOmwNqbcS2I3WeHN1a+?= =?us-ascii?Q?xesNToFV35Vm7nRU6nyNbdzLAn2cpnOmNdhbBFtJLrUpyiOKNzYwaMxbUcj/?= =?us-ascii?Q?xQFTnSCRrQDYzAZ0wm0plceqHsppoET72BKYbzzJ559MW9/Gb55SeLkjjYn9?= =?us-ascii?Q?lECoE8Jj6B/QrTHfXR16xHmkz6Dl14cXfSkd5eyyIyl9ytzUDJjbkn7CACh5?= =?us-ascii?Q?qvy2/iNC+q3hqZooEMAveK0/o54QHVuNOPISk1UN5qUy/oOOU9EmOzc7qupt?= =?us-ascii?Q?HKWZY8vUvJXdFOHltaNkVcX9qvqaX8u+km/cPRmeUwjPyakIyWFnQSNzp5jx?= =?us-ascii?Q?ZDwa8jwJZ1KAQbSy5Ce6DpoFCuGee2YYb28UUKH6phfUhIM68hg43BK7BjTx?= =?us-ascii?Q?Agp6bt3uuEL5NcBfC7NKLMuryqJJfIpNFDYCutIOcXDSU9qrQZSv6Gi4MUje?= =?us-ascii?Q?BdLjd7cItA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4945.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d217a2a9-642c-4c75-fc56-08da3c10a7fc X-MS-Exchange-CrossTenant-originalarrivaltime: 22 May 2022 16:32:26.1239 (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: +2ykr4+ggUFcEdaMgqRv+3Vng9bZxEbv8jUGSAvStkZDoibXZJmxOXy2so59w7YhNMQpihTlriIEuyay34Wq2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3501 Return-Path: jian.j.wang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jian J Wang Regards, Jian > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Friday, May 20, 2022 10:16 PM > To: devel@edk2.groups.io > Cc: Dong, Eric > Subject: [edk2-devel] [PATCH 2/5] CpuException: Init global variables in-= place >=20 > Additionally removed two useless global variables: > "SPIN_LOCK mDisplayMessageSpinLock" from SMM instance. > "UINTN mEnabledInterruptNum" from DXE instance. >=20 > Signed-off-by: Ray Ni > Cc: Eric Dong > --- > .../Library/CpuExceptionHandlerLib/DxeException.c | 11 ++++++----- > .../Library/CpuExceptionHandlerLib/SmmException.c | 14 ++++++-------- > 2 files changed, 12 insertions(+), 13 deletions(-) >=20 > diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c > index 5083c4b8e8..da5b96d6c6 100644 > --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c > +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c > @@ -16,9 +16,12 @@ CONST UINTN mDoFarReturnFlag =3D 0; >=20 >=20 > RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM]; >=20 > EFI_CPU_INTERRUPT_HANDLER > mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM]; >=20 > -UINTN mEnabledInterruptNum =3D 0; >=20 > - >=20 > -EXCEPTION_HANDLER_DATA mExceptionHandlerData; >=20 > +EXCEPTION_HANDLER_DATA mExceptionHandlerData =3D { >=20 > + 0, // To be fixed >=20 > + 0, // To be fixed >=20 > + mReservedVectorsData, >=20 > + mExternalInterruptHandlerTable >=20 > +}; >=20 >=20 >=20 > UINT8 mNewStack[CPU_STACK_SWITCH_EXCEPTION_NUMBER * >=20 > CPU_KNOWN_GOOD_STACK_SIZE]; >=20 > @@ -62,8 +65,6 @@ InitializeCpuExceptionHandlers ( > IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL >=20 > ) >=20 > { >=20 > - mExceptionHandlerData.ReservedVectors =3D mReservedVectorsDat= a; >=20 > - mExceptionHandlerData.ExternalInterruptHandler =3D > mExternalInterruptHandlerTable; >=20 > InitializeSpinLock (&mExceptionHandlerData.DisplayMessageSpinLock); >=20 > return InitializeCpuExceptionHandlersWorker (VectorInfo, > &mExceptionHandlerData); >=20 > } >=20 > diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c > index 77ee74579f..9f0af4120a 100644 > --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c > +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c > @@ -11,14 +11,14 @@ >=20 >=20 > CONST UINTN mDoFarReturnFlag =3D 1; >=20 >=20 >=20 > -// >=20 > -// Spin lock for CPU information display >=20 > -// >=20 > -SPIN_LOCK mDisplayMessageSpinLock; >=20 > - >=20 > RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM]; >=20 > EFI_CPU_INTERRUPT_HANDLER > mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM]; >=20 > -EXCEPTION_HANDLER_DATA mExceptionHandlerData; >=20 > +EXCEPTION_HANDLER_DATA mExceptionHandlerData =3D { >=20 > + 0, // To be fixed >=20 > + 0, // To be fixed >=20 > + mReservedVectorsData, >=20 > + mExternalInterruptHandlerTable >=20 > +}; >=20 >=20 >=20 > /** >=20 > Common exception handler. >=20 > @@ -58,8 +58,6 @@ InitializeCpuExceptionHandlers ( > IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL >=20 > ) >=20 > { >=20 > - mExceptionHandlerData.ReservedVectors =3D mReservedVectorsDat= a; >=20 > - mExceptionHandlerData.ExternalInterruptHandler =3D > mExternalInterruptHandlerTable; >=20 > InitializeSpinLock (&mExceptionHandlerData.DisplayMessageSpinLock); >=20 > return InitializeCpuExceptionHandlersWorker (VectorInfo, > &mExceptionHandlerData); >=20 > } >=20 > -- > 2.35.1.windows.2 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#89917): https://edk2.groups.io/g/devel/message/89917 > Mute This Topic: https://groups.io/mt/91231768/1768734 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [jian.j.wang@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20