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.151; helo=mga17.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 349DB21A09130 for ; Mon, 24 Sep 2018 23:22:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2018 23:22:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,301,1534834800"; d="scan'208";a="91651135" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.8]) by fmsmga004.fm.intel.com with ESMTP; 24 Sep 2018 23:20:21 -0700 From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 25 Sep 2018 14:21:13 +0800 Message-Id: <20180925062117.34772-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 Subject: [PATCH v2 0/4] 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 06:22:20 -0000 The patch sets fix a bug in PciHostBridge driver that prevents PMEM access sometimes. Additionally, it enhances the boundary check and add a new macro to simplify the code. V2: Patch 3/4 uses Resource as parameter instead of R and treat the parameter as a pointer. Patch 4/4 is a new patch suggested by Star to move declaration of mIoMmu to header file. Ruiyu Ni (4): MdeModulePkg/PciHostBridge: Enhance boundary check in Io/Mem.Read/Write MdeModulePkg/PciHostBridge: Fix a bug that prevents PMEM access MdeModulePkg/PciHostBridge: Add RESOURCE_VALID() to simplify code MdeModulePkg/PciHostBridge: Move declaration of mIoMmu to header file .../Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 4 +- .../Bus/Pci/PciHostBridgeDxe/PciHostBridge.h | 3 + .../Bus/Pci/PciHostBridgeDxe/PciRootBridge.h | 1 - .../Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c | 126 ++++++++++++--------- 4 files changed, 78 insertions(+), 56 deletions(-) -- 2.16.1.windows.1