Page 1 of 1

Interrupt 42

Posted: Tue Apr 14, 2015 11:37 am
by TheLittleWho
I tried to test my kernel on real hardware. The kernel boots up, print welcome message, but when interrupts are enabled, I receive interrupt 42 and I don't know how to handle it and my system crash. I searched on web what it is, but I found nothing.

So, what is interrupt 42 and what is its cause?

Thanks!

Re: Interrupt 42

Posted: Tue Apr 14, 2015 11:43 am
by kzinti
It's the answer to the Ultimate Question of Life, the Universe, and Everything.

Re: Interrupt 42

Posted: Tue Apr 14, 2015 12:02 pm
by TheLittleWho
The Essence of Universe doesn't help me until it is a handler for Interrupt 42.

Re: Interrupt 42

Posted: Tue Apr 14, 2015 12:20 pm
by iansjack
Network card? You should mask out all hardware interrupts that you don't have handlers for before enabling interrupts.

Re: Interrupt 42

Posted: Wed Apr 15, 2015 12:14 am
by Combuster
According to the wiki page on Interrupts:
IRQ 10 | Free for peripherals / SCSI / NIC
Basically it can be anything that wasn't shipped by default in an old IBM PC.

So unless you expect something to cause an interrupt, you should silence it by masking. You'll naturally figure what it really was by the time your OS is far enough that you start doing things with these "extra" components.