Changeset acb488ff in rtems


Ignore:
Timestamp:
Jul 23, 2016, 10:07:10 AM (3 years ago)
Author:
Pavel Pisa <pisa@…>
Branches:
4.11
Children:
78627fe2
Parents:
b5501ba
git-author:
Pavel Pisa <pisa@…> (07/23/16 10:07:10)
git-committer:
Pavel Pisa <pisa@…> (10/02/16 08:40:35)
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.

Updates #2783

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

Legend:

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

    rb5501ba racb488ff  
    6363#define BSP_IRQ_COUNT               (BCM2835_INTC_TOTAL_IRQ)
    6464
    65 
    66 void raspberrypi_set_exception_handler(Arm_symbolic_exception_name exception,
    67                                          void (*handler)(void));
    68 
    6965#endif /* ASM */
    7066#endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */
  • c/src/lib/libbsp/arm/raspberrypi/irq/irq.c

    rb5501ba racb488ff  
    2828#include <bsp/linker-symbols.h>
    2929#include <bsp/mmu.h>
    30 
    31 /*
    32 ** This sets the main exception vectors
    33 */
    34 void raspberrypi_set_exception_handler(
    35                         Arm_symbolic_exception_name exception,
    36                         void (*handler)(void)
    37                                        )
    38 {
    39     if ((unsigned) exception < MAX_EXCEPTIONS)
    40     {
    41         uint32_t *table = (uint32_t *) bsp_section_vector_begin + MAX_EXCEPTIONS;
    42         table [exception] = (uint32_t) handler;
    43 
    44     }
    45 }
    4630
    4731/*
     
    120104rtems_status_code bsp_interrupt_facility_initialize(void)
    121105{
    122    raspberrypi_set_exception_handler(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt);
    123106   BCM2835_REG(BCM2835_IRQ_DISABLE1) = 0xffffffff;
    124107   BCM2835_REG(BCM2835_IRQ_DISABLE2) = 0xffffffff;
Note: See TracChangeset for help on using the changeset viewer.