diff options
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index 97847e6..657b69a 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -4,6 +4,8 @@ #error "Watchout! this is not Linux but FoolOS. Use a cross-compiler" #endif +#include "kernel.h" + #include <stdint.h> #include "config.h" #include "types.h" @@ -22,11 +24,16 @@ // for built-in shell #include "lib/buffer/ringbuffer.h" #include "task.h" - +#include "video/vesa.h" void kernel_main(uint32_t eax,uint32_t ebx) { - + // + // PR + // + + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%s",KERNEL_VERSION); + // // Configuring the PIT timer. // @@ -59,7 +66,6 @@ void kernel_main(uint32_t eax,uint32_t ebx) log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"cmdline: \"%s\"",info->cmdline); } - // // Memory Init // @@ -96,21 +102,39 @@ void kernel_main(uint32_t eax,uint32_t ebx) mod++; } } + + // + // Video + // + + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"VBE Info: 0x%04X (0x%08X 0x%08X)",info->vbe_mode,info->vbe_control_info, info->vbe_mode_info); + vbeinfo *vbe=info->vbe_mode_info; + //log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%c%c",'X',vbe->VbeSignature[0]); + /* + uint16_t VbeVersion; // == 0x0300 for VBE 3.0 + uint16_t OemStringPtr[2]; // isa vbeFarPtr + uint8_t Capabilities[4]; + uint16_t VideoModePtr[2]; // isa vbeFarPtr + uint16_t TotalMemory; // as # of 64KB blocks + */ // // init output to screen // - uint32_t physbase=console_init(); + + uint32_t physbase=console_init(info->vbe_mode_info,info->vbe_control_info); // // Activate Virtual Memory (paging) + // pdirectory *dir=vmem_init(physbase); // log buffered messages to console log_log(); + while(1); // // Setup Interrupts (code segment: 0x08) @@ -152,8 +176,6 @@ void kernel_main(uint32_t eax,uint32_t ebx) // task_init(dir); //; this will never return! // - while(1); - //log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"."); } |
