1 /* $NetBSD: bugsyscalls.S,v 1.1 2002/02/27 21:02:27 scw Exp $ */
4 * Copyright (c) 2002 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Steve C. Woodford.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #include <machine/asm.h>
34 #define BSYS(num) addi r10,0,num ; sc
38 * char bugsys_inchr(void);
40 * Blocks until a character is received from the console.
48 * void bugsys_outchr(char ch)
55 * int bugsys_instat(void);
57 * Returns zero if no characters are waiting to be read
58 * from the console. (i.e. bugsys_inchr() would block).
59 * Otherwise, it returns a non-zero value.
68 * int bugsys_dskrd(struct bug_diskio *dcmd);
70 * Read data from disk according to the parameters specified
71 * in the `dcmd' data structure.
73 * Returns zero on success, non-zero on failure.
82 * int bugsys_dskwr(struct bug_diskio *dcmd);
84 * Write data to disk according to the parameters specified
85 * in the `dcmd' data structure.
87 * Returns zero on success, non-zero on failure.
96 * int bugsys_netio(struct bug_netcmd *ncmd);
98 * Performs an I/O operation to/from a network device as
99 * specified in the `ncmd' data structure.
101 * Returns zero on success, non-zero on failure.
110 * void bugsys_delay(int );
112 * Suspend processing for the specified number of milli-seconds
119 * struct bug_boardid *bugsys_brdid(void);
121 * Returns a pointer to the board-id structure.
128 * struct bug_ioinquiry *bugsys_ioinq(void);
130 * Returns a pointer to the ioinq structure.
137 * void bugsys_rtc_rd(struct bug_rtc_rd *);
139 * Reads the current time from the RTC chip.