Merge branch 'master' of github.com:klange/osdev
This commit is contained in:
commit
24ff0b84f2
@ -376,10 +376,6 @@ initrd_mount(
|
||||
initrd_root_block = (ext2_bgdescriptor_t *)((uintptr_t)initrd_start + 1024 + 1024);
|
||||
initrd_inode_table = (ext2_inodetable_t *)((uintptr_t)initrd_start + (1024 << initrd_superblock->log_block_size) * initrd_root_block->inode_table);
|
||||
ext2_inodetable_t * root_inode = ext2_get_inode(2);
|
||||
kprintf("[DEBUG] root block 0 is %d\n", root_inode->block[0]);
|
||||
kprintf("[DEBUG] root size is %d\n", root_inode->size);
|
||||
kprintf("[DEBUG] uid is %d\n", root_inode->uid);
|
||||
kprintf("[DEBUG] atime is %d\n", root_inode->atime);
|
||||
initrd_root = (fs_node_t *)malloc(sizeof(fs_node_t));
|
||||
assert(initrd_node_root(root_inode, initrd_root));
|
||||
fs_root = initrd_root;
|
||||
|
@ -191,8 +191,6 @@ paging_install(uint32_t memsize) {
|
||||
kernel_directory = (page_directory_t *)kvmalloc_p(sizeof(page_directory_t),&phys);
|
||||
memset(kernel_directory, 0, sizeof(page_directory_t));
|
||||
|
||||
kprintf("0x%x\n", phys);
|
||||
|
||||
uint32_t i = 0;
|
||||
while (i < placement_pointer + 0x1000) {
|
||||
alloc_frame(get_page(i, 1, kernel_directory), 0, 0);
|
||||
|
@ -67,10 +67,8 @@ move_stack(
|
||||
for ( i = (uintptr_t)new_stack_start;
|
||||
i >= ((uintptr_t)new_stack_start - size);
|
||||
i -= 0x1000) {
|
||||
kprintf("Allocating a page for 0x%x\n", i);
|
||||
alloc_frame(get_page(i, 1, current_directory), 0 /* user */, 1 /* writable */);
|
||||
}
|
||||
puts("Herping the derp.\n");
|
||||
uintptr_t pd_addr;
|
||||
__asm__ __volatile__ ("mov %%cr3, %0" : "=r" (pd_addr));
|
||||
__asm__ __volatile__ ("mov %0, %%cr3" : : "r" (pd_addr));
|
||||
@ -81,7 +79,6 @@ move_stack(
|
||||
uintptr_t offset = (uintptr_t)new_stack_start - initial_esp;
|
||||
uintptr_t new_stack_pointer = old_stack_pointer + offset;
|
||||
uintptr_t new_base_pointer = old_base_pointer + offset;
|
||||
kprintf("0x%x 0x%x\n", new_stack_pointer, old_stack_pointer);
|
||||
memcpy((void *)new_stack_pointer, (void *)old_stack_pointer, initial_esp - old_stack_pointer);
|
||||
for (i = (uintptr_t)new_stack_start; i > (uintptr_t)new_stack_start - size; i -= 4) {
|
||||
uintptr_t temp = *(uintptr_t*)i;
|
||||
|
@ -95,10 +95,8 @@ int main(struct multiboot *mboot_ptr, uint32_t mboot_mag, uintptr_t esp)
|
||||
|
||||
/* Memory management */
|
||||
paging_install(mboot_ptr->mem_upper);
|
||||
kprintf("herp\n");
|
||||
heap_install();
|
||||
tasking_install();
|
||||
kprintf("derp\n");
|
||||
|
||||
/* Kernel Version */
|
||||
settextcolor(12, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user