fix: start frame allocator after kernel code

This commit is contained in:
2024-11-20 01:51:07 +01:00
parent b7dd7761d5
commit 3bc05604db
4 changed files with 57 additions and 32 deletions

View File

@ -30,22 +30,17 @@
frame_table[i / 8] &= ~(1 << (i % 8)); \
} while (0)
/*
* len is the total size of the zone (ratio starnakin)
* size is the remaining usable size after allocating
* the struct for the linked list
*/
struct frame_zone {
void *addr;
uint32_t first_free_frame;
uint32_t *frame_table;
uint32_t len;
uint32_t size;
uint8_t *frame_table;
uint32_t total_frames;
uint32_t remaining_frames;
struct frame_zone *next;
};
extern uint32_t _kernel_end;
extern uint32_t _kernel_start;
extern uint32_t boot_page_directory;
extern uint32_t *page_directory;
extern uint32_t page_table_default[1024];