Changeset 30271 in vbox for trunk/src/VBox/Devices/EFI
- Timestamp:
- Jun 17, 2010 7:19:17 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-memdetect
r30230 r30271 3 3 --- OvmfPkg/PlatformPei/MemDetect.c (revision 9332) 4 4 +++ OvmfPkg/PlatformPei/MemDetect.c (working copy) 5 @@ -53,7 +53,7 @@ 6 Cmos0x34 = (UINT8) CmosRead8 (0x34); 7 Cmos0x35 = (UINT8) CmosRead8 (0x35); 5 @@ -34,12 +34,12 @@ 6 #include "Cmos.h" 8 7 9 - return ((((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB); 10 + return ((((UINTN)(Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB); 8 STATIC 9 -UINTN 10 +UINT64 11 GetSystemMemorySize ( 12 ) 13 { 14 - UINT8 Cmos0x34; 15 - UINT8 Cmos0x35; 16 + UINT64 Cmos0x34; 17 + UINT64 Cmos0x35; 18 19 // 20 // CMOS 0x34/0x35 specifies the system memory above 16 MB. 21 @@ -50,8 +50,8 @@ 22 // into the calculation to get the total memory size. 23 // 24 25 - Cmos0x34 = (UINT8) CmosRead8 (0x34); 26 - Cmos0x35 = (UINT8) CmosRead8 (0x35); 27 + Cmos0x34 = CmosRead8(0x34); 28 + Cmos0x35 = CmosRead8(0x35); 29 30 return ((((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB); 11 31 } 32 @@ -77,7 +77,7 @@ 33 // 34 // Determine total memory size available 35 // 36 - TotalMemorySize = (UINT64)GetSystemMemorySize (); 37 + TotalMemorySize = GetSystemMemorySize (); 12 38 13 39 MemoryBase = 0x800000; 40 MemorySize = TotalMemorySize - MemoryBase - 0x100000;
Note:
See TracChangeset
for help on using the changeset viewer.