1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

clean the IHM '-'

This commit is contained in:
Adrien Bourmault 2019-05-17 21:10:22 +02:00
parent 2ee9c7100e
commit 7a663b224f
5 changed files with 13 additions and 12 deletions

View File

@ -110,9 +110,9 @@ void BtInitBootInfo(multiboot_info_t *mbi, void *codeSeg)
void BtDoSanityChecks(uint mbMagic) {
if (!(mbMagic == MULTIBOOT_BOOTLOADER_MAGIC))
KeStartPanic("[Init]\tMagic number %x is incorrect\n", mbMagic);
KeStartPanic("\tMagic number %x is incorrect\n", mbMagic);
DebugLog("[Init]\tKernel successfully loaded at %p\n",
DebugLog("\tKernel successfully loaded at %p\n",
BtLoaderInfo.kernelAddr);
}

View File

@ -147,7 +147,7 @@ void KeSetupIDT(void)
KeSetIDTGate(0x1B, (ulong)isr27, codeSeg, 0x8E); // INTEL RESERVED
KeSetIDTGate(0x1C, (ulong)isr28, codeSeg, 0x8E); // INTEL RESERVED
KeSetIDTGate(0x1D, (ulong)isr29, codeSeg, 0x8E); // INTEL RESERVED
KeSetIDTGate(0x1E, (ulong)isr30, codeSeg, 0x8E); // INTEL RESERVED
KeSetIDTGate(0x1E, (ulong)isr30, codeSeg, 0x8E);
KeSetIDTGate(0x1F, (ulong)isr31, codeSeg, 0x8E); // INTEL RESERVED
// Set IDT IRQs Gates
@ -175,7 +175,7 @@ void KeSetupIDT(void)
// Load IDT
KeLoadIDT();
DebugLog("[IdtSetup] Initialized !\n");
DebugLog("\tInterrupt table initialized\n");
}
//
@ -252,10 +252,10 @@ void _KeHandleISR(ISRFrame_t *regs)
if ((!regs) || (!regs->rip))
KeStartPanic("[ISR ?] Unknown ISR Exception Abort\n");
if ((regs->intNo >= 0x15) && (regs->intNo <= 0x1F))
if ((regs->intNo >= 0x15) && (regs->intNo <= 0x1D))
return; // INTEL RESERVED
if (regs->intNo == 0x0F)
if ((regs->intNo == 0x0F) || (regs->intNo == 0x1F))
return; // INTEL RESERVED
for (int i = 0; i < isrList.n; i++) {
@ -276,7 +276,7 @@ void _KeHandleISR(ISRFrame_t *regs)
static void EarlyExceptionHandler(ISRFrame_t *regs)
{
KeStartPanic("[ISR 0x%x] Irrecoverable Kernel %s\n\n"
" Error code : %p\n\n"
" Error code : 0x%x (%b)\n\n"
" RIP: %#016lx CS: %#016lx RSP: %#016lx\n"
" SS: %#016lx RAX: %#016lx RBX: %#016lx\n"
" RCX: %#016lx RDX: %#016lx RSI: %#016lx\n"
@ -287,6 +287,7 @@ static void EarlyExceptionHandler(ISRFrame_t *regs)
regs->intNo,
ExceptionsChar[regs->intNo],
regs->ErrorCode,
regs->ErrorCode,
regs->rip,
regs->cs,
regs->rsp,

View File

@ -275,7 +275,7 @@ void KeEnableRTC(void)
KeRegisterISR(HandleRTC, 0x28);
// Setting up the register control and interrupt rates
DebugLog("[RTC Time] Interrupt frequency set to %d Hz\n",
DebugLog("\tRTC interrupt frequency set to %d Hz\n",
32768 >> (RTC_RATE - 1));
IoWriteByteOnPort(0x70, 0x8B);

View File

@ -56,8 +56,8 @@ void MmInitHeap(void)
_heap_end = _heap_start;
_heap_max = lmin(MM_HEAP_MAX, MmGetAvailZoneSize(_heap_end));
KernLog("[InitHeap] Start address : %p, Max length : %u Mio\n\n",
_heap_start, _heap_max / MB);
if ((ulong)_heap_start == _heap_max)
KeStartPanic("The heap failed to initialize ! (Not enough memory)");
}
//

View File

@ -41,7 +41,7 @@ void MmInitMemoryMap(void)
rc = InitMemoryMap();
if (rc)
KeStartPanic("[Mm]\tThe memory map failed to initialize.\nError : %s",
KeStartPanic("\tThe memory map failed to initialize.\nError : %s",
strerror(rc) );
}
@ -98,7 +98,7 @@ static error_t InitMemoryMap(void)
if (memoryMap.freeRamSize < MINIMUM_RAM_SIZE)
return ENOMEM;
KernLog("[Mm]\tAvailable Ram Size : %u Mio\n",
KernLog("\tAvailable RAM size : %u MB\n",
memoryMap.freeRamSize / MB);
// Magic value in memory to prevent smashing