From: Jian J Wang <jian.j.wang@intel.com>
To: edk2-devel@lists.01.org
Subject: [PATCH 0/3] Remove dependency on PcdNullPointerDetectionPropertyMask
Date: Wed, 6 Dec 2017 15:31:17 +0800 [thread overview]
Message-ID: <20171206073120.2248-1-jian.j.wang@intel.com> (raw)
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
next reply other threads:[~2017-12-06 7:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 7:31 Jian J Wang [this message]
2017-12-06 7:31 ` [PATCH 1/3] IntelFrameworkPkg/LegacyBios.h: Add a macro to guarantee page 0 access Jian J Wang
2017-12-06 9:31 ` Ni, Ruiyu
2017-12-06 12:36 ` Wang, Jian J
2017-12-06 7:31 ` [PATCH 2/3] IntelFrameworkModulePkg/LegacyBiosDxe: Use macro to enable/disable page 0 Jian J Wang
2017-12-06 9:32 ` Ni, Ruiyu
2017-12-06 12:38 ` Wang, Jian J
2017-12-06 7:31 ` [PATCH 3/3] IntelFrameworkModulePkg/KeyboardDxe: " Jian J Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171206073120.2248-1-jian.j.wang@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox