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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [mn10300/] [arch/] [v2_0/] [include/] [arch.inc] - Blame information for rev 249

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

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_HAL_ARCH_INC
2
#define CYGONCE_HAL_ARCH_INC
3
##=============================================================================
4
##
5
##      arch.inc
6
##
7
##      MN10300 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 Red Hat, 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 version.
18
##
19
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
22
## for more details.
23
##
24
## You should have received a copy of the GNU General Public License along
25
## with eCos; if not, write to the Free Software Foundation, Inc.,
26
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27
##
28
## As a special exception, if other files instantiate templates or use macros
29
## or inline functions from this file, or you compile this file and link it
30
## with other works to produce a work based on this file, this file does not
31
## by itself cause the resulting work to be covered by the GNU General Public
32
## License. However the source code for this file must still be made available
33
## in accordance with section (3) of the GNU General Public License.
34
##
35
## This exception does not invalidate any other reasons why a work based on
36
## this file might be covered by the GNU General Public License.
37
##
38
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39
## at http://sources.redhat.com/ecos/ecos-license/
40
## -------------------------------------------
41
#####ECOSGPLCOPYRIGHTEND####
42
##=============================================================================
43
#######DESCRIPTIONBEGIN####
44
##
45
## Author(s):   nickg
46
## Contributors:        nickg, dmoseley
47
## Date:        1997-10-16
48
## Purpose:     Architecture definitions.
49
## Description: This file contains various definitions and macros that are
50
##              useful for writing assembly code for the MN10300 CPU family.
51
## Usage:
52
##              #include 
53
##              ...
54
##
55
##
56
######DESCRIPTIONEND####
57
##
58
##=============================================================================
59
 
60
#include 
61
 
62
#include 
63
 
64
##-----------------------------------------------------------------------------
65
## CPU specific macros. These provide a common assembler interface to
66
## operations that may have CPU specific implementations on different
67
## variants of the architecture.
68
 
69
#ifndef CYGPKG_HAL_MN10300_CPU_INIT_DEFINED
70
        # Initialize CPU
71
        .macro  hal_cpu_init
72
        # Set up the PSW
73
        mov     0x0700,d0
74
        mov     d0,psw
75
        .endm
76
#endif
77
 
78
        # Enable interrupts
79
        .macro hal_cpu_int_enable
80
        or      0x0800,psw
81
        .endm
82
 
83
        # Disable interrupts
84
        .macro hal_cpu_int_disable
85
        and     0xF7ff,psw
86
        .endm
87
 
88
        # Merge the interrupt enable state of the status register in
89
        # \sr with the current sr.
90
        .macro  hal_cpu_int_merge sr
91
        movm    [d3],(sp)
92
        and     0x00000F00,\sr          # isolate IE and IM bits
93
        hal_cpu_get_psw d3
94
        and     0xfffff0ff,d3
95
        or      \sr,d3
96
        hal_cpu_set_psw d3
97
        movm    (sp),[d3]
98
        .endm
99
 
100
        # Enable further exception processing, and disable
101
        # interrupt processing.
102
        .macro hal_cpu_except_enable
103
        .endm
104
 
105
        # Return from exception.
106
        .macro  hal_cpu_eret pc,sr
107
        .endm
108
 
109
##-----------------------------------------------------------------------------
110
# Default interrupt decoding macros.
111
 
112
#ifndef CYGPKG_HAL_MN10300_INTC_DEFINED
113
 
114
#ifndef CYGPKG_HAL_MN10300_INTC_INIT_DEFINED
115
        # initialize all interrupts to disabled
116
        .macro  hal_intc_init
117
        .endm
118
#endif
119
 
120
#endif
121
 
122
#ifndef CYGPKG_HAL_MN10300_INTC_DECODE_DEFINED
123
        .macro  hal_intc_decode dreg,areg,dreg1
124
        .endm
125
 
126
#endif
127
 
128
#------------------------------------------------------------------------------
129
# MMU macros.
130
 
131
#ifndef CYGPKG_HAL_MN10300_MMU_DEFINED
132
 
133
        .macro  hal_mmu_init
134
        .endm
135
 
136
#endif
137
 
138
#------------------------------------------------------------------------------
139
# MEMC macros.
140
 
141
#ifndef CYGPKG_HAL_MN10300_MEMC_DEFINED
142
 
143
        .macro  hal_memc_init
144
        .endm
145
 
146
#endif
147
 
148
#------------------------------------------------------------------------------
149
# Cache macros.
150
 
151
#ifndef CYGPKG_HAL_MN10300_CACHE_DEFINED
152
 
153
        .macro  hal_cache_init
154
        .endm
155
 
156
#endif
157
 
158
#------------------------------------------------------------------------------
159
# Diagnostics macros.
160
 
161
#ifndef CYGPKG_HAL_MN10300_DIAG_DEFINED
162
 
163
        .macro  hal_diag_init
164
        .endm
165
 
166
        .macro  hal_diag_excpt_start
167
        .endm
168
 
169
        .macro  hal_diag_intr_start
170
        .endm
171
 
172
        .macro  hal_diag_restore
173
        .endm
174
 
175
        .macro  hal_diag_data
176
        .endm
177
#endif
178
 
179
#------------------------------------------------------------------------------
180
# Timer initialization.
181
 
182
#ifndef CYGPKG_HAL_MN10300_TIMER_DEFINED
183
 
184
        .macro  hal_timer_init
185
        .endm
186
 
187
#endif
188
 
189
#------------------------------------------------------------------------------
190
# Monitor initialization.
191
 
192
#ifndef CYGPKG_HAL_MN10300_MON_DEFINED
193
 
194
        .macro  hal_mon_init
195
        .endm
196
 
197
#endif
198
 
199
#------------------------------------------------------------------------------
200
#endif // ifndef CYGONCE_HAL_ARCH_INC
201
# end of arch.inc

powered by: WebSVN 2.1.0

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