I am writing a kernel for the MIPS Malta board using QEMU and I am having difficulties getting keyboard interrupts to work. I've set the keyboard and display interrupt bits (bits 11 and 12) in the coprocessor 0 STATUS register and enabled interrupts by setting bit 0 as well. To my understanding, this should cause an interrupt when running the binary and pressing a key, but it doesn't.
I'm running Qemu with these flags
-M malta -m 256 -serial stdio -device usb-mouse -device usb-kbd -show-cursor
and this is the code that sets the interrupt enable bits
mfc0 T1, $12
li T2, 0x1800
ori T2, 0x1
or T2, T2, T1
mtc0 T2, $12
Am I missing something in the above code segment? Do I have to enable interrupts for the keyboard in a device control register as well? Thankful for any help!