prom.S revision 1.1 1 /* $NetBSD: prom.S,v 1.1 2000/09/18 11:40:48 wdk Exp $ */
2
3 /*
4 * Copyright (c) 2000 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Wayne Knowles
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
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.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39 #include <mips/asm.h>
40 #include <mips/cpuregs.h>
41 #include <machine/prom.h>
42
43
44 /* XXX: address has only been tested on Version 5.4 firmware */
45 .global saiob
46 .equ saiob, 0x80004cd8
47
48 .set noreorder
49 LEAF(prom_restart)
50 li v0, MIPS_PROM_RESTART
51 j v0
52 move a0, zero
53 END(prom_restart)
54
55 LEAF(prom_open)
56 li v0, MIPS_PROM_OPEN
57 j v0
58 nop
59 END(prom_open)
60
61 #ifndef LIBSA_NO_DEV_CLOSE
62 LEAF(prom_close)
63 li v0, MIPS_PROM_CLOSE
64 j v0
65 nop
66 END(prom_close)
67 #endif
68
69 LEAF(prom_read)
70 li v0, MIPS_PROM_READ
71 j v0
72 nop
73 END(prom_read)
74
75 #ifndef LIBSA_NO_FS_WRITE
76 LEAF(prom_write)
77 li v0, MIPS_PROM_WRITE
78 j v0
79 nop
80 END(prom_write)
81 #endif
82
83 LEAF(printf)
84 li v0, MIPS_PROM_PRINTF
85 j v0
86 nop
87 END(printf)
88
89 #ifndef NO_GETCHAR
90 LEAF(getchar)
91 li v0, MIPS_PROM_GETCHAR
92 j v0
93 nop
94 END(getchar)
95
96 LEAF(putchar)
97 li v0, MIPS_PROM_PUTCHAR
98 j v0
99 nop
100 END(putchar)
101 #endif
102