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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [or32/] [kernel/] [entry.S] - Blame information for rev 1777

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

Line No. Rev Author Line
1 1624 jcastillo
 
2
#include 
3
#include 
4
#include 
5
#include 
6
 
7
LENOSYS = 38
8
 
9
/*
10
 * these are offsets into the task-struct
11
 */
12
LTASK_STATE     =  0
13
LTASK_COUNTER   =  4
14
LTASK_PRIORITY  =  8
15
LTASK_SIGNAL    = 12
16
LTASK_BLOCKED   = 16
17
LTASK_FLAGS     = 20
18
 
19
/* the following macro is used when enabling interrupts */
20
#define ALLOWINT 0xf8ff
21
#define MAX_NOINT_IPL   0
22
 
23
LD0             = 0x1C
24
LORIG_D0        = 0x20
25
LSR             = 0x28
26
LFORMATVEC      = 0x2E
27
 
28
/*
29
 * This defines the normal kernel pt-regs layout.
30
 *
31
 * regs are a2-a6 and d6-d7 preserved by C code
32
 * the kernel doesn't mess with usp unless it needs to
33
 */
34
#define SAVE_ALL                        \
35
        clrl    %sp@-;    /* stk_adj */ \
36
        movel   %d0,%sp@-; /* orig d0 */        \
37
        movel   %d0,%sp@-; /* d0 */     \
38
        moveml  %d1-%d5/%a0-%a1,%sp@-
39
 
40
/*      moveml  %sp@+,%a0-%a1/%d1-%d5;  */
41
 
42
#define RESTORE_ALL                     \
43
        moveml  %sp@+,%d1-%d5/%a0-%a1;  \
44
        movel   %sp@+,%d0;              \
45
        addql   #4,%sp;  /* orig d0 */  \
46
        addl    %sp@+,%sp; /* stk adj */        \
47
        rte
48
 
49
#define SWITCH_STACK_SIZE (7*4+4)       /* includes return address */
50
 
51
#define SAVE_SWITCH_STACK \
52
        moveml  %a2-%a6/%d6-%d7,%sp@-
53
 
54
#define RESTORE_SWITCH_STACK \
55
        moveml  %sp@+,%a2-%a6/%d6-%d7
56
 
57
.globl SYMBOL_NAME(system_call), SYMBOL_NAME(buserr), SYMBOL_NAME(trap)
58
.globl SYMBOL_NAME(resume), SYMBOL_NAME(ret_from_exception)
59
.globl SYMBOL_NAME(ret_from_signal)
60
.globl SYMBOL_NAME(trap3)
61
.globl SYMBOL_NAME(trap4)
62
.globl SYMBOL_NAME(trap5)
63
.globl SYMBOL_NAME(inthandler1)
64
.globl SYMBOL_NAME(inthandler1)
65
.globl SYMBOL_NAME(inthandler1)
66
.globl SYMBOL_NAME(inthandler2)
67
.globl SYMBOL_NAME(inthandler3)
68
.globl SYMBOL_NAME(inthandler4)
69
.globl SYMBOL_NAME(inthandler5)
70
.globl SYMBOL_NAME(inthandler6)
71
.globl SYMBOL_NAME(inthandler7)
72
.globl SYMBOL_NAME(inthandler8)
73
.globl SYMBOL_NAME(inthandler)
74
.globl SYMBOL_NAME(inthandler_wrap)
75
.globl SYMBOL_NAME(timerhandler)
76
.globl SYMBOL_NAME(serialhandler)
77
.globl SYMBOL_NAME(sys_call_table)
78
.globl SYMBOL_NAME(sys_fork), SYMBOL_NAME(sys_clone)
79
.globl SYMBOL_NAME(ret_from_interrupt), SYMBOL_NAME(bad_interrupt)
80
 
81
 
82
.text
83
ENTRY(buserr)
84
 
85
ENTRY(trap)
86
 
87
ENTRY(trap3)
88
 
89
ENTRY(trap4)
90
 
91
ENTRY(trap5)
92
 
93
ENTRY(trap6)
94
 
95
ENTRY(trap7)
96
 
97
ENTRY(trap8)
98
 
99
ENTRY(trap9)
100
 
101
ENTRY(trap10)
102
 
103
ENTRY(trap11)
104
 
105
ENTRY(trap12)
106
 
107
ENTRY(trap13)
108
 
109
ENTRY(trap14)
110
 
111
ENTRY(trap15)
112
 
113
ENTRY(trap33)
114
 
115
ENTRY(trap34)
116
 
117
ENTRY(trap35)
118
 
119
ENTRY(trap36)
120
 
121
ENTRY(trap37)
122
 
123
ENTRY(trap38)
124
 
125
ENTRY(trap39)
126
 
127
ENTRY(trap40)
128
 
129
ENTRY(trap41)
130
 
131
ENTRY(trap42)
132
 
133
ENTRY(trap43)
134
 
135
ENTRY(trap44)
136
 
137
ENTRY(trap45)
138
 
139
 
140
SYMBOL_NAME_LABEL(timerhandler)
141
 
142
 
143
SYMBOL_NAME_LABEL(serialhandler)
144
 
145
 
146
SYMBOL_NAME_LABEL(inthandler1)
147
 
148
 
149
SYMBOL_NAME_LABEL(inthandler2)
150
 
151
 
152
SYMBOL_NAME_LABEL(inthandler3)
153
 
154
 
155
SYMBOL_NAME_LABEL(inthandler4)
156
 
157
 
158
SYMBOL_NAME_LABEL(inthandler5)
159
 
160
 
161
SYMBOL_NAME_LABEL(inthandler6)
162
 
163
 
164
SYMBOL_NAME_LABEL(inthandler7)
165
 
166
 
167
SYMBOL_NAME_LABEL(inthandler8)
168
 
169
 
170
SYMBOL_NAME_LABEL(inthandler_wrap)
171
 
172
 
173
SYMBOL_NAME_LABEL(inthandler)
174
 
175
 
176
SYMBOL_NAME_LABEL(ret_from_interrupt)
177
 
178
 
179
SYMBOL_NAME_LABEL(bad_interrupt)
180
 
181
 
182
SYMBOL_NAME_LABEL(resume)
183
 
184
 
185
.text
186
ALIGN
187
SYMBOL_NAME_LABEL(sys_call_table)
188
        .long SYMBOL_NAME(sys_setup)            /* 0 */
189
        .long SYMBOL_NAME(sys_exit)
190
        .long SYMBOL_NAME(sys_fork)
191
        .long SYMBOL_NAME(sys_read)
192
        .long SYMBOL_NAME(sys_write)
193
        .long SYMBOL_NAME(sys_open)             /* 5 */
194
        .long SYMBOL_NAME(sys_close)
195
        .long SYMBOL_NAME(sys_waitpid)
196
        .long SYMBOL_NAME(sys_creat)
197
        .long SYMBOL_NAME(sys_link)
198
        .long SYMBOL_NAME(sys_unlink)           /* 10 */
199
        .long SYMBOL_NAME(sys_execve)
200
        .long SYMBOL_NAME(sys_chdir)
201
        .long SYMBOL_NAME(sys_time)
202
        .long SYMBOL_NAME(sys_mknod)
203
        .long SYMBOL_NAME(sys_chmod)            /* 15 */
204
        .long SYMBOL_NAME(sys_chown)
205
        .long SYMBOL_NAME(sys_break)
206
        .long SYMBOL_NAME(sys_stat)
207
        .long SYMBOL_NAME(sys_lseek)
208
        .long SYMBOL_NAME(sys_getpid)           /* 20 */
209
        .long SYMBOL_NAME(sys_mount)
210
        .long SYMBOL_NAME(sys_umount)
211
        .long SYMBOL_NAME(sys_setuid)
212
        .long SYMBOL_NAME(sys_getuid)
213
        .long SYMBOL_NAME(sys_stime)            /* 25 */
214
        .long SYMBOL_NAME(sys_ptrace)
215
        .long SYMBOL_NAME(sys_alarm)
216
        .long SYMBOL_NAME(sys_fstat)
217
        .long SYMBOL_NAME(sys_pause)
218
        .long SYMBOL_NAME(sys_utime)            /* 30 */
219
        .long SYMBOL_NAME(sys_stty)
220
        .long SYMBOL_NAME(sys_gtty)
221
        .long SYMBOL_NAME(sys_access)
222
        .long SYMBOL_NAME(sys_nice)
223
        .long SYMBOL_NAME(sys_ftime)            /* 35 */
224
        .long SYMBOL_NAME(sys_sync)
225
        .long SYMBOL_NAME(sys_kill)
226
        .long SYMBOL_NAME(sys_rename)
227
        .long SYMBOL_NAME(sys_mkdir)
228
        .long SYMBOL_NAME(sys_rmdir)            /* 40 */
229
        .long SYMBOL_NAME(sys_dup)
230
        .long SYMBOL_NAME(sys_pipe)
231
        .long SYMBOL_NAME(sys_times)
232
        .long SYMBOL_NAME(sys_prof)
233
        .long SYMBOL_NAME(sys_brk)              /* 45 */
234
        .long SYMBOL_NAME(sys_setgid)
235
        .long SYMBOL_NAME(sys_getgid)
236
        .long SYMBOL_NAME(sys_signal)
237
        .long SYMBOL_NAME(sys_geteuid)
238
        .long SYMBOL_NAME(sys_getegid)          /* 50 */
239
        .long SYMBOL_NAME(sys_acct)
240
        .long SYMBOL_NAME(sys_phys)
241
        .long SYMBOL_NAME(sys_lock)
242
        .long SYMBOL_NAME(sys_ioctl)
243
        .long SYMBOL_NAME(sys_fcntl)            /* 55 */
244
        .long SYMBOL_NAME(sys_mpx)
245
        .long SYMBOL_NAME(sys_setpgid)
246
        .long SYMBOL_NAME(sys_ulimit)
247
        .long SYMBOL_NAME(sys_olduname)
248
        .long SYMBOL_NAME(sys_umask)            /* 60 */
249
        .long SYMBOL_NAME(sys_chroot)
250
        .long SYMBOL_NAME(sys_ustat)
251
        .long SYMBOL_NAME(sys_dup2)
252
        .long SYMBOL_NAME(sys_getppid)
253
        .long SYMBOL_NAME(sys_getpgrp)          /* 65 */
254
        .long SYMBOL_NAME(sys_setsid)
255
        .long SYMBOL_NAME(sys_sigaction)
256
        .long SYMBOL_NAME(sys_sgetmask)
257
        .long SYMBOL_NAME(sys_ssetmask)
258
        .long SYMBOL_NAME(sys_setreuid)         /* 70 */
259
        .long SYMBOL_NAME(sys_setregid)
260
        .long SYMBOL_NAME(sys_sigsuspend)
261
        .long SYMBOL_NAME(sys_sigpending)
262
        .long SYMBOL_NAME(sys_sethostname)
263
        .long SYMBOL_NAME(sys_setrlimit)        /* 75 */
264
        .long SYMBOL_NAME(sys_getrlimit)
265
        .long SYMBOL_NAME(sys_getrusage)
266
        .long SYMBOL_NAME(sys_gettimeofday)
267
        .long SYMBOL_NAME(sys_settimeofday)
268
        .long SYMBOL_NAME(sys_getgroups)        /* 80 */
269
        .long SYMBOL_NAME(sys_setgroups)
270
        .long SYMBOL_NAME(old_select)
271
        .long SYMBOL_NAME(sys_symlink)
272
        .long SYMBOL_NAME(sys_lstat)
273
        .long SYMBOL_NAME(sys_readlink)         /* 85 */
274
        .long SYMBOL_NAME(sys_uselib)
275
        .long SYMBOL_NAME(sys_swapon)
276
        .long SYMBOL_NAME(sys_reboot)
277
        .long SYMBOL_NAME(old_readdir)
278
        .long SYMBOL_NAME(old_mmap)             /* 90 */
279
        .long SYMBOL_NAME(sys_munmap)
280
        .long SYMBOL_NAME(sys_truncate)
281
        .long SYMBOL_NAME(sys_ftruncate)
282
        .long SYMBOL_NAME(sys_fchmod)
283
        .long SYMBOL_NAME(sys_fchown)           /* 95 */
284
        .long SYMBOL_NAME(sys_getpriority)
285
        .long SYMBOL_NAME(sys_setpriority)
286
        .long SYMBOL_NAME(sys_profil)
287
        .long SYMBOL_NAME(sys_statfs)
288
        .long SYMBOL_NAME(sys_fstatfs)          /* 100 */
289
        .long SYMBOL_NAME(sys_ioperm)
290
        .long SYMBOL_NAME(sys_socketcall)
291
        .long SYMBOL_NAME(sys_syslog)
292
        .long SYMBOL_NAME(sys_setitimer)
293
        .long SYMBOL_NAME(sys_getitimer)        /* 105 */
294
        .long SYMBOL_NAME(sys_newstat)
295
        .long SYMBOL_NAME(sys_newlstat)
296
        .long SYMBOL_NAME(sys_newfstat)
297
        .long SYMBOL_NAME(sys_uname)
298
        .long SYMBOL_NAME(sys_ni_syscall)       /* iopl for i386 */ /* 110 */
299
        .long SYMBOL_NAME(sys_vhangup)
300
        .long SYMBOL_NAME(sys_idle)
301
        .long SYMBOL_NAME(sys_ni_syscall)       /* vm86 for i386 */
302
        .long SYMBOL_NAME(sys_wait4)
303
        .long SYMBOL_NAME(sys_swapoff)          /* 115 */
304
        .long SYMBOL_NAME(sys_sysinfo)
305
        .long SYMBOL_NAME(sys_ipc)
306
        .long SYMBOL_NAME(sys_fsync)
307
        .long SYMBOL_NAME(sys_sigreturn)
308
        .long SYMBOL_NAME(sys_clone)            /* 120 */
309
        .long SYMBOL_NAME(sys_setdomainname)
310
        .long SYMBOL_NAME(sys_newuname)
311
        .long SYMBOL_NAME(sys_cacheflush)       /* modify_ldt for i386 */
312
        .long SYMBOL_NAME(sys_adjtimex)
313
        .long SYMBOL_NAME(sys_mprotect)         /* 125 */
314
        .long SYMBOL_NAME(sys_sigprocmask)
315
        .long SYMBOL_NAME(sys_create_module)
316
        .long SYMBOL_NAME(sys_init_module)
317
        .long SYMBOL_NAME(sys_delete_module)
318
        .long SYMBOL_NAME(sys_get_kernel_syms)  /* 130 */
319
        .long SYMBOL_NAME(sys_quotactl)
320
        .long SYMBOL_NAME(sys_getpgid)
321
        .long SYMBOL_NAME(sys_fchdir)
322
        .long SYMBOL_NAME(sys_bdflush)
323
        .long SYMBOL_NAME(sys_sysfs)            /* 135 */
324
        .long SYMBOL_NAME(sys_personality)
325
        .long SYMBOL_NAME(sys_ni_syscall)       /* for afs_syscall */
326
        .long SYMBOL_NAME(sys_setfsuid)
327
        .long SYMBOL_NAME(sys_setfsgid)
328
        .long SYMBOL_NAME(sys_llseek)           /* 140 */
329
        .long SYMBOL_NAME(sys_getdents)
330
        .long SYMBOL_NAME(sys_select)
331
        .long SYMBOL_NAME(sys_flock)
332
        .long SYMBOL_NAME(sys_msync)
333
        .long SYMBOL_NAME(sys_readv)            /* 145 */
334
        .long SYMBOL_NAME(sys_writev)
335
        .long SYMBOL_NAME(sys_getsid)
336
        .long SYMBOL_NAME(sys_fdatasync)
337
        .long SYMBOL_NAME(sys_sysctl)
338
        .long SYMBOL_NAME(sys_mlock)            /* 150 */
339
        .long SYMBOL_NAME(sys_munlock)
340
        .long SYMBOL_NAME(sys_mlockall)
341
        .long SYMBOL_NAME(sys_munlockall)
342
        .long SYMBOL_NAME(sys_sched_setparam)
343
        .long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
344
        .long SYMBOL_NAME(sys_sched_setscheduler)
345
        .long SYMBOL_NAME(sys_sched_getscheduler)
346
        .long SYMBOL_NAME(sys_sched_yield)
347
        .long SYMBOL_NAME(sys_sched_get_priority_max)
348
        .long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
349
        .long SYMBOL_NAME(sys_sched_rr_get_interval)
350
        .long SYMBOL_NAME(sys_nanosleep)
351
        .long SYMBOL_NAME(sys_mremap)
352
        .space (NR_syscalls-163)*4
353
 
354
ENTRY(trap46)
355
 
356
ENTRY(trap47)
357
 
358
ENTRY(reschedule)
359
 
360
ENTRY(system_call)
361
 
362
SYMBOL_NAME_LABEL(ret_from_signal)
363
 
364
SYMBOL_NAME_LABEL(ret_from_exception)
365
 
366
Lsignal_return:
367
 
368
 

powered by: WebSVN 2.1.0

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