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.24; helo=mga09.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 3B01F2218E944 for ; Wed, 6 Dec 2017 21:36:20 -0800 (PST) Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Dec 2017 21:40:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,371,1508828400"; d="scan'208";a="608949" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.76]) by fmsmga008.fm.intel.com with ESMTP; 06 Dec 2017 21:40:52 -0800 From: Jian J Wang To: edk2-devel@lists.01.org Date: Thu, 7 Dec 2017 13:40:46 +0800 Message-Id: <20171207054049.18140-1-jian.j.wang@intel.com> X-Mailer: git-send-email 2.15.1.windows.2 Subject: [PATCH v2 0/3] Remove dependency on PcdNullPointerDetectionPropertyMask X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 05:36:21 -0000 > v2: > a. Fix a typo in expression in the macro ACCESS_PAGE0_CODE > b. Fix GCC49 build error > c. Remove unnecessary braces enclosing code passed to ACCESS_PAGE0_CODE Due to the introduction of NULL pointer detection feature, page 0 will be disabled if the feature is enabled, which will cause legacy code failed to update legacy data in page 0. To avoid page fault caused by above feature in legacy code, legacy related drivers have to enable page 0 temporarily before accessing page 0 and disable it afterwards. Old GCD servie has a bug which paging related attributes are not awared and managed by GCD service. The legacy code has to use PCD PcdNullPointerDetectionPropertyMask to know if page 0 is disabled or not. As a result, two methods EnableNullDetection() DisableNullDetection() were introduced to do enable/disable job just mentioned. But the newly added PcdNullPointerDetectionPropertyMask caused backward compatibility issue in some packages having legcy drivers. Since the attributes missing issue in GCD services has been fixed, it's now able to eliminate the dependency on this PCD. Jian J Wang (3): IntelFrameworkPkg/LegacyBios.h: Add a macro to guarantee page 0 access IntelFrameworkModulePkg/LegacyBiosDxe: Use macro to enable/disable page 0 IntelFrameworkModulePkg/KeyboardDxe: Use macro to enable/disable page 0 .../Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c | 118 ++---------------- .../Csm/BiosThunk/KeyboardDxe/KeyboardDxe.inf | 1 - .../Csm/LegacyBiosDxe/LegacyBda.c | 53 ++++---- .../Csm/LegacyBiosDxe/LegacyBios.c | 135 ++------------------- .../Csm/LegacyBiosDxe/LegacyBiosDxe.inf | 1 - .../Csm/LegacyBiosDxe/LegacyBiosInterface.h | 16 --- .../Csm/LegacyBiosDxe/LegacyBootSupport.c | 80 ++++++------ .../Csm/LegacyBiosDxe/LegacyPci.c | 72 ++++++----- IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c | 51 ++++---- IntelFrameworkPkg/Include/Protocol/LegacyBios.h | 34 ++++++ 10 files changed, 179 insertions(+), 382 deletions(-) -- 2.15.1.windows.2