Index: OvmfPkg/PlatformPei/MemDetect.c =================================================================== --- OvmfPkg/PlatformPei/MemDetect.c (revision 9332) +++ OvmfPkg/PlatformPei/MemDetect.c (working copy) @@ -34,12 +34,12 @@ #include "Cmos.h" STATIC -UINTN +UINT64 GetSystemMemorySize ( ) { - UINT8 Cmos0x34; - UINT8 Cmos0x35; + UINT64 Cmos0x34; + UINT64 Cmos0x35; // // CMOS 0x34/0x35 specifies the system memory above 16 MB. @@ -50,8 +50,8 @@ // into the calculation to get the total memory size. // - Cmos0x34 = (UINT8) CmosRead8 (0x34); - Cmos0x35 = (UINT8) CmosRead8 (0x35); + Cmos0x34 = CmosRead8(0x34); + Cmos0x35 = CmosRead8(0x35); return ((((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB); } @@ -77,7 +77,7 @@ // // Determine total memory size available // - TotalMemorySize = (UINT64)GetSystemMemorySize (); + TotalMemorySize = GetSystemMemorySize (); MemoryBase = 0x800000; MemorySize = TotalMemorySize - MemoryBase - 0x100000;