source: rtems/bsps/sparc64/usiii/start/bspinit.S @ fbcd7c8f

5
Last change on this file since fbcd7c8f was fbcd7c8f, checked in by Sebastian Huber <sebastian.huber@…>, on 04/20/18 at 08:19:28

bsps: Move start files to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

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