From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 C5E362114B133 for ; Fri, 21 Sep 2018 00:25:54 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Sep 2018 00:25:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,284,1534834800"; d="scan'208";a="92026724" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 21 Sep 2018 00:25:42 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 21 Sep 2018 00:25:42 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.227]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.226]) with mapi id 14.03.0319.002; Fri, 21 Sep 2018 15:25:40 +0800 From: "Ni, Ruiyu" To: "Kirkendall, Garrett" , Laszlo Ersek CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] How do I access Prefetchable Memory region through EFI_PCI_IO_PROTOCOL Thread-Index: AdRMVdJOh/QJzRlFSm6P/iV3GxwZNwBDe+OAAIUsEYAAgPiRQA== Date: Fri, 21 Sep 2018 07:25:40 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BE2C9BD@SHSMSX104.ccr.corp.intel.com> References: <7559c32e-28e0-123b-c392-36b601bf63d2@redhat.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: How do I access Prefetchable Memory region through EFI_PCI_IO_PROTOCOL X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2018 07:25:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 R2FycmV0dCwNCkkgdGhpbmsgaXQncyBhIHJlYWwgYnVnIGluIHRoZSBjb2RlLiBUaGFua3MgZm9y IHJlcG9ydGluZyB0aGF0Lg0KSSBqdXN0IHN1Ym1pdHRlZCBhIEJ6IDExOTYgZm9yIHRoaXMgaXNz dWUuDQpQYXRjaGVzIGFyZSBhbHNvIHNlbnQgb3V0Lg0KDQpUaGFua3MvUmF5DQoNCj4gLS0tLS1P cmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogZWRrMi1kZXZlbCA8ZWRrMi1kZXZlbC1ib3Vu Y2VzQGxpc3RzLjAxLm9yZz4gT24gQmVoYWxmIE9mDQo+IEtpcmtlbmRhbGwsIEdhcnJldHQNCj4g U2VudDogV2VkbmVzZGF5LCBTZXB0ZW1iZXIgMTksIDIwMTggOTo1MyBBTQ0KPiBUbzogTGFzemxv IEVyc2VrIDxsZXJzZWtAcmVkaGF0LmNvbT4NCj4gQ2M6IE5pLCBSdWl5dSA8cnVpeXUubmlAaW50 ZWwuY29tPjsgZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmcNCj4gU3ViamVjdDogUmU6IFtlZGsyXSBI b3cgZG8gSSBhY2Nlc3MgUHJlZmV0Y2hhYmxlIE1lbW9yeSByZWdpb24gdGhyb3VnaA0KPiBFRklf UENJX0lPX1BST1RPQ09MDQo+IA0KPiBSYXksIGRpZCB5b3UgZ2V0IGEgY2h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