The size of platform memory above 1M is measured in kilobytes.
This patch fixes truncation of this value. Actually 0 Mb memory size
was set by reason of overflow of 16 bit word caused by wrong value used.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Mike Maslenkin <miha...@parallels.com>
---
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c 
b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
index bf2760550442..3493c518dfd2 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
@@ -2101,7 +2101,7 @@ LegacyBiosCompleteStandardCmosBeforeBoot (
   //
   // redo memory size since it can change
   //
-  Size = 15 * SIZE_1MB;
+  Size = (15 * SIZE_1MB) >> 10;
   if (Private->IntThunk->EfiToLegacy16InitTable.OsMemoryAbove1Mb < (15 * 
SIZE_1MB)) {
     Size  = Private->IntThunk->EfiToLegacy16InitTable.OsMemoryAbove1Mb >> 10;
   }
-- 
1.7.10.4


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to