2021-04-21 12:23:54 +02:00
|
|
|
#include "boucane.hpp"
|
2021-04-21 18:54:50 +02:00
|
|
|
#include "core/idt.hpp"
|
2021-04-24 10:09:43 +02:00
|
|
|
#include "boot/multiboot2.hpp"
|
|
|
|
#include "core/paging.hpp"
|
2021-04-25 12:41:24 +02:00
|
|
|
#include "core/apic.hpp"
|
|
|
|
#include "drivers/acpi.hpp"
|
2021-04-26 12:37:34 +02:00
|
|
|
#include "drivers/psf.hpp"
|
|
|
|
#include "drivers/framebuffer.hpp"
|
|
|
|
#include "libs/stdio.hpp"
|
|
|
|
#include "core/asm.hpp"
|
2021-04-24 10:09:43 +02:00
|
|
|
extern u32 MB_INFO;
|
2021-04-26 12:37:34 +02:00
|
|
|
extern u64 res_binary_res_terminus_psf_start;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-21 12:23:54 +02:00
|
|
|
|
|
|
|
extern "C" void boucane(){
|
2021-04-26 12:37:34 +02:00
|
|
|
//clear();
|
|
|
|
//printk("Booting Boucane v%d.%d.%d\n",VERSION_MAJOR,VERSION_MINOR, VERSION_PATH);
|
|
|
|
//idt_enable_interrupt();
|
2021-04-21 12:23:54 +02:00
|
|
|
|
2021-04-24 10:09:43 +02:00
|
|
|
paging_enable();
|
2021-04-26 12:37:34 +02:00
|
|
|
|
|
|
|
FRAMEBUFFER fb_info;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printk("Booting Boucane v%d.%d.%d\n",VERSION_MAJOR,VERSION_MINOR, VERSION_PATH);
|
|
|
|
printk("Jean");
|
|
|
|
|
|
|
|
printk("Loic");
|
|
|
|
//framebuffer_clear();
|
2021-04-25 12:41:24 +02:00
|
|
|
//apic_enable();
|
2021-04-24 10:09:43 +02:00
|
|
|
|
2021-04-26 12:37:34 +02:00
|
|
|
/* u64 p;
|
2021-04-24 10:09:43 +02:00
|
|
|
u32 size;
|
|
|
|
if(mb2_find_old_rsdp((u32*)MB_INFO,&p,&size)){
|
2021-04-26 12:37:34 +02:00
|
|
|
acpi_init((void*)p);
|
|
|
|
}*/
|
|
|
|
|
|
|
|
//FRAMEBUFFER fb;
|
|
|
|
//if(mb2_find_framebuffer((u32*)MB_INFO, &fb)){
|
|
|
|
//printk("Framebuffer found!");
|
|
|
|
//framebuffer_init(fb.addr, fb.pitch, fb.bpp);
|
|
|
|
//__putchar=psf_print;
|
|
|
|
//printk("Hello");
|
|
|
|
//}
|
2021-04-21 12:23:54 +02:00
|
|
|
while(1);
|
|
|
|
}
|