mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:25:58 +00:00
Fixed GetBiosMemoryMap() function.
svn path=/trunk/; revision=3117
This commit is contained in:
parent
9fb8f57561
commit
3acd677b53
5 changed files with 11 additions and 6 deletions
|
@ -252,7 +252,7 @@ EXTERN(_multiboot_memory_map_descriptor_size)
|
||||||
.long 0
|
.long 0
|
||||||
|
|
||||||
EXTERN(_multiboot_memory_map)
|
EXTERN(_multiboot_memory_map)
|
||||||
.rept (64 * /*sizeof(memory_map_t)*/24)
|
.rept (32 * /*sizeof(memory_map_t)*/24)
|
||||||
.byte 0
|
.byte 0
|
||||||
.endr
|
.endr
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ EXTERN(_GetConventionalMemorySize)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ULONG GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap);
|
* ULONG GetBiosMemoryMap(PBIOS_MEMORY_MAP_ARRAY BiosMemoryMap);
|
||||||
*/
|
*/
|
||||||
_gbmm_mem_map_length:
|
_gbmm_mem_map_length:
|
||||||
.long 0
|
.long 0
|
||||||
|
|
|
@ -37,13 +37,18 @@ typedef struct
|
||||||
ULONG Reserved;
|
ULONG Reserved;
|
||||||
} PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP;
|
} 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
|
ULONG GetSystemMemorySize(VOID); // Returns the amount of total memory in the system
|
||||||
|
|
||||||
// These functions are implemented in mem.S
|
// These functions are implemented in mem.S
|
||||||
ULONG GetExtendedMemorySize(VOID); // Returns extended memory size in KB
|
ULONG GetExtendedMemorySize(VOID); // Returns extended memory size in KB
|
||||||
ULONG GetConventionalMemorySize(VOID); // Returns conventional 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ BOOL MmInitializeMemoryManager(VOID)
|
||||||
|
|
||||||
RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
|
RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
|
||||||
|
|
||||||
BiosMemoryMapEntryCount = GetBiosMemoryMap((PBIOS_MEMORY_MAP)&BiosMemoryMap);
|
BiosMemoryMapEntryCount = GetBiosMemoryMap((PBIOS_MEMORY_MAP_ARRAY)BiosMemoryMap);
|
||||||
ExtendedMemorySize = GetExtendedMemorySize();
|
ExtendedMemorySize = GetExtendedMemorySize();
|
||||||
ConventionalMemorySize = GetConventionalMemorySize();
|
ConventionalMemorySize = GetConventionalMemorySize();
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos)
|
||||||
DbgPrint((DPRINT_REACTOS, "hServiceKey: %x\n", (int)hServiceKey));
|
DbgPrint((DPRINT_REACTOS, "hServiceKey: %x\n", (int)hServiceKey));
|
||||||
|
|
||||||
BufferSize = sizeof(ValueBuffer);
|
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));
|
DbgPrint((DPRINT_REACTOS, "RegQueryValue(): rc %d\n", (int)rc));
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
return;
|
return;
|
||||||
|
@ -394,7 +394,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||||
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
|
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
|
||||||
mb_info.mods_count = 0;
|
mb_info.mods_count = 0;
|
||||||
mb_info.mods_addr = (unsigned long)multiboot_modules;
|
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)
|
if (mb_info.mmap_length)
|
||||||
{
|
{
|
||||||
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
|
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue