Interrupts, Memory maps – Comtrol eCos User Manual

Page 250

Advertising
background image

Chapter 5. Installation and Testing

void Linux(int argc, char **argv, char **envp);

RedBoot will place the appropriate data at the offset specified by the

-b

parameter, or by default at address

0x80080000, and will set the arguments accordingly when calling into the kernel.

The default entry point, if no image with explicit entry point has been loaded and none is specified, is 0x80000750.

Interrupts

RedBoot uses an interrupt vector table which is located at address 0x80000400. Entries in this table are pointers to
functions with this protoype:

int irq_handler( unsigned vector, unsigned data )

On

an

atlas

board,

the

vector

argument

is

one

of

25

interrupts

defined

in

hal/mips/atlas/VERSION /include/plf_intr.h

:

#define CYGNUM_HAL_INTERRUPT_SER

0

#define CYGNUM_HAL_INTERRUPT_TIM0

1

#define CYGNUM_HAL_INTERRUPT_2

2

#define CYGNUM_HAL_INTERRUPT_3

3

#define CYGNUM_HAL_INTERRUPT_RTC

4

#define CYGNUM_HAL_INTERRUPT_COREHI

5

#define CYGNUM_HAL_INTERRUPT_CORELO

6

#define CYGNUM_HAL_INTERRUPT_7

7

#define CYGNUM_HAL_INTERRUPT_PCIA

8

#define CYGNUM_HAL_INTERRUPT_PCIB

9

#define CYGNUM_HAL_INTERRUPT_PCIC

10

#define CYGNUM_HAL_INTERRUPT_PCID

11

#define CYGNUM_HAL_INTERRUPT_ENUM

12

#define CYGNUM_HAL_INTERRUPT_DEG

13

#define CYGNUM_HAL_INTERRUPT_ATXFAIL

14

#define CYGNUM_HAL_INTERRUPT_INTA

15

#define CYGNUM_HAL_INTERRUPT_INTB

16

#define CYGNUM_HAL_INTERRUPT_INTC

17

#define CYGNUM_HAL_INTERRUPT_INTD

18

#define CYGNUM_HAL_INTERRUPT_SERR

19

#define CYGNUM_HAL_INTERRUPT_HW1

20

#define CYGNUM_HAL_INTERRUPT_HW2

21

#define CYGNUM_HAL_INTERRUPT_HW3

22

#define CYGNUM_HAL_INTERRUPT_HW4

23

#define CYGNUM_HAL_INTERRUPT_HW5

24

The data passed to the ISR is pulled from a data table (

hal_interrupt_data

) which immediately follows the

interrupt vector table. With 25 interrupts, the data table starts at address 0x80000464 on atlas.

An application may create a normal C function with the above prototype to be an ISR. Just poke its address into the
table at the correct index and enable the interrupt at its source. The return value of the ISR is ignored by RedBoot.

146

Advertising