Changeset d548318 in rtems


Ignore:
Timestamp:
Jul 23, 2016, 10:07:10 AM (3 years ago)
Author:
Pavel Pisa <pisa@…>
Branches:
master
Children:
d216c5d6
Parents:
1c62f7ee
Message:

arm/raspberrypi: remove duplicate setup of IRQ handler in the main ARM exception table.

Exception table setup is processed by common CPU architecture support.
For ARM architecture, it can be found in the file

rtems/c/src/lib/libbsp/arm/shared/start/start.S

and ends by bsp_vector_table_copy_done label.
The actual tabel content can be found at

bsp_start_vector_table_begin

For ARMv7-A and even other variant with hypervisor mode support,
it is even not necessary to copy table to address 0 at all
because CP15 register can be used to specify alternative
table start address

arm_cp15_set_vector_base_address(&)bsp_start_vector_table_begin;

ARMv7-M have register to set exception table base as well.

Location:
c/src/lib/libbsp/arm/raspberrypi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/raspberrypi/include/irq.h

    r1c62f7ee rd548318  
    6464#define BSP_IRQ_COUNT               (BCM2835_INTC_TOTAL_IRQ)
    6565
    66 
    67 void raspberrypi_set_exception_handler(Arm_symbolic_exception_name exception,
    68                                          void (*handler)(void));
    69 
    7066#endif /* ASM */
    7167#endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */
  • c/src/lib/libbsp/arm/raspberrypi/irq/irq.c

    r1c62f7ee rd548318  
    3333
    3434/*
    35 ** This sets the main exception vectors
    36 */
    37 void raspberrypi_set_exception_handler(
    38                         Arm_symbolic_exception_name exception,
    39                         void (*handler)(void)
    40                                        )
    41 {
    42     if ((unsigned) exception < MAX_EXCEPTIONS)
    43     {
    44         uint32_t *table = (uint32_t *) bsp_section_vector_begin + MAX_EXCEPTIONS;
    45         table [exception] = (uint32_t) handler;
    46 
    47     }
    48 }
    49 
    50 /*
    5135** Determine the source of the interrupt and dispatch the correct handler.
    5236*/
     
    223207rtems_status_code bsp_interrupt_facility_initialize(void)
    224208{
    225    raspberrypi_set_exception_handler(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt);
    226209   BCM2835_REG(BCM2835_IRQ_DISABLE1) = 0xffffffff;
    227210   BCM2835_REG(BCM2835_IRQ_DISABLE2) = 0xffffffff;
Note: See TracChangeset for help on using the changeset viewer.