[mem] Use incoming Multiboot information about ram size

This commit is contained in:
Kevin Lange 2011-01-20 19:51:52 -06:00
parent 91a473ffdd
commit c661bcc5da
2 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ free_frame(
void
paging_install(uint32_t memsize) {
nframes = 0x1000; //memsize / 4;
nframes = memsize / 4;
frames = (uint32_t *)kmalloc(INDEX_FROM_BIT(nframes));
memset(frames, 0, INDEX_FROM_BIT(nframes));
kernel_directory = (page_directory_t *)kvmalloc(sizeof(page_directory_t));

2
main.c
View File

@ -130,7 +130,7 @@ main(struct multiboot *mboot_ptr) {
isrs_install();
irq_install();
init_video();
paging_install(mboot_ptr->mem_upper);
paging_install(mboot_ptr->mem_upper + 1024);
timer_install();
keyboard_install();
/* Yes, yes, these are #define'd strings, consider this a nice test of kprintf */