[extern kmain]
[global start]
start:
+ ; Just show we're here
+ mov WORD [0xB8000], 0x0741 ; 'A'
; Set up stack
mov esp, Kernel_Stack_Top
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
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
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 );
}
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:
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;
}
}
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);
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);