mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-08 05:49:17 +00:00
Color support
This commit is contained in:
@ -4,9 +4,12 @@
|
||||
#include <memory.hpp>
|
||||
#include <string.h>
|
||||
#include <printf.h>
|
||||
#include <lock.hpp>
|
||||
#include <time.hpp>
|
||||
#include <debug.h>
|
||||
|
||||
NEWLOCK(KernelLock);
|
||||
|
||||
BootInfo *bInfo = nullptr;
|
||||
Video::Display *Display = nullptr;
|
||||
SymbolResolver::Symbols *KernelSymbolTable = nullptr;
|
||||
@ -23,8 +26,9 @@ extern "C" int vprintf_(const char *format, va_list arg);
|
||||
|
||||
void KPrint(const char *format, ...)
|
||||
{
|
||||
SMARTLOCK(KernelLock);
|
||||
Time tm = ReadClock();
|
||||
printf_("[%02ld:%02ld:%02ld] ", tm.Hour, tm.Minute, tm.Second);
|
||||
printf_("\eCCCCCC[\e00AEFF%02ld:%02ld:%02ld\eCCCCCC] ", tm.Hour, tm.Minute, tm.Second);
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vprintf_(format, args);
|
||||
@ -48,7 +52,7 @@ EXTERNC void Entry(BootInfo *Info)
|
||||
memcpy(bInfo, Info, sizeof(BootInfo));
|
||||
debug("BootInfo structure is at %p", bInfo);
|
||||
Display = new Video::Display(bInfo->Framebuffer[0]);
|
||||
printf_("%s - %s(%s)\n", KERNEL_NAME, KERNEL_VERSION, GIT_COMMIT_SHORT);
|
||||
printf_("\eFFFFFF%s - %s [\e058C19%s\eFFFFFF]\n", KERNEL_NAME, KERNEL_VERSION, GIT_COMMIT_SHORT);
|
||||
/**************************************************************************************/
|
||||
KPrint("Initializing GDT and IDT");
|
||||
Interrupts::Initialize();
|
||||
|
Reference in New Issue
Block a user