Home | History | Annotate | Line # | Download | only in boot
libstubs.s revision 1.5
      1 /* $NetBSD: libstubs.s,v 1.5 2001/03/01 21:32:53 is Exp $ */
      2 
      3 /*-
      4  * Copyright (c) 1996 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Ignatios Souvatzis.
      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 /*
     40  * Exec.library functions.
     41  */
     42 #include <machine/asm.h>
     43 	.comm _C_LABEL(SysBase),4
     44 
     45 ENTRY_NOPROFILE(OpenLibrary)
     46 	movl	%a6,sp@-
     47 	movl	%pc@(_SysBase:w),%a6
     48 	movl	%sp@(8),%a1
     49 	movl	%sp@(12),%d0
     50 	jsr	%a6@(-0x228)
     51 	movl	%sp@+,%a6
     52 	rts
     53 #ifdef notyet
     54 ENTRY_NOPROFILE(CloseLibrary)
     55 	movl	%a6,sp@-
     56 	movl	%pc@(_SysBase:w),%a6
     57 	movl	%sp@(8),%a1
     58 	jsr	%a6@(-0x19e)
     59 	movl	%sp@+,%a6
     60 	rts
     61 #endif
     62 ENTRY_NOPROFILE(CreateIORequest)
     63 	movl	%a6,sp@-
     64 	movl	%pc@(_SysBase:w),%a6
     65 	movl	%sp@(8),%a0
     66 	movl	%sp@(12),%d0
     67 	jsr	%a6@(-0x28e)
     68 	movl	%sp@+,%a6
     69 	rts
     70 
     71 ENTRY_NOPROFILE(CreateMsgPort)
     72 	movl	%a6,sp@-
     73 	movl	%pc@(_SysBase:w),%a6
     74 	jsr	%a6@(-0x29a)
     75 	movl	%sp@+,%a6
     76 	rts
     77 
     78 #ifdef notyet
     79 ENTRY_NOPROFILE(DeleteMsgPort)
     80 	movl	%a6,sp@-
     81 	movl	%pc@(_SysBase:w),%a6
     82 	movl	%sp@(8),%a0
     83 	jsr	%a6@(-0x2%a0)
     84 	movl	%sp@+,%a6
     85 	rts
     86 
     87 ENTRY_NOPROFILE(DeleteIORequest)
     88 	movl	%a6,sp@-
     89 	movl	%pc@(_SysBase:w),%a6
     90 	movl	%sp@(8),%a0
     91 	jsr	%a6@(-0x294)
     92 	movl	%sp@+,%a6
     93 	rts
     94 #endif
     95 
     96 ENTRY_NOPROFILE(OpenDevice)
     97 	movl	%a6,sp@-
     98 	movl	%pc@(_SysBase:w),%a6
     99 	movl	%sp@(8),%a0
    100 	movl	%sp@(12),%d0
    101 	movl	%sp@(16),%a1
    102 	movl	%sp@(20),%d1
    103 	jsr	%a6@(-0x1bc)
    104 	movl	%sp@+,%a6
    105 	rts
    106 
    107 ENTRY_NOPROFILE(DoIO)
    108 	movl	%a6,sp@-
    109 	movl	%pc@(_SysBase:w),%a6
    110 	movl	%sp@(8),%a1
    111 	jsr	%a6@(-0x1c8)
    112 	movl	%sp@+,%a6
    113 	rts
    114 #ifdef nomore
    115 ENTRY_NOPROFILE(CheckIO)
    116 	movl	%a6,sp@-
    117 	movl	%pc@(_SysBase:w),%a6
    118 	movl	%sp@(8),%a1
    119 	jsr	%a6@(-0x1%d4)
    120 	movl	%sp@+,%a6
    121 	rts
    122 #endif
    123 ENTRY_NOPROFILE(WaitIO)
    124 	movl	%a6,sp@-
    125 	movl	%pc@(_SysBase:w),%a6
    126 	movl	%sp@(8),%a1
    127 	jsr	%a6@(-0x1da)
    128 	movl	%sp@+,%a6
    129 	rts
    130 
    131 ENTRY_NOPROFILE(SendIO)
    132 	movl	%a6,sp@-
    133 	movl	%pc@(_SysBase:w),%a6
    134 	movl	%sp@(8),%a1
    135 	jsr	%a6@(-0x1ce)
    136 	movl	%sp@+,%a6
    137 	rts
    138 
    139 ENTRY_NOPROFILE(AbortIO)
    140 	movl	%a6,sp@-
    141 	movl	%pc@(_SysBase:w),%a6
    142 	movl	%sp@(8),%a1
    143 	jsr	%a6@(-0x1e0)
    144 	movl	%sp@+,%a6
    145 	rts
    146 
    147 ENTRY_NOPROFILE(WaitPort)
    148 	movl	%a6,sp@-
    149 	movl	%pc@(_SysBase:w),%a6
    150 	movl	%sp@(8),%a0
    151 	jsr	%a6@(-0x180)
    152 	movl	%sp@+,%a6
    153 	rts
    154 
    155 #ifndef DOINLINES
    156 ENTRY_NOPROFILE(CacheClearU)
    157 	movl	%a6,sp@-
    158 	movl	%pc@(_SysBase:w),%a6
    159 	jsr	%a6@(-0x27c)
    160 	movl	%sp@+,%a6
    161 	rts
    162 #endif
    163 ENTRY_NOPROFILE(CachePreDMA)
    164 	movl	%a6,sp@-
    165 	movl	%pc@(_SysBase:w),%a6
    166 	movl	%sp@(8),%a0
    167 	movl	%sp@(12),%a1
    168 	movl	%sp@(16),%d0
    169 	jsr	%a6@(-0x2fa)
    170 	movl	%sp@+,%a6
    171 	rts
    172 
    173 ENTRY_NOPROFILE(FindResident)
    174 	movl	%a6,sp@-
    175 	movl	%pc@(_SysBase:w),%a6
    176 	movl	%sp@(8),%a1
    177 	jsr	%a6@(-0x60)
    178 	movl	%sp@+,%a6
    179 	rts
    180 
    181 ENTRY_NOPROFILE(OpenResource)
    182 	movl	%a6,sp@-
    183 	movl	%pc@(_SysBase:w),%a6
    184 	movl	%sp@(8),%a1
    185 	jsr	%a6@(-0x1f2)
    186 	movl	%sp@+,%a6
    187 	rts
    188 #ifdef notyet
    189 ENTRY_NOPROFILE(Forbid)
    190 	movl	%a6,sp@-
    191 	movl	%pc@(_SysBase:W),%a6
    192 	jsr	%a6@(-0x84)
    193 	movl	%sp@+,%a6
    194 	rts
    195 
    196 ENTRY_NOPROFILE(Permit)
    197 	movl	%a6,sp@-
    198 	movl	%pc@(_SysBase:W),%a6
    199 	jsr	%a6@(-0x8a)
    200 	movl	%sp@+,%a6
    201 	rts
    202 #endif
    203 
    204 /*
    205  * Intuition.library functions.
    206  */
    207 
    208 	.comm _IntuitionBase,4
    209 
    210 ENTRY_NOPROFILE(OpenScreenTagList)
    211 	movl	%a6,sp@-
    212 	movl	%pc@(_IntuitionBase:w),%a6
    213 	movl	%sp@(8),%a0
    214 	movl	%sp@(12),%a1
    215 	jsr	%a6@(-0x264)
    216 	movl	%sp@+,%a6
    217 	rts
    218 
    219 ENTRY_NOPROFILE(OpenWindowTagList)
    220 	movl	%a6,sp@-
    221 	movl	%pc@(_IntuitionBase:w),%a6
    222 	movl	%sp@(8),%a0
    223 	movl	%sp@(12),%a1
    224 	jsr	%a6@(-0x25e)
    225 	movl	%sp@+,%a6
    226 	rts
    227 #ifdef nomore
    228 ENTRY_NOPROFILE(mytime)
    229 	movl	%a6,sp@-
    230 	movl	%pc@(_IntuitionBase:w),%a6
    231 	subql	#8,%sp
    232 	movl	%sp,a0
    233 	lea	%sp@(4),%a1
    234 	jsr	%a6@(-0x54)
    235 	movl	%sp@+,%d0
    236 	addql	#4,%sp
    237 	movl	%sp@+,%a6
    238 	rts
    239 #endif
    240 	.comm _ExpansionBase,4
    241 ENTRY_NOPROFILE(FindConfigDev)
    242 	movl	%a6,sp@-
    243 	movl	_ExpansionBase,%a6
    244 	movl	%sp@(8),%a0
    245 	movl	%sp@(12),%d0
    246 	movl	%sp@(16),%d1
    247 	jsr	%a6@(-0x48)
    248 	movl	%sp@+,%a6
    249 	rts
    250