This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: interrupt handlers for the ARM SA1110



On 23-Jul-2001 Warren Jasper wrote:
> I have a few comments and a suggestion.
> 
> Per Gary Thomas's suggestion, I have added  some hooks to the file
> /hal/arm/sa11x0/var/current/src/sa11x0_misc.c so that I could extend the
> 
> hal_interrupt_handle table to include 32 extra interrupts from my DSP.
> The file
> is attached.   Changes are like:
> 
> /* macro for board specific IRQ handler */
>#ifdef HAL_EXTENDED_IRQ_HANDLER
>       HAL_EXTENDED_IRQ_HANDLER(index);
>  #endif
> 
> Please consider wrapping these changes into the main distribution.
> That way, hooks will be
> available for other variants of the sa11x0  to incorporate extra
> interrupts.
> 
> The user needs to replace
> hal/arm/sa11x0/var/current/include/hal_var_ints.h with
> a modified version:
> hal/arm/sa11x0/variant_board_hal/include/platform_hal_ints.h
> 
> and in the cdl for the variant, include the lines:
> 
>     define_proc {
>         puts $::cdl_header \
>        "#define CYGBLD_HAL_PLF_INTS_H <cyg/hal/hal_platform_ints.h>"
>     }
> 
> Unfortunately, doing this may or may not work.  There is a somewhat
> cryptic comment
> (I guess cryptic comments are better than no comments ???) in
> /hal/arm/arch/current/src/vectors.S  near the end:
> 
> //
> -------------------------------------------------------------------------
> 
> // Interrupt vector tables.
> // These tables contain the isr, data and object pointers used to
> deliver
> // interrupts to user code.
> 
> // Despite appearances, their sizes are not #defines, but .equ symbols
> // generated by magic without proper dependencies in arm.inc
> // Recompiling will not DTRT without manual intervention.
> 
>         .data
> 
> init_flag:
>         .balign 4
>         .long   0
> 
>  .extern hal_default_isr
> 
>  .globl  hal_interrupt_handlers
> hal_interrupt_handlers:
>         .rept   CYGNUM_HAL_ISR_COUNT
>         .long   hal_default_isr
>         .endr
> 
> Once  CYGNUM_HAL_ISR_COUNT is redefined, it sure would be nice to know
> exactly how to
>  increase the size of the table, and to know up front that the following
> wont' work:
> 
> ecosconfig tree
> make clean
> make
> 
> I ended up disassembling the code and counting the size of
> hal_interrupt_handlers before I
> felt confident that that size of the table (which is kind of important)
> was what I thought it was.

As long as you start afresh, the automatic process works fine.  The only
time you would have trouble would be if you changed this constant after
you had built a configuration.  If you didn't do 'make clean' it might
not reserve enough space for the tables.

I'll incorporate your other changes into the mainline CVS sources.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]