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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [i960/] [kernel/] [mon960_calls.c] - Blame information for rev 1623

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

Line No. Rev Author Line
1 1623 jcastillo
/*
2
 *   FILE: mon960_calls.c
3
 * AUTHOR: kma
4
 *  DESCR: system calls to mon960
5
 */
6
 
7
#ident "$Id: mon960_calls.c,v 1.1 2005-12-20 09:42:38 jcastillo Exp $"
8
 
9
#include <linux/config.h>
10
#include <asm/mon960.h>
11
 
12
#define SYSCALL(number) \
13
asm("calls      %0; ret"        \
14
        : : "lI"(number): "g0");
15
 
16
unsigned long mon_entry(void)
17
{
18
        SYSCALL(254);
19
}
20
 
21
unsigned long get_prcbptr(void)
22
{
23
        SYSCALL(245);
24
}
25
 
26
void mon960_exit(int val)
27
{
28
        SYSCALL(257);
29
}
30
 
31
#ifdef CONFIG_PCI
32
 
33
int mon960_pcibios_present(void* info)
34
{ SYSCALL(100); }
35
int mon960_pcibios_find_device(int vnd, int dev, int idx, void* loc)
36
{ SYSCALL(101); }
37
int mon960_pcibios_find_class(int class, int idx, void* dev)
38
{ SYSCALL(102); }
39
 
40
#define BIOS_OP(op,sz,type,nr)  \
41
int     \
42
mon960_pcibios_ ## op ## _config_ ##sz(unsigned short vec,      \
43
                                         unsigned short dev,    \
44
                                         unsigned short func,   \
45
                                         unsigned char off,     \
46
                                         type val)      \
47
{ SYSCALL(nr); }
48
 
49
BIOS_OP(read,byte,unsigned char*,104)
50
BIOS_OP(read,word,unsigned short*,105)
51
BIOS_OP(read,dword,unsigned int*,106)
52
BIOS_OP(write,byte,unsigned char,107)
53
BIOS_OP(write,word,unsigned short,108)
54
BIOS_OP(write,dword,unsigned int,109)
55
 
56
#endif

powered by: WebSVN 2.1.0

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