wip: multiboot struct is now in the page directory/page table
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "multiboot.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@ -17,16 +19,16 @@
|
||||
#define PT_START 256
|
||||
|
||||
#define GET_PAGE_ADDR(pd_index, pt_index) \
|
||||
(((pd_index * 1024) + pt_index) * 4096)
|
||||
((((uint32_t)pd_index * 1024) + (uint32_t)pt_index) * 4096)
|
||||
|
||||
extern uint32_t _kernel_end;
|
||||
extern uint32_t boot_page_directory;
|
||||
extern uint32_t *page_directory;
|
||||
extern uint32_t page_table_default[1024];
|
||||
extern uint64_t mem_size;
|
||||
extern uint32_t mem_size;
|
||||
|
||||
uint32_t *virt_to_phys(uint32_t *virt_addr);
|
||||
void init_memory(void);
|
||||
void init_memory(multiboot_info_t *mbd, uint32_t magic);
|
||||
void *alloc_frames(size_t size);
|
||||
int free_frames(void *frame_ptr, size_t size);
|
||||
void *alloc_pages(size_t size);
|
||||
|
Reference in New Issue
Block a user