feat: fixups and init moving

This commit is contained in:
2024-03-29 21:32:21 +01:00
parent 32ca1bfe18
commit e197919f35
3 changed files with 7 additions and 4 deletions

View File

@@ -9,7 +9,8 @@
#include <yak/rt/debug/debug.h>
#include <yak/rt/kmain.h>
#include <yak/rt/kprint.h>
#include "yak/rt/core/mem/memmap.h"
#include <yak/rt/core/mem/memmap.h>
#include <yak/platform/generic/platform.h>
static struct limine_bootloader_info_request limine_bootloader_info_request = {
.id = LIMINE_BOOTLOADER_INFO_REQUEST,
@@ -127,6 +128,8 @@ uint8_t limmine_memmap_to_memmap_type(uint64_t type) {
}
void limine_init() {
// limine_init is called from the bootloader, we are responsible for triggering the c-rt init
_init();
if (limine_terminal_request.response != NULL && limine_terminal_request.response->terminal_count >= 1) {
kprint_register(limine_terminal_kprint);
}

View File

@@ -3,7 +3,9 @@
//
#include <yak/rt/core/mem/liballoc.h>
#include "yak/rt/panic.h"
#include <yak/rt/panic.h>
// this file connects liballoc to yak
#define PREALLOC_PAGES 16
#define PAGE_SIZE 4096

View File

@@ -3,8 +3,6 @@
#include <yak/platform/generic/platform.h>
void kmain() {
_init();
// kmain is called from one of the bootloader implementations
// perform platform specific initialisation
platform_init();