comparison packages/hal/arm/arch/current/src/vectors.S @ 26:4741a3c3496a ecos-sw-1999-07-23

Merge from eCos master repository on 1999-07-23-05:47:06-BST
author jlarmour
date Fri, 23 Jul 1999 15:20:15 +0000
parents 306eee292492
children 18ee5a9c102e
comparison
equal deleted inserted replaced
25:9444713147c6 26:4741a3c3496a
102 102
103 // The layout of these pointers should match the vector table above since 103 // The layout of these pointers should match the vector table above since
104 // they are copied in pairs. 104 // they are copied in pairs.
105 .global vectors 105 .global vectors
106 vectors: 106 vectors:
107 UNMAPPED_PTR(reset_vector) 107 UNMAPPED_PTR(reset_vector) // 0x20
108 PTR(undefined_instruction) 108 PTR(undefined_instruction) // 0x24
109 PTR(software_interrupt) 109 PTR(software_interrupt) // 0x28
110 PTR(abort_prefetch) 110 PTR(abort_prefetch) // 0x2C
111 PTR(abort_data) 111 PTR(abort_data) // 0x30
112 .word 0 112 .word 0 // 0x34
113 PTR(IRQ) 113 PTR(IRQ) // 0x38
114 PTR(FIQ) 114 PTR(FIQ) // 0x3c
115 PTR(start) 115 PTR(start) // This is copied to 0x28 for bootup // 0x40
116 // location 0x40 is used for storing DRAM size if known
117 // for some platforms.
116 118
117 .text 119 .text
118 // Startup code which will get the machine into supervisor mode 120 // Startup code which will get the machine into supervisor mode
119 .global reset_vector 121 .global reset_vector
120 .type reset_vector,function 122 .type reset_vector,function
126 and r7,r7,#CPSR_MODE_BITS 128 and r7,r7,#CPSR_MODE_BITS
127 cmp r7,#CPSR_SUPERVISOR_MODE 129 cmp r7,#CPSR_SUPERVISOR_MODE
128 beq start 130 beq start
129 #endif 131 #endif
130 132
133 PLATFORM_SETUP1 // Early stage platform initialization
134 // which can set DRAM size at 0x40
135 // see <cyg/hal/hal_platform_setup.h>
136 // We cannot access any LED registers until after PLATFORM_SETUP1
131 LED 7 137 LED 7
132 138
133 PLATFORM_SETUP1 // Early stage platform initialization
134 // see <cyg/hal/hal_platform_setup.h>
135
136 mov r0,#0 // move vectors 139 mov r0,#0 // move vectors
140 // We cannot perform a store until after PLATFORM_SETUP1
141 str r0, [r0,#0x40] // DRAM size to zero => unknown
137 ldr r1,.__exception_handlers 142 ldr r1,.__exception_handlers
138 ldr r2,[r1,#0x04] // undefined instruction 143 ldr r2,[r1,#0x04] // undefined instruction
139 str r2,[r0,#0x04] 144 str r2,[r0,#0x04]
140 ldr r2,[r1,#0x24] 145 ldr r2,[r1,#0x24]
141 str r2,[r0,#0x24] 146 str r2,[r0,#0x24]
261 266
262 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS 267 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
263 bl initialize_stub 268 bl initialize_stub
264 #endif 269 #endif
265 270
266 LED 7 271 LED 1
267 272
268 // This starts up the eCos kernel 273 // This starts up the eCos kernel
269 bl cyg_start 274 bl cyg_start
270 _start_hang: 275 _start_hang:
271 b _start_hang 276 b _start_hang
718 init_flag: 723 init_flag:
719 .long 0 724 .long 0
720 725
721 .extern hal_default_isr 726 .extern hal_default_isr
722 727
723 .globl hal_vsr_table
724 hal_vsr_table:
725 .rept CYGNUM_HAL_VSR_COUNT
726 .long 0 // hal_default_isr
727 .endr
728
729 .globl hal_interrupt_handlers 728 .globl hal_interrupt_handlers
730 hal_interrupt_handlers: 729 hal_interrupt_handlers:
731 .rept CYGNUM_HAL_ISR_COUNT 730 .rept CYGNUM_HAL_ISR_COUNT
732 .long hal_default_isr 731 .long hal_default_isr
733 .endr 732 .endr