Hi,
I was trying to test the basic IRQ handling in Genode. I simplified the
code from os/src/drivers/input/ps2/irq_handler.h and ran it on both QEMU
and real machine. However, neither keyboard nor mouse interrupts can be
properly captured by my code.
For keyboard (IRQ 1), it keeps triggering interrupt even when there is
no key press. For mouse (IRQ 12), there is no interrupt at all. As the
ps2_drv works fine in the demo app, I'm sure something is missing in my
stand-alone code (or I need to include other modules?). I appreciate if
anyone can point it out.
I attached my code here for your reference.
Best,
Jilong
===========================================================
class Irq_handler : Genode::Thread<4096>
{
private:
Genode::Irq_connection _irq;
int irq_num;
public:
Irq_handler(int irq_number)
:
_irq(irq_number)
{
irq_num=irq_number;
start();
}
void entry()
{
while (1) {
_irq.wait_for_irq();
Genode::printf("received an IRQ
%d!\n",irq_num);
}
}
};
int main()
{
printf("Entered: test-irq\n");
Irq_handler ps2_mouse_irq(12);
Irq_handler ps2_keyboard_irq(1);
Genode::sleep_forever();
}
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main