Where to find the interrupt vector table? - Embedded

This is a discussion on Where to find the interrupt vector table? - Embedded ; Hi, am working on mips 4k series. I am not getting the interrupt vector table in arch/mips directory. Can someone point where is it located? I mean if I want to change it, which file I should be looking into(default ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Where to find the interrupt vector table?

  1. Where to find the interrupt vector table?

    Hi,
    am working on mips 4k series. I am not getting the interrupt
    vector table in arch/mips directory. Can someone point where is it
    located? I mean if I want to change it, which file I should be looking
    into(default 1s for the most peripherals)....and how to set up the
    memory configuration(RAM, the staring and end address)? I can pass the
    memory size from bootloader(uboot), but where to give the memory
    related configuration, sdram specific settings?


    Thanks a lot,
    zix

  2. Re: Where to find the interrupt vector table?

    As interrupts are used and defined by drivers, I suppose the interrupt
    vector table is not statically defined in a file, but dynamically
    constructed by the drivers using some API to add entries.

    -Michael

  3. Re: Where to find the interrupt vector table?

    On 1 Mar, 21:17, Michael Schnell
    wrote:
    > As interrupts are used and defined by drivers, I suppose the interrupt
    > vector table is not statically defined in a file, but dynamically
    > constructed by the drivers using some API to add entries.
    > -Michael


    well, I do agree with u, but for specific board, normally they keep
    commonly used peripherals at a common place, I am using bcm47xx board
    in 2.6 kernel..so just wondered where can i find it? Inside arch/mips/
    bcmxx I am just finding all the functions,not anything configuration
    specific....

    If anybody is aware of this, please lemme know..and also do I need to
    set up the SDRam over in kernel also, I mean SdRam clock refresh rate,
    row and coloumn selectors or will the kernel take care of it? I know
    that memory size is passed from bootloader, but how about the starting
    address?

    Thanks,
    zix

  4. Re: Where to find the interrupt vector table?

    zix wrote:
    > On 1 Mar, 21:17, Michael Schnell
    > wrote:
    >
    >>As interrupts are used and defined by drivers, I suppose the interrupt
    >>vector table is not statically defined in a file, but dynamically
    >>constructed by the drivers using some API to add entries.
    >>-Michael

    >
    >
    > well, I do agree with u, but for specific board, normally they keep
    > commonly used peripherals at a common place, I am using bcm47xx board
    > in 2.6 kernel..so just wondered where can i find it? Inside arch/mips/
    > bcmxx I am just finding all the functions,not anything configuration
    > specific....
    >
    > If anybody is aware of this, please lemme know..and also do I need to
    > set up the SDRam over in kernel also, I mean SdRam clock refresh rate,
    > row and coloumn selectors or will the kernel take care of it? I know
    > that memory size is passed from bootloader, but how about the starting
    > address?
    >
    > Thanks,
    > zix


    Would you please tell what you're attempting to achieve.
    You cannot put interrupt service in user space.

    Hooking interrupts in the way of DOS or early Windows
    is not going to work in Linux.

    --

    Tauno Voipio
    tauno voipio (at) iki fi

  5. Re: Where to find the interrupt vector table?

    On 2 Mar, 01:19, Tauno Voipio wrote:
    > zix wrote:
    > > On 1 Mar, 21:17, Michael Schnell
    > > wrote:

    >
    > >>As interrupts are used and defined by drivers, I suppose the interrupt
    > >>vector table is not statically defined in a file, but dynamically
    > >>constructed by the drivers using some API to add entries.
    > >>-Michael

    >
    > > well, I do agree with u, but for specific board, normally they keep
    > > commonly used peripherals at a common place, I am using bcm47xx board
    > > in 2.6 kernel..so just wondered where can i find it? Inside arch/mips/
    > > bcmxx I am just finding all the functions,not anything configuration
    > > specific....

    >
    > > If anybody is aware of this, please lemme know..and also do I need to
    > > set up the SDRam over in kernel also, I mean SdRam clock refresh rate,
    > > row and coloumn selectors or will the kernel take care of it? I know
    > > that memory size is passed from bootloader, but how about the starting
    > > address?

    >
    > > Thanks,
    > > zix

    >
    > Would you please tell what you're attempting to achieve.
    > You cannot put interrupt service in user space.
    >
    > Hooking interrupts in the way of DOS or early Windows
    > is not going to work in Linux.
    >
    >
    >
    > Tauno Voipio
    > tauno voipio (at) iki fi- Hide quoted text -
    >
    > - Show quoted text -


    Hi,
    I am working on a board bringup on mips le platform 2.6 kernel.
    There is board specific directory, arch/mips/bcm47xx. I am wondering
    where I can find the board related configuartion..IVT, peripheral io
    address, is it some .S files? I have seen all files inside the arm/
    mips/bcm47xx and I cudnt see anything worthwhile. I guess the
    configuration files are somewhere else. Also, do I have to specify the
    memory configuration in kernel, like sdram refresh rate and coloumn
    and row selector? If so, which of files I should be looking at?For
    UART, I have 8250...I need to select the divisor..do i change in
    driver or is there any configuration file for that?
    Sorry, these are a lot of questions to answer....but will be glad to
    know the answers...am badly stuck and will be very helpful if someone
    can answer me...


    Thanx,
    zix

  6. Re: Where to find the interrupt vector table?

    > For
    > UART, I have 8250...I need to select the divisor..do i change in
    > driver or is there any configuration file for that?


    This is done dynamically by the application in user space by accessing
    the driver via the ioctl library call.

    -Michael

  7. Re: Where to find the interrupt vector table?

    zix wrote:
    > I am working on a board bringup on mips le platform 2.6 kernel.


    Do you are using a boot loader (like U-Boot or RedBoot...)?

    > There is board specific directory, arch/mips/bcm47xx. I am wondering
    > where I can find the board related configuartion..IVT, peripheral io
    > address, is it some .S files?


    Most of these files are generic. Only a few files depending on the hardware
    they should run later on. And these few specific files contain the
    information how the linux kernel (generic part) and the device drivers can
    handle this hardware.

    > I have seen all files inside the arm/
    > mips/bcm47xx and I cudnt see anything worthwhile. I guess the
    > configuration files are somewhere else. Also, do I have to specify the
    > memory configuration in kernel, like sdram refresh rate and coloumn
    > and row selector?


    No. This should be done by the bootloader. It loads and starts the linux
    kernel and most of the time the architecture specific part of the kernel
    only needs to know where the RAM is (physical address) and what size it
    has.

    > If so, which of files I should be looking at?For
    > UART, I have 8250...I need to select the divisor..do i change in
    > driver or is there any configuration file for that?


    No. Changing the divisor to get a specific baudrate will be done at runtime.
    The driver only needs the base clock frequency. This should be provide by
    your board specific support file (if needed).

    JB

  8. Re: Where to find the interrupt vector table?

    zix wrote in news:02d114a9-c211-4916-a52b-
    8b801aa70452@e25g2000prg.googlegroups.com:

    > am working on mips 4k series. I am not getting the interrupt
    > vector table in arch/mips directory. Can someone point where is it
    > located? I mean if I want to change it, which file I should be looking
    > into(default 1s for the most peripherals)....and how to set up the


    It doesn't work quite that way on MIPS. There's a single hardware
    interrupt "exception vector" located at phys 0x180 or 0x200 (depending
    on whether the CP0 Cause-IV bit is set). The code there then checks the
    Cause-IPx bits to find out which interrupt source fired. (Once the
    particular source is identified, linux has its own mechanism for finding
    out what interrupt handler should be invoked. You might try tracing
    backwards from do_IRQ in the arch/mips/ directory.)

    See Vol 3 of the appropriate MIPS ISA Programming Manual.
    http://www.mips.com/products/resourc...aterials/mips-
    architecture/
    OR
    http://tinyurl.com/3ah6x3

    > into(default 1s for the most peripherals)....and how to set up the
    > memory configuration(RAM, the staring and end address)? I can pass the
    > memory size from bootloader(uboot), but where to give the memory
    > related configuration, sdram specific settings?


    Memory setup is very system-specific. I can't help with this.

    GH

  9. Re: Where to find the interrupt vector table?

    zix wrote:
    > On 1 Mar, 21:17, Michael Schnell
    > wrote:
    >> As interrupts are used and defined by drivers, I suppose the interrupt
    >> vector table is not statically defined in a file, but dynamically
    >> constructed by the drivers using some API to add entries.
    >> -Michael

    >
    > well, I do agree with u, but for specific board, normally they keep
    > commonly used peripherals at a common place, I am using bcm47xx board
    > in 2.6 kernel..so just wondered where can i find it? Inside arch/mips/
    > bcmxx I am just finding all the functions,not anything configuration
    > specific....


    It should be there somewhere, you may have to look in a subdirectory for
    your board.

    > If anybody is aware of this, please lemme know..and also do I need to
    > set up the SDRam over in kernel also, I mean SdRam clock refresh rate,
    > row and coloumn selectors or will the kernel take care of it?


    This stuff is done in the bootloader, not the kernel. Furthermore, it
    needs to be done in assembly language since RAM will not be available
    (and compiled C code requires RAM within which to put the stack). It's
    usually the very first thing your board will have to do.

    > I know
    > that memory size is passed from bootloader, but how about the starting
    > address?


    The kernel doesn't need to be told the starting address, although the
    bootloader will need to know it so that it can jump into the kernel.

+ Reply to Thread