mirror of https://github.com/acidanthera/audk.git
OvmfPkg/PlatformPei: assert there's no permanent PEI RAM at default SMBASE
The permanent PEI RAM that is published on the normal boot path starts strictly above MEMFD_BASE_ADDRESS (8 MB -- see the FDF files), regardless of whether PEI decompression will be necessary on S3 resume due to SMM_REQUIRE. Therefore the normal boot permanent PEI RAM never overlaps with the SMRAM at the default SMBASE (192 KB). The S3 resume permanent PEI RAM is strictly above the normal boot one. Therefore the no-overlap statement holds true on the S3 resume path as well. Assert the no-overlap condition commonly for both boot paths in PublishPeiMemory(). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1512 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Message-Id: <20200129214412.2361-7-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
parent
73974f809c
commit
adec2bd598
|
@ -17,6 +17,7 @@ Module Name:
|
|||
#include <IndustryStandard/I440FxPiix4.h>
|
||||
#include <IndustryStandard/Q35MchIch9.h>
|
||||
#include <PiPei.h>
|
||||
#include <Register/Intel/SmramSaveStateMap.h>
|
||||
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
|
@ -626,6 +627,15 @@ PublishPeiMemory (
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// MEMFD_BASE_ADDRESS separates the SMRAM at the default SMBASE from the
|
||||
// normal boot permanent PEI RAM. Regarding the S3 boot path, the S3
|
||||
// permanent PEI RAM is located even higher.
|
||||
//
|
||||
if (FeaturePcdGet (PcdSmmSmramRequire) && mQ35SmramAtDefaultSmbase) {
|
||||
ASSERT (SMM_DEFAULT_SMBASE + MCH_DEFAULT_SMBASE_SIZE <= MemoryBase);
|
||||
}
|
||||
|
||||
//
|
||||
// Publish this memory to the PEI Core
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue