Re: Question on flow of control at the time of interrupt. | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Fri, Apr 25, 2008 at 5:01 PM, sahlot arvind <asahlot@xxxxxxxxx> 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
[Newbies FAQ] [Kernel List] [Site Home] [IETF Annouce] [Git] [Networking] [Security] [Bugtraq] [Rubini] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux Networking] [Linux RAID] [Linux SCSI] [Linux ACPI] [DDR & Rambus] [UNIX Filesystems] [Linux Resources]
![]() |
![]() |