Fixed GetBiosMemoryMap() function.

svn path=/trunk/; revision=3117
This commit is contained in:
Brian Palmer 2002-06-18 21:40:27 +00:00
parent 9fb8f57561
commit 3acd677b53
5 changed files with 11 additions and 6 deletions

View file

@ -252,7 +252,7 @@ EXTERN(_multiboot_memory_map_descriptor_size)
.long 0
EXTERN(_multiboot_memory_map)
.rept (64 * /*sizeof(memory_map_t)*/24)
.rept (32 * /*sizeof(memory_map_t)*/24)
.byte 0
.endr

View file

@ -136,7 +136,7 @@ EXTERN(_GetConventionalMemorySize)
/*
* ULONG GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap);
* ULONG GetBiosMemoryMap(PBIOS_MEMORY_MAP_ARRAY BiosMemoryMap);
*/
_gbmm_mem_map_length:
.long 0

View file

@ -37,13 +37,18 @@ typedef struct
ULONG Reserved;
} PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP;
typedef struct
{
BIOS_MEMORY_MAP BiosMemoryMapArray[32];
} PACKED BIOS_MEMORY_MAP_ARRAY, *PBIOS_MEMORY_MAP_ARRAY;
ULONG GetSystemMemorySize(VOID); // Returns the amount of total memory in the system
// These functions are implemented in mem.S
ULONG GetExtendedMemorySize(VOID); // Returns extended memory size in KB
ULONG GetConventionalMemorySize(VOID); // Returns conventional memory size in KB
ULONG GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap); // Fills mem_map structure with BIOS memory map and returns length of memory map
ULONG GetBiosMemoryMap(PBIOS_MEMORY_MAP_ARRAY BiosMemoryMap); // Fills structure with BIOS memory map and returns memory map item count

View file

@ -61,7 +61,7 @@ BOOL MmInitializeMemoryManager(VOID)
RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
BiosMemoryMapEntryCount = GetBiosMemoryMap((PBIOS_MEMORY_MAP)&BiosMemoryMap);
BiosMemoryMapEntryCount = GetBiosMemoryMap((PBIOS_MEMORY_MAP_ARRAY)BiosMemoryMap);
ExtendedMemorySize = GetExtendedMemorySize();
ConventionalMemorySize = GetConventionalMemorySize();

View file

@ -190,7 +190,7 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos)
DbgPrint((DPRINT_REACTOS, "hServiceKey: %x\n", (int)hServiceKey));
BufferSize = sizeof(ValueBuffer);
rc = RegQueryValue(hGroupKey, "List", NULL, (PUCHAR)&ValueBuffer, &BufferSize);
rc = RegQueryValue(hGroupKey, "List", NULL, (PUCHAR)ValueBuffer, &BufferSize);
DbgPrint((DPRINT_REACTOS, "RegQueryValue(): rc %d\n", (int)rc));
if (rc != ERROR_SUCCESS)
return;
@ -394,7 +394,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
mb_info.mods_count = 0;
mb_info.mods_addr = (unsigned long)multiboot_modules;
mb_info.mmap_length = (unsigned long)GetBiosMemoryMap((PBIOS_MEMORY_MAP)&multiboot_memory_map);
mb_info.mmap_length = (unsigned long)GetBiosMemoryMap((PBIOS_MEMORY_MAP_ARRAY)&multiboot_memory_map);
if (mb_info.mmap_length)
{
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;