summaryrefslogtreecommitdiff
path: root/OvmfPkg/PlatformPei/MemDetect.c
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2010-10-13 07:07:29 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2010-10-13 07:07:29 +0000
commit55cdb67acb3df840c1d3bbf0e0e78fba27dcfbe3 (patch)
tree58a1f4230163703a82793105be85d080bcd41728 /OvmfPkg/PlatformPei/MemDetect.c
parent3d131d1a207103cf0f5a849c6972a139156d9bd2 (diff)
downloadedk2-platforms-55cdb67acb3df840c1d3bbf0e0e78fba27dcfbe3.tar.xz
OVMF: Support greater than 2GB of memory
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10928 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/PlatformPei/MemDetect.c')
-rw-r--r--OvmfPkg/PlatformPei/MemDetect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
index 5e09cc9375..9a82cc79d0 100644
--- a/OvmfPkg/PlatformPei/MemDetect.c
+++ b/OvmfPkg/PlatformPei/MemDetect.c
@@ -54,7 +54,7 @@ GetSystemMemorySize (
Cmos0x34 = (UINT8) CmosRead8 (0x34);
Cmos0x35 = (UINT8) CmosRead8 (0x35);
- return ((((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);
+ return (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);
}
@@ -64,7 +64,7 @@ GetSystemMemorySize (
@return EFI_SUCCESS The PEIM initialized successfully.
**/
-EFI_STATUS
+EFI_PHYSICAL_ADDRESS
MemDetect (
)
{
@@ -103,6 +103,6 @@ MemDetect (
AddMemoryRangeHob (BASE_1MB, MemoryBase);
AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
- return EFI_SUCCESS;
+ return MemoryBase + MemorySize;
}