Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
init.h
Go to the documentation of this file.
1#ifndef __INIT__INIT_H__
2#define __INIT__INIT_H__
3
5#include "init/initrd.h"
6#include "memory/entry.h"
7
8#define MAX_MEMORY_ENTRIES 256
9
14
23
24typedef void (*initcall_t)(init_context_t* ctx);
25
26#define INIT(fn) \
27 void init##fn(__attribute__((unused)) init_context_t* ctx); \
28 static initcall_t __init_##fn \
29 __attribute__((used, section(".init_early." #fn))) = init##fn; \
30 void init##fn(__attribute__((unused)) init_context_t* ctx)
31
32#define INFLOOP \
33 for (;;) \
34 __asm__ volatile("hlt");
35
36#endif // __INIT__INIT_H
framebuffer_t
Definition framebuffer.h:19
#define MAX_MEMORY_ENTRIES
Definition init.h:8
void(* initcall_t)(init_context_t *ctx)
Definition init.h:24
struct initrd_module initrd_module_t
size_t kernel_raw_size
Definition init.h:21
uintptr_t kernel_raw_addr
Definition init.h:20
initrd_module_t initrd_module
Definition init.h:16
framebuffer_t framebuffer
Definition init.h:19
memory_context_t memory
Definition init.h:17
uintptr_t rsdp_addr
Definition init.h:18
uint64_t memory_entries
Definition init.h:11
memory_entry_t memory_map[256]
Definition init.h:12
unsigned long uintptr_t
Definition type.h:73
unsigned long uint64_t
Definition type.h:25