thanks to bug found by Nick - fixed mmap traversal and size calculation
git-svn-id: svn://anubis/hos/trunk@84 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
parent
85c5a26631
commit
1be6e37961
@ -43,11 +43,13 @@ void k_bootstrap(mb_info_t * mb_info, u32_t mb_magic)
|
||||
k_early_panic("No memory map provided by bootloader!");
|
||||
}
|
||||
|
||||
mb_mmap_t * mmap = (mb_mmap_t *) (mb_info->mmap_addr + KERNEL_OFFSET);
|
||||
for (unsigned int sz = 0; sz < mb_info->mmap_length; sz += mmap->size + 4)
|
||||
for (mb_mmap_t * mmap = (mb_mmap_t *) (mb_info->mmap_addr + KERNEL_OFFSET),
|
||||
* end = (mb_mmap_t *) ((u32_t)mmap + mb_info->mmap_length);
|
||||
mmap < end;
|
||||
mmap = (mb_mmap_t *) (((u32_t)mmap) + mmap->size + 4))
|
||||
{
|
||||
kprintf(" ** size: %d, type: %d ", mmap->size, mmap->type);
|
||||
mm_record_mmap_entry(mmap);
|
||||
mmap = (mb_mmap_t *) (((u32_t)mmap) + mmap->size + 4);
|
||||
}
|
||||
|
||||
DEBUG_LETTER(2, 'c');
|
||||
|
Loading…
x
Reference in New Issue
Block a user