source: rtems/c/src/lib/libbsp/sparc64/usiii/start/bspinit.S @ 982b484

4.115
Last change on this file since 982b484 was 982b484, checked in by Joel Sherrill <joel.sherrill@…>, on 11/16/10 at 23:19:58

2010-11-15 Gedare Bloom <giddyup44@…>

PR 1691/bsps

  • usiii/start/bspinit.S: Create a dummy trap table that jumps to the firmware trap table for default trap handlers.
  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2* bspinit.S
3*
4* BSP specific initialization for Sparc64 RTEMS -- sun4u BSP
5*
6*  COPYRIGHT (c) 2010 Gedare Bloom.
7*
8*  The license and distribution terms for this file may be
9*  found in the file LICENSE in this distribution or at
10*  http://www.rtems.com/license/LICENSE.
11*
12*  This code defines start code specific to the sun4u BSP
13*
14*  $Id$
15*
16*/
17
18#include <rtems/asm.h>
19#include <rtems/score/cpu.h>
20
21#include <traptable.h>
22
23#define LSU_CR_IM_MASK  (0x0004)  /* bit 2 */
24#define LSU_CR_DM_MASK  (0x0008)  /* bit 3 */
25
26#define STACK_WINDOW_SAVE_AREA_SIZE (16*8)
27
28.register %g2, #scratch
29.register %g3, #scratch
30
31.section .text
32
33PUBLIC(_BSP_init)
34.global _BSP_init
35  SYM(_BSP_init):
36  save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
37
38  ! copy the tba
39  sethi %hi(real_trap_table), %o0
40  rdpr  %tba, %o2
41  stx   %o2, [%o0 + %lo(real_trap_table)]
42
43!  /* copy firmware trap table so that RTEMS can install ISR handlers */
44!  setx  SYM(trap_table), %l0, %o0
45!  rdpr  %tba, %o1
46!  set TABLE_SIZE, %o2
47!  call memcpy
48!  nop
49
50  mov %g0, %o0
51  call _take_mmu
52  nop
53
54  ret
55  restore
56
Note: See TracBrowser for help on using the repository browser.