From: John Hodge Date: Sun, 27 Feb 2011 10:51:27 +0000 (+0800) Subject: Misc changes, fixing problems with long log strings X-Git-Tag: rel0.10~192 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=4cd445c8aa22fa18f34291202787787ddda659aa;p=tpg%2Facess2.git Misc changes, fixing problems with long log strings - Added a very early boot indicator (for RHW tests) - Fixed some warning messages --- diff --git a/Kernel/arch/x86/start.asm b/Kernel/arch/x86/start.asm index 737ff2e7..4be41301 100644 --- a/Kernel/arch/x86/start.asm +++ b/Kernel/arch/x86/start.asm @@ -59,6 +59,8 @@ mboot: [extern kmain] [global start] start: + ; Just show we're here + mov WORD [0xB8000], 0x0741 ; 'A' ; Set up stack mov esp, Kernel_Stack_Top @@ -71,13 +73,20 @@ start: or ecx, 0x80010000 ; PG and WP mov cr0, ecx + mov WORD [0xB8002], 0x0763 ; 'c' + mov WORD [0xB8004], 0x0765 ; 'e' + lea ecx, [.higherHalf] jmp ecx .higherHalf: + + mov WORD [0xB8006], 0x0773 ; 's' + mov WORD [0xB8008], 0x0773 ; 's' ; Call the kernel push ebx ; Multiboot Info push eax ; Multiboot Magic Value + mov WORD [0xB800A], 0x0732 ; '2' call kmain ; Halt the Machine @@ -222,7 +231,7 @@ CallWithArgArray: align 0x1000 gaInitPageDir: dd gaInitPageTable-KERNEL_BASE+3 ; 0x000 - Low kernel - times 0x300-1 dd 0 + times 0x300-0x000-1 dd 0 dd gaInitPageTable-KERNEL_BASE+3 ; 0xC00 - High kernel times 0x3F0-0x300-1 dd 0 dd gaInitPageDir-KERNEL_BASE+3 ; 0xFC0 - Fractal diff --git a/Kernel/logging.c b/Kernel/logging.c index 17888a71..8132e5c0 100644 --- a/Kernel/logging.c +++ b/Kernel/logging.c @@ -153,13 +153,14 @@ void Log_AddEvent(const char *Ident, int Level, const char *Format, va_list Args void Log_Int_PrintMessage(tLogEntry *Entry) { SHORTLOCK( &glLogOutput ); - LogF("%s%014lli%s [%+8s] %s\x1B[0m\r\n", + LogF("%s%014lli%s [%+8s] %s", csaLevelColours[Entry->Level], Entry->Time, csaLevelCodes[Entry->Level], Entry->Ident, Entry->Data ); + LogF("\x1B[0m\r\n"); // Separate in case Entry->Data is too long SHORTREL( &glLogOutput ); } diff --git a/Kernel/threads.c b/Kernel/threads.c index dc79908d..ee48e3e0 100644 --- a/Kernel/threads.c +++ b/Kernel/threads.c @@ -725,7 +725,7 @@ int Threads_Wake(tThread *Thread) switch(Thread->Status) { case THREAD_STAT_ACTIVE: - Log("Thread_Wake: Waking awake thread (%i)", Thread->TID); + Log("Threads_Wake - Waking awake thread (%i)", Thread->TID); return -EALREADY; case THREAD_STAT_SLEEPING: @@ -742,15 +742,15 @@ int Threads_Wake(tThread *Thread) return -EOK; case THREAD_STAT_WAITING: - Warning("Thread_Wake - Waiting threads are not currently supported"); + Warning("Threads_Wake - Waiting threads are not currently supported"); return -ENOTIMPL; case THREAD_STAT_DEAD: - Warning("Thread_Wake - Attempt to wake dead thread (%i)", Thread->TID); + Warning("Threads_Wake - Attempt to wake dead thread (%i)", Thread->TID); return -ENOTIMPL; default: - Warning("Thread_Wake - Unknown process status (%i)\n", Thread->Status); + Warning("Threads_Wake - Unknown process status (%i)\n", Thread->Status); return -EINTERNAL; } } diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 01d73d66..08201025 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -41,7 +41,7 @@ char *VFS_GetAbsPath(const char *Path) if(Path[0] == '$') { ret = malloc(strlen(Path)+1); if(!ret) { - Warning("VFS_GetAbsPath - malloc() returned NULL"); + Log_Warning("VFS", "VFS_GetAbsPath: malloc() returned NULL"); return NULL; } strcpy(ret, Path); @@ -61,7 +61,7 @@ char *VFS_GetAbsPath(const char *Path) if(Path[0] == '/') { ret = malloc(pathLen + 1); if(!ret) { - Warning("VFS_GetAbsPath - malloc() returned NULL"); + Log_Warning("VFS", "VFS_GetAbsPath: malloc() returned NULL"); return NULL; } strcpy(ret, Path);