OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [mips/] [jmr3904/] [current/] [include/] [platform.inc] - Blame information for rev 811

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_PLATFORM_INC
2
#define CYGONCE_HAL_PLATFORM_INC
3
##=============================================================================
4
##
5
##      platform.inc
6
##
7
##      JMR-TX3904 board assembler header file
8
##
9
##=============================================================================
10
## ####ECOSGPLCOPYRIGHTBEGIN####
11
## -------------------------------------------
12
## This file is part of eCos, the Embedded Configurable Operating System.
13
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
14
##
15
## eCos is free software; you can redistribute it and/or modify it under
16
## the terms of the GNU General Public License as published by the Free
17
## Software Foundation; either version 2 or (at your option) any later
18
## version.
19
##
20
## eCos is distributed in the hope that it will be useful, but WITHOUT
21
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23
## for more details.
24
##
25
## You should have received a copy of the GNU General Public License
26
## along with eCos; if not, write to the Free Software Foundation, Inc.,
27
## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
28
##
29
## As a special exception, if other files instantiate templates or use
30
## macros or inline functions from this file, or you compile this file
31
## and link it with other works to produce a work based on this file,
32
## this file does not by itself cause the resulting work to be covered by
33
## the GNU General Public License. However the source code for this file
34
## must still be made available in accordance with section (3) of the GNU
35
## General Public License v2.
36
##
37
## This exception does not invalidate any other reasons why a work based
38
## on this file might be covered by the GNU General Public License.
39
## -------------------------------------------
40
## ####ECOSGPLCOPYRIGHTEND####
41
##=============================================================================
42
#######DESCRIPTIONBEGIN####
43
##
44
## Author(s):   nickg
45
## Contributors:        nickg
46
## Date:        1999-04-06
47
## Purpose:     JMR-TX3904 board definitions.
48
## Description: This file contains various definitions and macros that are
49
##              useful for writing assembly code for the JMR-TX3904 board.
50
## Usage:
51
##              #include 
52
##              ...
53
##
54
##
55
######DESCRIPTIONEND####
56
##
57
##=============================================================================
58
 
59
#include 
60
 
61
#------------------------------------------------------------------------------
62
# Monitor initialization.
63
 
64
#ifndef CYGPKG_HAL_MIPS_MON_DEFINED
65
 
66
#if     defined(CYG_HAL_STARTUP_ROM) ||                 \
67
        (       defined(CYG_HAL_STARTUP_RAM) &&         \
68
                !defined(CYGSEM_HAL_USE_ROM_MONITOR))
69
 
70
        # If we are starting up from ROM, or we are starting in
71
        # RAM and NOT using a ROM monitor, initialize the VSR table.
72
 
73
        .macro  hal_mon_init
74
        la      a0,__default_interrupt_vsr
75
        la      a1,__default_exception_vsr
76
        la      a3,hal_vsr_table
77
        sw      a0,0(a3)
78
        sw      a1,1*4(a3)
79
        sw      a1,2*4(a3)
80
        sw      a1,3*4(a3)
81
        sw      a1,4*4(a3)
82
        sw      a1,5*4(a3)
83
        sw      a1,6*4(a3)
84
        sw      a1,7*4(a3)
85
        sw      a1,8*4(a3)
86
        sw      a1,9*4(a3)
87
        sw      a1,10*4(a3)
88
        sw      a1,11*4(a3)
89
        sw      a1,12*4(a3)
90
        sw      a1,13*4(a3)
91
        sw      a1,14*4(a3)
92
        sw      a1,15*4(a3)
93
 
94
        sw      a1,32*4(a3)
95
        sw      a1,33*4(a3)
96
        .endm
97
 
98
#elif defined(CYG_HAL_STARTUP_RAM) && defined(CYGSEM_HAL_USE_ROM_MONITOR)
99
 
100
        # Initialize the VSR table entries
101
        # We only take control of the interrupt vector,
102
        # the rest are left to the ROM for now...
103
 
104
        .macro  hal_mon_init
105
        la      a0,__default_interrupt_vsr
106
        la      a3,hal_vsr_table
107
        sw      a0,0(a3)
108
        .endm
109
 
110
#else
111
 
112
        .macro  hal_mon_init
113
        .endm
114
 
115
#endif
116
 
117
 
118
#define CYGPKG_HAL_MIPS_MON_DEFINED
119
 
120
#endif
121
 
122
#------------------------------------------------------------------------------
123
# Decide whether the VSR table is defined externally, or is to be defined
124
# here.
125
 
126
#if defined(CYGPKG_HAL_MIPS_SIM) ||        \
127
    ( defined(CYGPKG_HAL_MIPS_TX3904) &&   \
128
      defined(CYG_HAL_STARTUP_RAM) &&      \
129
      !defined(CYGSEM_HAL_USE_ROM_MONITOR) \
130
    )
131
 
132
## VSR table defined in linker script
133
 
134
#else
135
 
136
#define CYG_HAL_MIPS_VSR_TABLE_DEFINED
137
 
138
#endif
139
 
140
#------------------------------------------------------------------------------
141
#endif // ifndef CYGONCE_HAL_PLATFORM_INC
142
# end of platform.inc

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.