From: "Kinney, Michael D" <michael.d.kinney@intel.com>
To: edk2-devel@lists.01.org
Cc: Heyi Guo <heyi.guo@linaro.org>, Yi Li <phoenix.liyi@huawei.com>,
Renhao Liang <liangrenhao@huawei.com>,
Star Zeng <star.zeng@intel.com>, Eric Dong <eric.dong@intel.com>,
Liming Gao <liming.gao@intel.com>,
Jian J Wang <jian.j.wang@intel.com>,
Ruiyu Ni <ruiyu.ni@intel.com>,
Michael D Kinney <michael.d.kinney@intel.com>
Subject: [Patch] MdeModulePkg/Gcd: Filter gCpu->SetMemoryAttributes() calls
Date: Mon, 2 Apr 2018 15:40:24 -0700 [thread overview]
Message-ID: <20180402224024.20848-1-michael.d.kinney@intel.com> (raw)
This patch fixes an issue with VlvTbltDevicePkg introduced
by commit:
https://github.com/tianocore/edk2/commit/5b91bf82c67b586b9588cbe4bbffa1588f6b5926
This patch filters the call to gCpu->SetMemoryAttributes()
if the requested attributes is 0. It also removes the #define
INVALID_CPU_ARCH_ATTRIBUTES that is no longer used.
Cc: Heyi Guo <heyi.guo@linaro.org>
Cc: Yi Li <phoenix.liyi@huawei.com>
Cc: Renhao Liang <liangrenhao@huawei.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
---
MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
index 907245a3f5..45ed6280db 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -48,8 +48,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define NONEXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | \
EFI_MEMORY_RO)
-#define INVALID_CPU_ARCH_ATTRIBUTES 0xffffffff
-
//
// Module Variables
//
@@ -873,7 +871,7 @@ CoreConvertSpace (
// Call CPU Arch Protocol to attempt to set attributes on the range
//
CpuArchAttributes = ConverToCpuArchAttributes (Attributes);
- if (CpuArchAttributes != INVALID_CPU_ARCH_ATTRIBUTES) {
+ if (CpuArchAttributes != 0) {
if (gCpu == NULL) {
Status = EFI_NOT_AVAILABLE_YET;
} else {
--
2.14.2.windows.3
reply other threads:[~2018-04-02 22:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180402224024.20848-1-michael.d.kinney@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