mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Intialize the size for the bios memory map.
svn path=/trunk/; revision=3796
This commit is contained in:
parent
5f973ce0cf
commit
dd6e3b8b31
1 changed files with 18 additions and 11 deletions
|
@ -109,25 +109,32 @@ VOID RunLoader(VOID)
|
|||
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)&multiboot_memory_map) * sizeof(memory_map_t);
|
||||
if (mb_info.mmap_length)
|
||||
{
|
||||
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
|
||||
mb_info.flags |= MB_INFO_FLAG_MEMORY_MAP;
|
||||
multiboot_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24
|
||||
#if 0
|
||||
printf("memory map length: %d\n", mb_info.mmap_length);
|
||||
printf("dumping memory map:\n");
|
||||
for (i=0; i<(mb_info.mmap_length / 4); i++)
|
||||
{
|
||||
printf("0x%x\n", ((unsigned long *)&multiboot_memory_map)[i]);
|
||||
}
|
||||
getch();
|
||||
{
|
||||
int i;
|
||||
printf("memory map length: %d\n", mb_info.mmap_length);
|
||||
printf("dumping memory map:\n");
|
||||
for (i=0; i<(mb_info.mmap_length / sizeof(memory_map_t)); i++)
|
||||
{
|
||||
printf("start: %x\t size: %x\t type %d\n",
|
||||
multiboot_memory_map[i].base_addr_low,
|
||||
multiboot_memory_map[i].length_low,
|
||||
multiboot_memory_map[i].type);
|
||||
}
|
||||
getch();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if 0
|
||||
// printf("low_mem = %d\n", mb_info.mem_lower);
|
||||
// printf("high_mem = %d\n", mb_info.mem_upper);
|
||||
// getch();
|
||||
printf("low_mem = %d\n", mb_info.mem_lower);
|
||||
printf("high_mem = %d\n", mb_info.mem_upper);
|
||||
getch();
|
||||
#endif
|
||||
|
||||
/* Initialize registry */
|
||||
|
|
Loading…
Reference in a new issue