Apply bootloader config correctly

Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
2025-07-22 20:27:01 +02:00
parent 4605190a4e
commit 548acbbb5e
2 changed files with 12 additions and 12 deletions

View File

@@ -1,18 +1,9 @@
#![no_std]
use bootloader_api::{
BootInfo,
config::{BootloaderConfig, Mapping},
};
use bootloader_api::BootInfo;
mod logging;
pub static BOOTLOADER_CONFIG: BootloaderConfig = {
let mut config = BootloaderConfig::new_default();
config.mappings.physical_memory = Some(Mapping::Dynamic);
config
};
pub fn main(boot_info: &'static mut BootInfo) -> ! {
let info = boot_info.framebuffer.as_ref().unwrap().info();
let buffer = boot_info.framebuffer.as_mut().unwrap().buffer_mut();

View File

@@ -1,6 +1,15 @@
#![no_std]
#![no_main]
use bootloader_api::entry_point;
use bootloader_api::{
config::{BootloaderConfig, Mapping},
entry_point,
};
entry_point!(kernel::main);
static BOOTLOADER_CONFIG: BootloaderConfig = {
let mut config = BootloaderConfig::new_default();
config.mappings.physical_memory = Some(Mapping::Dynamic);
config
};
entry_point!(kernel::main, config = &BOOTLOADER_CONFIG);