1 ##=============================================================================
5 ## Fujitsu Starterkit MB91302 platform code
7 ##=============================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
13 ## eCos is free software; you can redistribute it and/or modify it under
14 ## the terms of the GNU General Public License as published by the Free
15 ## Software Foundation; either version 2 or (at your option) any later version.
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 ##=============================================================================
41 #######DESCRIPTIONBEGIN####
46 ## Purpose: Fujitsu Starterkit MB91302 platform code
47 ## Description: Platform specific code for Fujitsu Starterkit MB91302 board.
52 ######DESCRIPTIONEND####
54 ##=============================================================================
56 #include <pkgconf/system.h>
57 #include <pkgconf/hal.h>
60 # include <pkgconf/kernel.h>
63 #include <cyg/hal/arch.inc>
65 ##-----------------------------------------------------------------------------
66 ## platforms special entry point.
67 ## it copies the code from hal_fr30_ram_startup_trampoline until
68 ## hal_fr30_ram_startup_trampoline_end to ram and jumps there. The code there
69 ## is for mapping the flash to 0x1000000 and then jumping to real entry
72 #if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
74 .section ".rom_startup_trampoline","ax"
77 .global hal_fr30_rom_startup_trampoline
78 hal_fr30_rom_startup_trampoline:
79 # disable interrupts and set priority to lowest (=disable)
83 ldi:32 #__rom_trampoline_start - 4, r11
84 ldi:32 #__ram_trampoline_start - 4, r13
85 ldi:32 #__rom_trampoline_end - 8, r12
94 ## jump to the code in ram
95 ldi:32 #hal_fr30_ram_startup_trampoline, r0
100 ##-----------------------------------------------------------------------------
101 # Platform Initialization.
102 # This code is copied to a location in RAM on startup and is executed there.
103 # It maps the the FLASH chip to 0x1000000 and sets the TBR to the new location
104 # of the hardware vector table (hal_fr30_vector_table). So we can reach the full
105 # range of the FLASH and it can be used for flashfilesystem. After that it jumps
106 # to the real application.
108 #if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
110 .section ".ram_startup_trampoline","ax"
113 .global hal_fr30_ram_startup_trampoline
114 hal_fr30_ram_startup_trampoline:
115 hal_flash_init_from_ram
117 ## map TBR to the new location (for vector tables)
118 ldi:32 #0x10ffc00, r0
121 ## jump to real startup
128 #==============================================================================
129 # Vector table for storage in flash, version for skmb91302 platform.
130 # it differs from variants/archs version in that uses a different reset vector
131 # that points to the special startup procedure that jumps to the normal entry
133 # base address is 0x000FFC00 and 0x10ffc00 after remapping the flash.
134 # This address stores the vector address for number 255
135 # address 0x000FFFFC (0x10ffffc) is the last vector, the reset vector, which
136 # is not alterable. Vectors 255 to 80 are used by the INT instruction and set
137 # to 0 here for now ...
140 #if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
142 .section ".rom_vectors","ax"
145 .global hal_fr30_vector_table
146 hal_fr30_vector_table:
157 # number 63 first interrupt source
158 .long hal_fr30_irq_63
159 .long hal_fr30_irq_62
160 .long hal_fr30_irq_61
161 .long hal_fr30_irq_60
162 .long hal_fr30_irq_59
163 .long hal_fr30_irq_58
164 .long hal_fr30_irq_57
165 .long hal_fr30_irq_56
166 .long hal_fr30_irq_55
167 .long hal_fr30_irq_54
168 .long hal_fr30_irq_53
169 .long hal_fr30_irq_52
170 .long hal_fr30_irq_51
171 .long hal_fr30_irq_50
172 .long hal_fr30_irq_49
173 .long hal_fr30_irq_48
174 .long hal_fr30_irq_47
175 .long hal_fr30_irq_46
176 .long hal_fr30_irq_45
177 .long hal_fr30_irq_44
178 .long hal_fr30_irq_43
179 .long hal_fr30_irq_42
180 .long hal_fr30_irq_41
181 .long hal_fr30_irq_40
182 .long hal_fr30_irq_39
183 .long hal_fr30_irq_38
184 .long hal_fr30_irq_37
185 .long hal_fr30_irq_36
186 .long hal_fr30_irq_35
187 .long hal_fr30_irq_34
188 .long hal_fr30_irq_33
189 .long hal_fr30_irq_32
190 .long hal_fr30_irq_31
191 .long hal_fr30_irq_30
192 .long hal_fr30_irq_29
193 .long hal_fr30_irq_28
194 .long hal_fr30_irq_27
195 .long hal_fr30_irq_26
196 .long hal_fr30_irq_25
197 .long hal_fr30_irq_24
198 .long hal_fr30_irq_23
199 .long hal_fr30_irq_22
200 .long hal_fr30_irq_21
201 .long hal_fr30_irq_20
202 .long hal_fr30_irq_19
203 .long hal_fr30_irq_18
204 .long hal_fr30_irq_17
205 .long hal_fr30_irq_16
206 .long hal_fr30_irq_15
207 .long hal_fr30_exception_noerr_14
208 .long hal_fr30_exception_noerr_13
209 .long hal_fr30_exception_noerr_12
210 .long hal_fr30_exception_noerr_11
211 .long hal_fr30_exception_noerr_10
212 .long hal_fr30_exception_noerr_9
213 .long hal_fr30_exception_noerr_8
214 .long hal_fr30_exception_noerr_7
215 .long hal_fr30_exception_noerr_6
216 .long hal_fr30_exception_noerr_5
217 .long hal_fr30_exception_noerr_4
218 .long hal_fr30_exception_noerr_3
219 .long hal_fr30_exception_noerr_2
221 # mode vector (only the first of the four byte is relevant)
228 .long hal_fr30_rom_startup_trampoline
230 #endif /*CYG_HAL_STARTUP_ROM || CYG_HAL_STARTUP_ROMRAM*/
233 ##-----------------------------------------------------------------------------