How do I set the IRQ 'notify id'? - Minix

This is a discussion on How do I set the IRQ 'notify id'? - Minix ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: How do I set the IRQ 'notify id'?

  1. 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


  2. Re: How do I set the IRQ 'notify id'?

    All,

    > 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?


    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.

    > 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?


    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



  3. Re: How do I set the IRQ 'notify id'?

    On Jan 31, 7:50 pm, Ben Gras wrote:
    > All,
    >
    > > 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?

    >
    > 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.
    >


    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?

    > > 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?

    >
    > 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.
    >


    No problem then...


    > =Ben


    thanks for your help.




  4. Re: How do I set the IRQ 'notify id'?

    All,

    >> 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.
    >>

    >
    > so.. should the notify ID on my driver be 0?


    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.

    > 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?


    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



+ Reply to Thread