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.43; helo=mga05.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 DDB6D21A00AE6 for ; Mon, 24 Sep 2018 19:10:05 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2018 19:10:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,300,1534834800"; d="scan'208";a="75907268" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.8]) ([10.239.9.8]) by orsmga008.jf.intel.com with ESMTP; 24 Sep 2018 19:10:03 -0700 To: Laszlo Ersek , edk2-devel@lists.01.org Cc: Garrett , Star Zeng , Kirkendall@ml01.01.org References: <20180921072539.268068-1-ruiyu.ni@intel.com> <20180921072539.268068-3-ruiyu.ni@intel.com> <95b75c62-43e6-e92e-3de8-04e3fdd9cd7b@redhat.com> From: "Ni, Ruiyu" Message-ID: Date: Tue, 25 Sep 2018 10:11:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <95b75c62-43e6-e92e-3de8-04e3fdd9cd7b@redhat.com> Subject: Re: [PATCH 2/3] MdeModulePkg/PciHostBridge: Fix a bug that prevents PMEM access 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: Tue, 25 Sep 2018 02:10:06 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 9/21/2018 7:06 PM, Laszlo Ersek wrote: > On 09/21/18 09:25, Ruiyu Ni wrote: > > The interesting thing about this patch is that, if any one of the first > three branches is taken, then the final checks will automatically pass. > That's because, on the first three branches, we select the base & the > limit *because* the access falls between them. Therefore, in the end, > when we check whether the access falls between base and end, they > miraculously happen to do so. :) The code was written like this to maximally share the final check code:) > > Reviewed-by: Laszlo Ersek > > Thanks > Laszlo > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > -- Thanks, Ray