Reviewed-by: Giri P Mudusuru <[email protected]>
> -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of > Jiewen Yao > Sent: Tuesday, June 28, 2016 7:30 PM > To: [email protected] > Cc: Kinney, Michael D <[email protected]>; Fan, Jeff > <[email protected]> > Subject: [edk2] [PATCH] 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 <[email protected]> > Cc: Michael D Kinney <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jiewen Yao <[email protected]> > --- > MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 2 +- > MdeModulePkg/Core/PiSmmCore/Pool.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c > b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c > index acfcc83..3788bd5 100644 > --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c > +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c > @@ -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) <= MAX_ADDRESS) { > if (gSmmCorePrivate->SmramRanges[Index].PhysicalSize >= MaxSize) { > MaxSize = gSmmCorePrivate->SmramRanges[Index].PhysicalSize; > mCurrentSmramRange = &gSmmCorePrivate->SmramRanges[Index]; > diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c > b/MdeModulePkg/Core/PiSmmCore/Pool.c > index 761988e..e493fd2 100644 > --- a/MdeModulePkg/Core/PiSmmCore/Pool.c > +++ b/MdeModulePkg/Core/PiSmmCore/Pool.c > @@ -67,7 +67,7 @@ SmmInitializeMemoryServices ( > } > > if (SmramRanges[Index].CpuStart >= BASE_1MB) { > - if ((SmramRanges[Index].CpuStart + SmramRanges[Index].PhysicalSize) > <= BASE_4GB) { > + if ((SmramRanges[Index].CpuStart + SmramRanges[Index].PhysicalSize) > <= MAX_ADDRESS) { > if (SmramRanges[Index].PhysicalSize >= MaxSize) { > MaxSize = SmramRanges[Index].PhysicalSize; > CurrentSmramRangesIndex = Index; > -- > 2.7.4.windows.1 > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

