[mem] Use incoming Multiboot information about ram size
This commit is contained in:
parent
91a473ffdd
commit
c661bcc5da
@ -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
2
main.c
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user