boucane/src/boucane.cc

42 lines
1.1 KiB
C++
Raw Normal View History

2021-04-21 12:23:54 +02:00
#include "boucane.hpp"
2021-04-21 18:54:50 +02:00
#include "core/idt.hpp"
#include "boot/multiboot2.hpp"
#include "core/paging.hpp"
#include "core/apic.hpp"
#include "drivers/acpi.hpp"
#include "drivers/psf.hpp"
#include "drivers/framebuffer.hpp"
#include "libs/stdio.hpp"
#include "core/asm.hpp"
2021-04-27 19:02:17 +02:00
extern u32 MB_INFO;
extern u64 res_binary_res_terminus_psf_start;
2021-04-21 12:23:54 +02:00
extern "C" void boucane(){
2021-04-27 19:02:17 +02:00
// Init data structures
LOAD_GDT();
paging_enable();
2021-04-27 19:02:17 +02:00
idt_enable_interrupt();
FRAMEBUFFER fb_info;
2021-04-27 19:02:17 +02:00
if(mb2_find_framebuffer((u32*)&MB_INFO, &fb_info)){
if(fb_info.bpp>16){
FB_CFG conf;
conf.depth=fb_info.bpp;
conf.location=fb_info.addr;
conf.pitch=fb_info.pitch;
conf.width=fb_info.width;
conf.height=fb_info.height;
framebuffer_init(conf);
psf_init((void*)&res_binary_res_terminus_psf_start);
__putchar=psf_putchar;
}
}
2021-04-27 19:02:17 +02:00
vga_t_init();
vga_t_clear();
printk("Booting Boucane v%d.%d.%d\n",VERSION_MAJOR,VERSION_MINOR, VERSION_PATH);
2021-04-27 19:02:17 +02:00
2021-04-21 12:23:54 +02:00
while(1);
}