BIOS doesn't assign IRQ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
jcraig

BIOS doesn't assign IRQ?

Post by jcraig »

Hi,

it seems my virtual PC's BIOS doesn't assign IRQ to my display adapter, neither an io base. Other devices work well, such as ethernet adapter. I was trying to make a driver for my card, and I found out that I get a 0 when I query for IRQ of that device. How can I overcome this issue? BIOS does not contain a setting for this. On the other hand, that shouldn't be the solution - how others do that?

Thanks in advance.
Jason
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:BIOS doesn't assign IRQ?

Post by Pype.Clicker »

there were several non-PCI display cards that had no IRQs and well-known base address. I suppose your virtual display is one of those: access through 0xA0000..0xBFFFF and standard vga ports. You may want to write a driver for that and 'fall back' to that standard driver if other drivers have failed.
jcraig

Re:BIOS doesn't assign IRQ?

Post by jcraig »

I understand. It works fine with standard base addresses. I am not an expert about device drivers, and I am facing with another problem now; how can I make calls from user space? If I would have a driver, I could handle IRQs. But I don't have one now, neither can set it (I tried to set display adapter's IRQ but nothing happened - still 0). I wonder how can I use this driver from userland, without an IRQ. I would be very happy, if you could give me an idea.

Thanks!
Jason
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:BIOS doesn't assign IRQ?

Post by Pype.Clicker »

hey, hey ...
using IRQs to control the driver from userland ? you must be kidding, right ?

IRQs are requests sent by the hardware, in order to notify the CPU about events such as a network card that has received a packet, a disk unit that has completed a read/write request or a byte coming from the keyboard.

If you start using this to control the driver itself (e.g. use the disk-operation-completed to ask the disk to load more sectors), how will you tell whether the command has completed or the user requests more sectors ? (i can come with nightmary pathological cases, if you need them).

what an OS will do is have another interrupt (or a callgate or a sysenter/sysleave) for user-commands (e.g. system calls), much in the way you use INT13h to request disk operation at the BIOS and leave the bios do whatever it needs to with IRQ14 .. IRQ15 (ATA disks)

As a general rule, it's a GoodThing to program IRQ descriptors so that nothing but DPL0 can invoke them (and make sure DPL0 *never* invoque them ;)
Post Reply