Is it possible to change irq`s priorities? for example:
- irq 4 would has higher priority then irq 1?
I know that this is resolved by internal register of PIC (IRR - I`m not sure) - but is there any way to change it?
thx
irq priority
RE:irq priority
If you want to change hardware priorities, which means that if irq4 and irq1 signal at the same time, then the one with the hightest priority gets sent to the CPU, then the only way to do it is by PIC(Why would you need PIC, if you can do it some how else?)
Anton
Anton
RE:irq priority
ok - let`s take hypothetical situation: irq 4 is servicing, and then irq 0 is issued. As I now PIC (maybe I`m wrong) - IRQ4 will be interrupted, and here comes my question: is it possible to change irq priorities of for example timer? And second: is it possible to redirect irq0, irq1 to another free irq`s (and in the same change their priorities)?
thanks for reply
sebs
thanks for reply
sebs
RE:irq priority
You don't get it. If some irq is beeing handeld, it wont be interrupted by any other irq. If those irq are generated, they are queded in the IRQ controller. Then after your handler does(as far as i remember): mov al,0x20;out 0x20,al;
it tells the controler, that it(CPU) it ready to recieve new interrupts. So if the controller had same pending interrupts, it sends( to the CPU) the one with the highest priority.
Yes you can change the priority of irq, you can even make the prioritys rotate, but that is a long story: read Ralf Brown for example.
Anton
it tells the controler, that it(CPU) it ready to recieve new interrupts. So if the controller had same pending interrupts, it sends( to the CPU) the one with the highest priority.
Yes you can change the priority of irq, you can even make the prioritys rotate, but that is a long story: read Ralf Brown for example.
Anton
RE:irq priority
You can do a priority scheme, you may even be able to do it completely within the PIC, but that's not how I did it.
The PIC has the ability to mask, on a per IRQ basis, which IRQ gets signaled to the PC. When an IRQ arrives, mask that IRQ and all IRQS with the less than (or equal) priority and immediately send an EOI (out 0x20, 0x20, or appropriate for the slave) to the PIC. By doing so, you will mask signal for the IRQ you are currently proccessing (as if you hadn't sent the EOI) and all lower priority IRQs. However higher 'priority' IRQs can still interrupt what you're doing.
Phil
The PIC has the ability to mask, on a per IRQ basis, which IRQ gets signaled to the PC. When an IRQ arrives, mask that IRQ and all IRQS with the less than (or equal) priority and immediately send an EOI (out 0x20, 0x20, or appropriate for the slave) to the PIC. By doing so, you will mask signal for the IRQ you are currently proccessing (as if you hadn't sent the EOI) and all lower priority IRQs. However higher 'priority' IRQs can still interrupt what you're doing.
Phil
RE:irq priority
Well if that's what you need, then go for it, but now you need to have a threadable kernel or fucntions which are beeing called in the handler.
Anton
Anton
RE:irq priority
OK - tell me what do you think about following solution. Create one common interrupt service for all irqs. And in this procedure do all stuff (masking IRQs, calling appropriate interrupts and so on ... ). This would allows me to implement very advanced/complex priority scheme - am I right?
Phil - have you got any links/materials about your approach?
thx for reply,
SebS
Phil - have you got any links/materials about your approach?
thx for reply,
SebS