MdeModulePkg/PiSmmCore: Replace BASE_4GB with MAX_ADDRESS check.
PI specification Vol 4 - SMM does not have any limitation of BASE_4GB for SMM. So we should replace BASE_4GB check with MAX_ADDRESS check to make sure the SMM memory is accessible by SMM Core. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -1556,7 +1556,7 @@ SmmIplEntry (
|
||||
}
|
||||
|
||||
if (gSmmCorePrivate->SmramRanges[Index].CpuStart >= BASE_1MB) {
|
||||
if ((gSmmCorePrivate->SmramRanges[Index].CpuStart + gSmmCorePrivate->SmramRanges[Index].PhysicalSize) <= BASE_4GB) {
|
||||
if ((gSmmCorePrivate->SmramRanges[Index].CpuStart + gSmmCorePrivate->SmramRanges[Index].PhysicalSize - 1) <= MAX_ADDRESS) {
|
||||
if (gSmmCorePrivate->SmramRanges[Index].PhysicalSize >= MaxSize) {
|
||||
MaxSize = gSmmCorePrivate->SmramRanges[Index].PhysicalSize;
|
||||
mCurrentSmramRange = &gSmmCorePrivate->SmramRanges[Index];
|
||||
|
Reference in New Issue
Block a user