From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D9DA020972143 for ; Thu, 12 Jul 2018 03:54:40 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2018 03:54:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,342,1526367600"; d="scan'208";a="66340088" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 12 Jul 2018 03:54:28 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 12 Jul 2018 03:54:27 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.57]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0319.002; Thu, 12 Jul 2018 18:54:25 +0800 From: "Dong, Eric" To: Laszlo Ersek , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" Thread-Topic: [edk2] [Patch 1/3] UefiCpuPkg/MpInitLib: Relocate uCode to memory to save time. Thread-Index: AQHUGQdkIOrUrbM6VUScXAVZzpUipaSKzIuAgACdjaA= Date: Thu, 12 Jul 2018 10:54:25 +0000 Message-ID: References: <20180711110729.12604-1-eric.dong@intel.com> <20180711110729.12604-2-eric.dong@intel.com> <9972d977-f3a0-d2e3-8b49-0aab616c01c8@redhat.com> In-Reply-To: <9972d977-f3a0-d2e3-8b49-0aab616c01c8@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/3] UefiCpuPkg/MpInitLib: Relocate uCode to memory to save time. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2018 10:54:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgTGFzemxvLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IExhc3ps byBFcnNlayBbbWFpbHRvOmxlcnNla0ByZWRoYXQuY29tXQ0KPiBTZW50OiBUaHVyc2RheSwgSnVs eSAxMiwgMjAxOCA1OjI2IFBNDQo+IFRvOiBEb25nLCBFcmljIDxlcmljLmRvbmdAaW50ZWwuY29t PjsgZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmcNCj4gQ2M6IE5pLCBSdWl5dSA8cnVpeXUubmlAaW50 ZWwuY29tPg0KPiBTdWJqZWN0OiBSZTogW2VkazJdIFtQYXRjaCAxLzNdIFVlZmlDcHVQa2cvTXBJ bml0TGliOiBSZWxvY2F0ZSB1Q29kZSB0bw0KPiBtZW1vcnkgdG8gc2F2ZSB0aW1lLg0KPiANCj4g SGkgRXJpYywNCj4gDQo+IE9uIDA3LzExLzE4IDEzOjA3LCBFcmljIERvbmcgd3JvdGU6DQo+ID4g UmVhZCB1Q29kZSBmcm9tIG1lbW9yeSBoYXMgYmV0dGVyIHBlcmZvcm1hbmNlIHRoYW4gZnJvbSBm bGFzaC4NCj4gPiBCdXQgaXQgbmVlZHMgZXh0cmEgZWZmb3J0IHRvIGxldCBCU1AgY29weSB1Q29k ZSBmcm9tIGZsYXNoIHRvIG1lbW9yeS4NCj4gPiBBbHNv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