forked from xamidev/pepperOS
Flanterm integration? but page fault in flanterm_fb_double_buffer_flush
This commit is contained in:
32
src/kmain.c
32
src/kmain.c
@@ -23,11 +23,15 @@
|
||||
#include "sched/process.h"
|
||||
#include "sched/scheduler.h"
|
||||
#include "config.h"
|
||||
#include "io/term/flanterm.h"
|
||||
#include "io/term/flanterm_backends/fb.h"
|
||||
|
||||
// Limine version used
|
||||
__attribute__((used, section(".limine_requests")))
|
||||
volatile LIMINE_BASE_REVISION(3);
|
||||
|
||||
struct flanterm_context *ft_ctx;
|
||||
|
||||
// Halt and catch fire (makes machine stall)
|
||||
void hcf()
|
||||
{
|
||||
@@ -51,12 +55,12 @@ extern struct process_t* current_process;
|
||||
|
||||
void pedicel_main(void* arg)
|
||||
{
|
||||
printf("Hello, world from a KERNEL PROCESS!");
|
||||
//printf("Hello, world from a KERNEL PROCESS!");
|
||||
}
|
||||
|
||||
void two_main(void* arg)
|
||||
{
|
||||
printf("...process 2 speaking!!!");
|
||||
//printf("...process 2 speaking!!!");
|
||||
}
|
||||
|
||||
void idle_main(void* arg)
|
||||
@@ -75,6 +79,23 @@ void kmain()
|
||||
boot_ctx.hhdm = hhdm_request.response ? hhdm_request.response : NULL;
|
||||
boot_ctx.kaddr = kerneladdr_request.response ? kerneladdr_request.response : NULL;
|
||||
|
||||
ft_ctx = flanterm_fb_init(
|
||||
NULL,
|
||||
NULL,
|
||||
boot_ctx.fb->address, boot_ctx.fb->width, boot_ctx.fb->height, boot_ctx.fb->pitch,
|
||||
boot_ctx.fb->red_mask_size, boot_ctx.fb->red_mask_shift,
|
||||
boot_ctx.fb->green_mask_size, boot_ctx.fb->green_mask_shift,
|
||||
boot_ctx.fb->blue_mask_size, boot_ctx.fb->blue_mask_shift,
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
NULL, NULL,
|
||||
NULL, NULL,
|
||||
NULL, 0, 0, 1,
|
||||
0, 0,
|
||||
0,
|
||||
0
|
||||
);
|
||||
|
||||
serial_init();
|
||||
|
||||
memmap_display(boot_ctx.mmap);
|
||||
@@ -109,8 +130,11 @@ void kmain()
|
||||
SET_INTERRUPTS;
|
||||
|
||||
keyboard_init(FR);
|
||||
term_init();
|
||||
kputs(PEPPEROS_SPLASH);
|
||||
//term_init();
|
||||
|
||||
printf(PEPPEROS_SPLASH);
|
||||
|
||||
printf("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eu diam id sem tincidunt vestibulum. Etiam sed congue nisl, vitae aliquet orci. Donec magna turpis, semper sed ipsum eget, semper blandit dolor. Morbi faucibus posuere sapien. Vestibulum aliquet mi vel orci finibus, vestibulum rhoncus tellus sagittis. Vivamus a arcu suscipit sem iaculis volutpat vel nec est. Nulla malesuada, urna vel pretium pretium, enim tortor pulvinar velit, porttitor dictum lectus turpis id tortor. Quisque egestas ultricies lorem, egestas ultrices tellus elementum porta. Fusce consequat nisi in diam placerat fermentum. Suspendisse tempus turpis nec turpis condimentum fringilla. Maecenas nec orci pharetra, feugiat enim vel, viverra neque. Vivamus placerat purus in tincidunt ultricies. Pellentesque vel mi molestie, congue nibh nec, cursus nisl. Cras dapibus lectus mauris, sed interdum risus tristique non. ");
|
||||
|
||||
idle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user