mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
* We did loose tasking and only have a paging skeleton, but hey it took like 4 months so i'm happy that there's something :p
27 lines
578 B
C
27 lines
578 B
C
#ifndef _BOOTLOADER_H
|
|
#define _BOOTLOADER_H
|
|
|
|
#include <kernel.h>
|
|
#include <limine.h>
|
|
|
|
struct bootloader {
|
|
size_t hhdm_offset;
|
|
size_t kernel_virt_base;
|
|
size_t kernel_phys_base;
|
|
size_t mm_total;
|
|
uint64_t mm_entry_count;
|
|
LIMINE_PTR(struct limine_memmap_entry**) mm_entries;
|
|
uint64_t fb_entry_count;
|
|
LIMINE_PTR(struct limine_framebuffer**) fb_entries;
|
|
};
|
|
|
|
extern struct bootloader bootloader;
|
|
|
|
#define IS_INSIDE_HHDM(_addr) \
|
|
((size_t)(_addr) >= bootloader.hhdm_offset && \
|
|
(size_t)(_addr) <= (bootloader.hhdm_offset + bootloader.mm_total))
|
|
|
|
int boot_init(void);
|
|
|
|
#endif
|