1
0
Fork 0
mirror of https://gitlab.com/bztsrc/bootboot.git synced 2023-02-13 20:54:32 -05:00

Minor fixes to the rust mykernel

This commit is contained in:
bzt 2022-07-10 08:06:34 +02:00
parent d0c66e7097
commit 58ce2515c0

View file

@ -1,7 +1,7 @@
/*
* mykernel/rust/src/main.rs
*
* Copyright (C) 2017 - 2021 Vinay Chandra
* Copyright (C) 2017 - 2022 Vinay Chandra, Valkony Balázs
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@ -32,9 +32,6 @@
#![no_std]
#![no_main]
#[cfg(not(test))]
use core::panic::PanicInfo;
#[allow(dead_code)]
#[allow(non_snake_case)]
#[allow(non_camel_case_types)]
@ -97,10 +94,10 @@ fn _start() -> ! {
unsafe { *(addr as *mut u64) = 0x000000FF };
}
}
}
// say hello
puts("Hello Rust Hobby Kernel");
puts("Hello from a simple BOOTBOOT kernel");
}
// hang for now
loop {}
@ -109,9 +106,7 @@ fn _start() -> ! {
/**************************
* Display text on screen *
**************************/
//TODO: REFACTOR
fn puts(string: &'static str) {
fn puts(string: &'static str) {
use bootboot::*;
let fb = BOOTBOOT_FB as u64;
@ -155,13 +150,3 @@ fn _start() -> ! {
}
}
}
/*************************************
* This function is called on panic. *
*************************************/
#[cfg(not(test))]
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}