added mm_bootstrap() skeleton function
git-svn-id: svn://anubis/hos/trunk@31 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
parent
02c2b25ded
commit
2faa2cc8d6
@ -40,5 +40,12 @@ u32_t k_bootstrap(mb_info_t * mb_info, u32_t mb_magic)
|
|||||||
|
|
||||||
DEBUG_LETTER(3, 'd');
|
DEBUG_LETTER(3, 'd');
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These functions could destroy the multiboot information block and
|
||||||
|
* associated structures, so we must be finished reading those structures
|
||||||
|
* before calling them.
|
||||||
|
*/
|
||||||
|
mm_bootstrap();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -28,3 +28,27 @@ void mm_record_mmap_entry(mb_mmap_t * mmap)
|
|||||||
k_early_panic("Too many mmap_entries!");
|
k_early_panic("Too many mmap_entries!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* This function is run in segmented memory before paging is in effect. *
|
||||||
|
* It is run after the bootloader information has been read, so we can *
|
||||||
|
* overwrite that memory now. *
|
||||||
|
*************************************************************************/
|
||||||
|
void mm_bootstrap()
|
||||||
|
{
|
||||||
|
if (mm_mmap_num_entries < 1)
|
||||||
|
{
|
||||||
|
k_early_panic("No mmap entries read from bootloader!");
|
||||||
|
}
|
||||||
|
|
||||||
|
int mmap_idx, i;
|
||||||
|
for (mmap_idx = 0; mmap_idx < mm_mmap_num_entries; mmap_idx++)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Clear the page directory */
|
||||||
|
for (i = 0; i < sizeof(page_directory) / sizeof(page_directory[0]); i++)
|
||||||
|
{
|
||||||
|
page_directory[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -20,6 +20,7 @@ typedef struct
|
|||||||
} mm_mem_range_t;
|
} mm_mem_range_t;
|
||||||
|
|
||||||
void mm_record_mmap_entry(mb_mmap_t * mmap);
|
void mm_record_mmap_entry(mb_mmap_t * mmap);
|
||||||
|
void mm_bootstrap();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user