grub.mk mdr

This commit is contained in:
Jack Halford 2018-04-12 14:49:52 +02:00
parent ee5f2780e5
commit 5f40aeeae5
4 changed files with 5 additions and 20 deletions

View file

@ -6,5 +6,4 @@ $(grub-iso): $(kernel) $(grub-cfg) Makefile
@mkdir -p $(isodir)/boot/grub
@cp $(grub-cfg) $(isodir)/boot/grub
@cp $(kernel) $(isodir)/boot/$(OS)
@grub-mkrescue -o $@ $(isodir) 2>/dev/null
@printf "\r\033[38;5;117m✓ GRUB ==> $(grub-iso)\033[0m\033[K\n"
grub-mkrescue -o $@ $(isodir) 2>/dev/null

View file

@ -58,7 +58,7 @@ align 4096
p2_table:
resb 4096
stack_bottom:
resb 4096 * 3
resb 4096 * 4
stack_top:
section .gdt

View file

@ -33,23 +33,10 @@ pub unsafe extern "C" fn x86_rust_start(multiboot_info_addr: usize) {
// set up physical allocator
::memory::init(&boot_info);
// let memory_map_tag = boot_info.memory_map_tag().expect("Memory map tag required");
// println!("memory areas:");
// for area in memory_map_tag.memory_areas() {
// println!(
// " start: {:#x}, end: {:#x} length: {:#x}",
// area.start_address(),
// area.end_address(),
// area.size()
// );
// }
// flush!();
// asm!("hlt");
// set up virtual addressing (paging)
let mut active_table = paging::init(&boot_info);
// fill and load idt (exceptions + irqs)
// load idt (exceptions + irqs)
idt::init();
// set up heap

View file

@ -60,10 +60,9 @@ pub fn kmain() -> ! {
// *(0xdead as *mut u32) = 42;
// };
// vga is specific to chipset not cpu
// vga is *not* cpu specific, chipset specific?
vga::init();
// loop { keyboard::kbd_callback(); }
loop {}
}
@ -81,7 +80,7 @@ pub extern "C" fn panic_fmt(fmt: core::fmt::Arguments, file: &'static str, line:
loop {}
}
pub const HEAP_START: usize = (2 << 22); //third entry of p2
pub const HEAP_START: usize = (1 << 22 + 2); //third entry of p2
pub const HEAP_SIZE: usize = 10 * 4096 * 8; //~ 100 KiB
#[global_allocator]