feat(gdt): add gdt, tss, stack in dedicated section to no overwrite pagination pages
continuous-integration/drone/push Build is passing

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
juju committed 2021-12-03 22:32:03 +01:00
1 parent 20e5771780
commit 03acf2943e
4 files changed
+72 -9

No files matched your search

+9 -3
View File
@@ -2,9 +2,10 @@
#![no_main]
#![feature(abi_x86_interrupt)]
mod gdt;
mod interrupts;
mod serial;
mod vga;
mod interrupts;
use core::panic::PanicInfo;
use vga::{Color, ColorCode};
@@ -19,6 +20,7 @@ fn panic_handler(info: &PanicInfo) -> ! {
pub fn init() {
vga::change_color(ColorCode::new(Color::LightCyan, Color::Black));
println!("Starting init");
gdt::init_gdt();
interrupts::init_idt();
vga::change_color(ColorCode::new(Color::LightGreen, Color::Black));
}
@@ -27,7 +29,11 @@ pub fn init() {
pub extern "C" fn julios_main() -> ! {
init();
println!("***JuliOS V0.1.0***");
serial_println!("Hello serial");
x86_64::instructions::interrupts::int3();
fn stack_overflow() {
stack_overflow(); // for each recursion, the return address is pushed
}
stack_overflow();
panic!("Kernel end of flow");
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.