mirror of https://github.com/acidanthera/audk.git
OvmfPkg: PlatformPei: simplify memory range expressions in MemDetect()
Exploit that (MemoryBase + MemorySize) always equals LowerMemorySize. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15022 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
80873def60
commit
9ab36385be
|
@ -161,11 +161,10 @@ MemDetect (
|
|||
//
|
||||
// Create memory HOBs
|
||||
//
|
||||
AddMemoryBaseSizeHob (MemoryBase, MemorySize);
|
||||
AddMemoryRangeHob (BASE_1MB, MemoryBase);
|
||||
AddMemoryRangeHob (BASE_1MB, LowerMemorySize);
|
||||
AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
|
||||
|
||||
MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack);
|
||||
MtrrSetMemoryAttribute (BASE_1MB, LowerMemorySize - BASE_1MB, CacheWriteBack);
|
||||
|
||||
MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);
|
||||
|
||||
|
@ -175,6 +174,6 @@ MemDetect (
|
|||
MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
|
||||
}
|
||||
|
||||
return MemoryBase + MemorySize;
|
||||
return LowerMemorySize;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue