URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [sh/] [shsim/] [start/] [start.S] - Rev 1782
Compare with Previous | Blame | View Log
/** Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and* Bernd Becker (becker@faw.uni-ulm.de)** COPYRIGHT (c) 1997-1998, FAW Ulm, Germany** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.*** COPYRIGHT (c) 1998.* On-Line Applications Research Corporation (OAR).** The license and distribution terms for this file may be* found in the file LICENSE in this distribution or at* http://www.OARcorp.com/rtems/license.html.** start.S,v 1.3 2001/10/12 21:12:58 joel Exp*/#include "asm.h"BEGIN_CODEPUBLIC(start)SYM (start):! install the stack pointermov.l stack_k,r15! zero out bssmov.l edata_k,r0mov.l end_k,r1mov #0,r20:mov.l r2,@r0add #4,r0cmp/ge r0,r1bt 0b! copy the vector table from rom to rammov.l vects_k,r0 ! vectabmov #0,r1 ! address of boot vector tablemov #0,r2 ! number of bytes copiedmov.w vects_size,r3 ! size of entries in vectab1:mov.l @r1+,r4mov.l r4,@r0add #4,r0add #1,r2cmp/hi r3,r2bf 1bmov.l vects_k,r0 ! update vbr to point to vectabldc r0,vbr! call the mainlinemov #0,r4 ! argcmov.l main_k,r0jsr @r0mov #0,r5 ! argv! call exitmov r0,r4mov.l exit_k,r0jsr @r0or r0,r0END_CODE.align 2stack_k:.long SYM(stack)edata_k:.long SYM(edata)end_k:.long SYM(end)main_k:.long SYM(boot_card)exit_k:.long SYM(exit)vects_k:.long SYM(vectab)vects_size:.word 255#ifdef __ELF__.section .stack,"aw"#else.section .stack#endifSYM(stack):.long 0xdeaddeadmonvects_k:.long SYM(monvects)
