Hi,
Thanks for identifying this bug which caused wrong CMOS value filled. I
agree with your fix.
Reviewed-by: Elvin Li <[email protected]>
By the way, I am just curious, how do you find this bug? Do you meet
real function failure?
Thanks
Elvin
-----Original Message-----
From: Mike Maslenkin [mailto:[email protected]]
Sent: Tuesday, March 04, 2014 7:24 AM
To: [email protected]
Cc: Mike Maslenkin
Subject: [edk2] [PATCH 1/1] Fix amount of memory value stored at CMOS
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 <[email protected]>
---
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel