VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-memdetect@ 31903

Last change on this file since 31903 was 30271, checked in by vboxsync, 15 years ago

EFI: fixes signature of GetSystemMemorySize, fetching amount of memory from CMOS.

File size: 1.0 KB
Line 
1Index: OvmfPkg/PlatformPei/MemDetect.c
2===================================================================
3--- OvmfPkg/PlatformPei/MemDetect.c (revision 9332)
4+++ OvmfPkg/PlatformPei/MemDetect.c (working copy)
5@@ -34,12 +34,12 @@
6 #include "Cmos.h"
7
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);
31 }
32@@ -77,7 +77,7 @@
33 //
34 // Determine total memory size available
35 //
36- TotalMemorySize = (UINT64)GetSystemMemorySize ();
37+ TotalMemorySize = GetSystemMemorySize ();
38
39 MemoryBase = 0x800000;
40 MemorySize = TotalMemorySize - MemoryBase - 0x100000;
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette