Thanks Eric. But dint get much of it. >1st part is the vector_irq routine offset relative to the start of >__stubs_start, __vectors_start is used to compensate for the >assembler to generate relative branch instruction.
How exactly the flow will go? >= (vector_irq - __stubs_start) + 0x200 + __vectors_start Here it looks like that we are going to jump after __vectors_start since we are adding some value to it. 'vector_irq - __stubs_start' is in a sense distance between the vector_irq function and the location where stubs start. Could you please elaborate a bit? Where do we jump after executing 'b vector_irq + stubs_offset'? Thanks On 4/25/08, eric miao <[EMAIL PROTECTED]> wrote: > > On Fri, Apr 25, 2008 at 5:01 PM, sahlot arvind <[EMAIL PROTECTED]> wrote: > > Guys, > > > > I am trying to understand the flow of control when an interrupt comes. > > I am reading linux-2.6.24 src code and looking at > > arch/arm/kernel/entry-armv.S. > > At the bottom of this file I see the vector table as below - > > > > __vectors_start: > > swi SYS_ERROR0 > > b vector_und + stubs_offset > > ldr pc, .LCvswi + stubs_offset > > b vector_pabt + stubs_offset > > b vector_dabt + stubs_offset > > b vector_addrexcptn + stubs_offset > > b vector_irq + stubs_offset > > b vector_fiq + stubs_offset > > > > .globl __vectors_end > > > > > > Here is not 'stubs_offset' a constant? and after seeing an IRQ where are > we > > branching by doing ' b vector_irq + stubs_offset' and what is the > flow of > > control??? > > Thanks in advance. > > > > stubs_offset is a constant decided by the assembler, note the .equ > above. So actually, the vector_irq + stubs_offset (for example) > > = vector_irq + __vectors_start + 0x200 - __stubs_start > = (vector_irq - __stubs_start) + 0x200 + __vectors_start > > And at run-time there will be dedicated page allocated for the > vectors and the stubs code, and the stubs code will be copied > at a offset of 0x200. > > see? 1st part is the vector_irq routine offset relative to the start of > __stubs_start, __vectors_start is used to compensate for the > assembler to generate relative branch instruction. > > > > - A Sahlot > > -- > > http://linuxexplained.blogspot.com > > ------------------------------------------------------------------- > > List admin: > http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel > > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php > > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php > > > > > > -- > Cheers > - eric > -- http://linuxexplained.blogspot.com
