merge branch memory-shit into higher-half
This commit is contained in:
+25
-6
@@ -153,7 +153,13 @@ void kmain(unsigned int magic, unsigned int info)
|
||||
printf("bootloader: %s\n", mbi.boot_loader_name);
|
||||
}
|
||||
|
||||
printf("init_allocator...");
|
||||
init_allocator();
|
||||
printf("done\n");
|
||||
|
||||
printf("grub_memory_map...");
|
||||
grub_memory_map(magic, &mbi);
|
||||
printf("done\n");
|
||||
|
||||
isr_install();
|
||||
pic_remap(0x20, 0x28);
|
||||
@@ -161,14 +167,27 @@ void kmain(unsigned int magic, unsigned int info)
|
||||
|
||||
apply_pic_masks();
|
||||
|
||||
printf("done fucking with pages and memory map!\n");
|
||||
char *test_str;
|
||||
printf("test_str: %X, &test_str %X\n", test_str, &test_str);
|
||||
test_str = alloc_page();
|
||||
printf("test_str: %X, &test_str %X\n", test_str, &test_str);
|
||||
free_page(test_str);
|
||||
|
||||
alloc_page();//TODO: fix this this, because now we MUST allocate a page for checks of successfulness of allocation to pass
|
||||
//the first page is at 0x0 and in check we check by if(!<allocated page>) which returns 0 (false), yeah
|
||||
|
||||
|
||||
//while(1){}
|
||||
|
||||
//paging_init();
|
||||
//printf("paging_init done\n");
|
||||
//test_paging();
|
||||
init_allocator();
|
||||
heap_init();
|
||||
printf("after heap_init\n");
|
||||
|
||||
//heap_init();
|
||||
//printf("after heap_init\n");
|
||||
__asm__ __volatile__ ("sti");
|
||||
//scheduler_init();
|
||||
scheduler_init();
|
||||
printf("Kernel init sequence completed\n");
|
||||
|
||||
char yooo[256] = "heheh";
|
||||
@@ -185,8 +204,8 @@ void kmain(unsigned int magic, unsigned int info)
|
||||
char temp1[1024] = "rusya_krutoy";
|
||||
char temp2[1024] = "katya_tozhe_krutaya";
|
||||
|
||||
huy = heap_alloc(1024);
|
||||
huy2 = heap_alloc(1024);
|
||||
huy = alloc_page();//heap_alloc(1024);
|
||||
huy2 = alloc_page();//heap_alloc(1024);
|
||||
|
||||
memcpy(huy, temp1, sizeof(temp1));
|
||||
memcpy(huy2, temp2, sizeof(temp1));
|
||||
|
||||
Reference in New Issue
Block a user