USe of intrinfo struct and add_interrupt_array()

Can anybody tell me how exactly information added in intrinfo struct is get used in starup code. mainly i’m interested in

  1. Is there any particular address(in kernel space) where all the information specified intrinfo struct get mapped? Is it platform specific (i’m interested in ppc) ?
  2. in what order the information provided by parameters id, eoi, mask, unmask is used ?
    Any help on this will be gretely appriciate.

Well, you won’t have access to the intrinfo structure in your handler directly. You do get passed a pointer to the system page however and you could use that to get access to system information. On 6.2.1 the way the mapping works is via the kernel_device AS enter (init_asinfo.c). This maps this particular address range to 0x3000000 for your interrupt handler. Take a look at the offsets used in the sandpoint BSP (init_asinfo.c vs. the callouts).

As for the param passing, the comments in the callouts describe what each register contains on entry and what it should contain on exit (either a return or a fall-thru, depending on the callout type).

Thanks cdm
Regarding first question’s answer, r u refering to system page entry of intrinfo structure given by print_syspage() like as follow
0) vector_base:00000000, #vectors:21, cascade_vector:7fffffff
cpu_intr_base:00000140, cpu_intr_stride:0, flags:0000
id => flags:0000, size:00c8, rtn:0000c6b4
eoi => flags:1000, size:0084, rtn:0000c77c
mask:0000c800, unmask:0000c878, config:00000000

or r u refering to use SYSPAGE_ENTRY() to access this info.
An address specified by this information i.e. rtn= 0000c6b4 is the physical address ? M I right? Bcoz i tried to put brekpoint using ABTRON debugger at these address to find out when it comes to specified routines. But it doesn’t come. That’s why i asked second question IN WHAT SEQUENCE the callouts specified by different parameters in intrinfo struct r used.So i would like to know the sequence in which these callouts are used , I mean when interrupt comes it will go to exceptionxxx (e.g. exception 500) then it will jump to which callout, how it will determine which vector address it has to jump, when to call mask routine, unmask routine?

Well, the callouts are copied remember. So they don’t live at any specific address. Depending on the callout type, some aren’t even used as functions but are called inline (id/eoi).

  1. Is there any way by which i can debug callouts (id, eoi,mask,unmask)? Or any other trick by which i can test wether everything works fine? if yes pls specify the same.
  2. Does QNX provides any detailed documentaion on this or do u have your own documentaion (bcoz i’v QNX6.2 pdf doc - Building Embedded system which tells about intrinfo struct but not more detailed info ,in which I’m interested ) . If yes i would like to have look of it if you don’t mine.

thanks & rgds

When I have done callouts before I have just debugging them by running them and fixing bugs in them until it worked. One thing I have done is poked at an LED or a byte to a serial port as the callout runs - basically doing printf() debugging in the callout to see how far it progresses.

I don’t have any more detailed docs then you have. When I did my first PPC callouts I learned by looking at the sandpoint BSP sources. They are pretty well commented. They are in usr/src/bsp-6.2.1/ppc/sandpoint.