x86_64: add basic interrupt handling

This commit is contained in:
2023-02-08 20:24:40 +00:00
parent 18c5b34923
commit 5e10f566a4
7 changed files with 515 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ int ml_init(uintptr_t arg)
print_kernel_banner();
early_vm_init();
e820_scan(PTR32(mb->mmap_addr), mb->mmap_length);
@@ -60,9 +61,9 @@ int ml_init(uintptr_t arg)
/* test allocation */
vm_page_t *p = vm_page_alloc(VM_PAGE_16K, 0);
if (p) {
void *p_ptr = vm_page_get_vaddr(p);
void *p_ptr = vm_page_get_vaddr(p);
printk("allocated 16K at %p", p_ptr);
printk("allocated 16K at %p", p_ptr);
} else {
printk("alloc failed");
}