ZealBooter: Add minimal code to get kernel address

This commit is contained in:
mintsuki 2022-08-20 02:21:36 +02:00
parent 69f0f37b9b
commit 325160e13b

View file

@ -6,6 +6,11 @@
// the compiler does not optimise them away, so, usually, they should
// be made volatile or equivalent.
static volatile struct limine_module_request module_request = {
.id = LIMINE_MODULE_REQUEST,
.revision = 0
};
static volatile struct limine_terminal_request terminal_request = {
.id = LIMINE_TERMINAL_REQUEST,
.revision = 0
@ -17,6 +22,10 @@ static void done(void) {
}
}
struct CKernel {
};
// The following will be our kernel's entry point.
void _start(void) {
// Ensure we got a terminal
@ -30,6 +39,9 @@ void _start(void) {
struct limine_terminal *terminal = terminal_request.response->terminals[0];
terminal_request.response->write(terminal, "Hello World", 11);
struct limine_file *kernel = module_request.response->modules[0];
struct CKernel *CKernel = kernel->address;
// We're done, just hang...
done();
}