diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-26 12:37:34 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-26 12:37:34 +0200 |
| commit | 9dc527b3be9d493dcf8cf1baf78477373eb5990d (patch) | |
| tree | 0b32c28e57fc5a6a3e6210d9a601dfdbfe246cd8 /src/boucane.cc | |
| parent | 7db6db5ae64e7ab2626bbd898c63f58e053dc1a6 (diff) | |
Enable psf font for framebuffer display
Diffstat (limited to 'src/boucane.cc')
| -rw-r--r-- | src/boucane.cc | 53 |
1 files changed, 46 insertions, 7 deletions
diff --git a/src/boucane.cc b/src/boucane.cc index 6541902..791c5cc 100644 --- a/src/boucane.cc +++ b/src/boucane.cc @@ -4,21 +4,60 @@ #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" extern u32 MB_INFO; +extern u64 res_binary_res_terminus_psf_start; + + + + + + + extern "C" void boucane(){ - clear(); - printk("Booting Boucane v%d.%d.%d\n",VERSION_MAJOR,VERSION_MINOR, VERSION_PATH); - idt_enable_interrupt(); + //clear(); + //printk("Booting Boucane v%d.%d.%d\n",VERSION_MAJOR,VERSION_MINOR, VERSION_PATH); + //idt_enable_interrupt(); paging_enable(); + + 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(); //apic_enable(); - u64 p; +/* u64 p; u32 size; if(mb2_find_old_rsdp((u32*)MB_INFO,&p,&size)){ - acpi_load_madt((void*)p); - } + 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"); + //} while(1); }
\ No newline at end of file |
