summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorKinney, Michael D <michael.d.kinney@intel.com>2018-04-03 06:40:24 +0800
committerStar Zeng <star.zeng@intel.com>2018-04-05 09:04:58 +0800
commit0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c (patch)
treecaf71c399f1f6022533566d60e59e961f318f739 /BaseTools/Source/Python
parentd22c995a481485d8240453a9e5ea9af1d87a4c80 (diff)
downloadedk2-0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c.tar.gz
edk2-0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c.tar.bz2
edk2-0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c.zip
MdeModulePkg/Gcd: Filter gCpu->SetMemoryAttributes() calls
This patch fixes an issue with VlvTbltDevicePkg introduced by commit 5b91bf82c67b586b9588cbe4bbffa1588f6b5926. The history is as below. To support heap guard feature, 14dde9e903bb9a719ebb8f3381da72b19509bc36 added support for SetMemorySpaceAttributes() to handle page attributes, but after that, a combination of CPU arch attributes and other attributes was not allowed anymore, for example, UC + RUNTIME. It is a regression. Then 5b91bf82c67b586b9588cbe4bbffa1588f6b5926 was to fix the regression, and we thought 0 CPU arch attributes may be used to clear CPU arch attributes, so 0 CPU arch attributes was allowed to be sent to gCpu->SetMemoryAttributes(). But some implementation of CPU driver may return error for 0 CPU arch attributes. That fails the case that caller just calls SetMemorySpaceAttributes() with none CPU arch attributes (for example, RUNTIME), and the purpose of the case is not to clear CPU arch attributes. 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> Signed-off-by: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'BaseTools/Source/Python')
0 files changed, 0 insertions, 0 deletions