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

enhancing IDT

This commit is contained in:
Adrien Bourmault 2019-04-26 10:36:40 +02:00
parent 59bd638188
commit ed534340ae
4 changed files with 15 additions and 8 deletions

View File

@ -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

View File

@ -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);

View File

@ -28,6 +28,7 @@ global IdtInit
global divideByZero
extern idtPtr
extern IdtHandler
extern label0
;;
;; Loads the IDT

View File

@ -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();
}