Home > Net >  How to Trigger IRQ by writing to virtual port
How to Trigger IRQ by writing to virtual port

Time:12-20

I am trying to test sample codes in LDD3 book, but as I don't have any sacrificial device laying around I cant try out Interrupt handling. I use ubuntu 15 on VM and trying out sample codes, but I can't request any ports for writing/reading to an I/O. My idea is to have a Virtual port and have my driver write to it and read from it. By writing to the virtual port would trigger interrupt and my driver would handle that interrupt. So is there any way of doing this? I only have a laptop running ubuntu on VM so I can't access its logical port, even if I could I am afraid to mess with it. If there are any better ways of doing this I would be glad to learn that and a small sample code or example would be helpful. Thank you.

CodePudding user response:

but as I don't have any sacrificial device laying around

lspci :))

CodePudding user response:

... a small sample code or example would be helpful.

https://elixir.bootlin.com/linux/latest/C/ident/pci_request_regions

  • Related