enhancing IDT
This commit is contained in:
parent
59bd638188
commit
ed534340ae
|
@ -98,8 +98,6 @@
|
|||
│ │ ├── string.o
|
||||
│ │ └── strtol.o
|
||||
│ ├── grub.log
|
||||
│ ├── kaleid32_disasm.asm
|
||||
│ ├── kaleid64_disasm.asm
|
||||
│ └── kernel.ld
|
||||
├── include
|
||||
│ ├── base
|
||||
|
@ -190,4 +188,4 @@
|
|||
├── ProjectTree
|
||||
└── README.md
|
||||
|
||||
37 directories, 128 files
|
||||
37 directories, 126 files
|
||||
|
|
|
@ -189,14 +189,14 @@ void IoDisableNMI(void)
|
|||
//
|
||||
void IdtHandler(ulong intNo)
|
||||
{
|
||||
int irrecoverable = 0;
|
||||
int recoverable = 0;
|
||||
char *exceptionMsg = "Unhandled ISR exception";
|
||||
|
||||
if (intNo == 0 || intNo == 6 || intNo == 8 || intNo == 13) irrecoverable++;
|
||||
if (intNo >= 32) recoverable++;
|
||||
|
||||
if (intNo < 32) exceptionMsg = IsrExceptions[intNo];
|
||||
|
||||
if (irrecoverable) {
|
||||
if (!recoverable) {
|
||||
KeStartPanic("[ISR 0x%x] Irrecoverable %s\n", intNo, exceptionMsg);
|
||||
} else {
|
||||
bprintf(BStdOut, "[ISR 0x%x] %s\n", intNo, exceptionMsg);
|
||||
|
|
|
@ -28,6 +28,7 @@ global IdtInit
|
|||
global divideByZero
|
||||
extern idtPtr
|
||||
extern IdtHandler
|
||||
extern label0
|
||||
|
||||
;;
|
||||
;; Loads the IDT
|
||||
|
|
|
@ -100,11 +100,19 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
|
|||
/* } */
|
||||
/* IoPrintRtcTime(); */
|
||||
/* } */
|
||||
long var = -1;
|
||||
KernLog("salut : %s", var);
|
||||
int* var = 7*GB;
|
||||
*var = 2;
|
||||
|
||||
KernLog("Goodbye after %d ticks\n", IoGetRtcTicks());
|
||||
// End this machine's suffering
|
||||
BFlushBuf(BStdOut);
|
||||
KeCrashSystem();
|
||||
}
|
||||
|
||||
void label0(void)
|
||||
{
|
||||
KernLog("Goodbye after %d ticks\n", IoGetRtcTicks());
|
||||
// End this machine's suffering
|
||||
BFlushBuf(BStdOut);
|
||||
KeCrashSystem();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue