How do I set the IRQ 'notify id'?
When F6 is pressed, to get the IRQ policy dump, I can see where I have
installed my IRQ hook. However, the Notify ID is 0. I assume this
should be the process number that receives any interrupt requests?
And while I'm at it, I might as well ask if it is possible to change
the IRQ vector name from NIC(eth), as I am not writing an ethernet
driver?
Thanks in advance..
Dave
Re: How do I set the IRQ 'notify id'?
All,
[color=blue]
> When F6 is pressed, to get the IRQ policy dump, I can see where I have
> installed my IRQ hook. However, the Notify ID is 0. I assume this
> should be the process number that receives any interrupt requests?[/color]
No, the process number is listed under 'proc nr.', the 2nd field.
The notify id is set by calling sys_irqsetpolicy(). This is a bit number
that is then magically set in the NOTIFY_ARG field of the message from
HARDWARE indicating an interrupt. Setting different hook id's when
calling sys_irqsetpolicy() lets you disambiguate interrupts.
sys_irqsetpolicy() returns a hook id that you can then use to enable
and disable irqs.
[color=blue]
> And while I'm at it, I might as well ask if it is possible to change
> the IRQ vector name from NIC(eth), as I am not writing an ethernet
> driver?[/color]
It's a hard-coded table in IS, so it isn't too bright when guessing
what non-standard irq's are. I've taken it out.
=Ben
Re: How do I set the IRQ 'notify id'?
On Jan 31, 7:50 pm, Ben Gras <b...@few.vu.nl> wrote:[color=blue]
> All,
>[color=green]
> > When F6 is pressed, to get the IRQ policy dump, I can see where I have
> > installed my IRQ hook. However, the Notify ID is 0. I assume this
> > should be the process number that receives any interrupt requests?[/color]
>
> No, the process number is listed under 'proc nr.', the 2nd field.
>
> The notify id is set by calling sys_irqsetpolicy(). This is a bit number
> that is then magically set in the NOTIFY_ARG field of the message from
> HARDWARE indicating an interrupt. Setting different hook id's when
> calling sys_irqsetpolicy() lets you disambiguate interrupts.
>
> sys_irqsetpolicy() returns a hook id that you can then use to enable
> and disable irqs.
>[/color]
so.. should the notify ID on my driver be 0?
When I set the IRQ policy ,it usually returns an IRQ hook of 10..is
this the 'magically set' bit number and is it what I should see in the
notify_ID?
[color=blue][color=green]
> > And while I'm at it, I might as well ask if it is possible to change
> > the IRQ vector name from NIC(eth), as I am not writing an ethernet
> > driver?[/color]
>
> It's a hard-coded table in IS, so it isn't too bright when guessing
> what non-standard irq's are. I've taken it out.
>[/color]
No problem then...
[color=blue]
> =Ben[/color]
thanks for your help.
Re: How do I set the IRQ 'notify id'?
All,
[color=blue][color=green]
>> No, the process number is listed under 'proc nr.', the 2nd field.
>>
>> The notify id is set by calling sys_irqsetpolicy(). This is a bit number
>> that is then magically set in the NOTIFY_ARG field of the message from
>> HARDWARE indicating an interrupt. Setting different hook id's when
>> calling sys_irqsetpolicy() lets you disambiguate interrupts.
>>
>> sys_irqsetpolicy() returns a hook id that you can then use to enable
>> and disable irqs.
>>[/color]
>
> so.. should the notify ID on my driver be 0?[/color]
The ID is set yourself by the argument to sys_irqsetpolicy(), it can be
whatever you want it to be (as long as it fits in the bitmask). In fact
if you don't have to disambiguate interrupts, it doesn't matter at all.
So, yes, it's no problem if the notify ID is 0, the id only has meaning
to your driver.
[color=blue]
> When I set the IRQ policy ,it usually returns an IRQ hook of 10..is
> this the 'magically set' bit number and is it what I should see in the
> notify_ID?[/color]
No, the bit number is set like this:
priv(proc_addr(proc))->s_int_pending |= (1 << hook->notify_id);
where hook->notify_id is the number you passed to sys_irqsetpolicy().
The hook id that's returned (10 in your case) is used to later call
sys_irqenable() and such on it.
=Ben