Home | History | Annotate | Line # | Download | only in boot
libstubs.s revision 1.7.8.2
      1  1.7.8.2  nathanw /* $NetBSD: libstubs.s,v 1.7.8.2 2002/01/08 00:23:00 nathanw Exp $ */
      2  1.7.8.2  nathanw 
      3  1.7.8.2  nathanw /*-
      4  1.7.8.2  nathanw  * Copyright (c) 1996 The NetBSD Foundation, Inc.
      5  1.7.8.2  nathanw  * All rights reserved.
      6  1.7.8.2  nathanw  *
      7  1.7.8.2  nathanw  * This code is derived from software contributed to The NetBSD Foundation
      8  1.7.8.2  nathanw  * by Ignatios Souvatzis.
      9  1.7.8.2  nathanw  *
     10  1.7.8.2  nathanw  * Redistribution and use in source and binary forms, with or without
     11  1.7.8.2  nathanw  * modification, are permitted provided that the following conditions
     12  1.7.8.2  nathanw  * are met:
     13  1.7.8.2  nathanw  * 1. Redistributions of source code must retain the above copyright
     14  1.7.8.2  nathanw  *    notice, this list of conditions and the following disclaimer.
     15  1.7.8.2  nathanw  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.7.8.2  nathanw  *    notice, this list of conditions and the following disclaimer in the
     17  1.7.8.2  nathanw  *    documentation and/or other materials provided with the distribution.
     18  1.7.8.2  nathanw  * 3. All advertising materials mentioning features or use of this software
     19  1.7.8.2  nathanw  *    must display the following acknowledgement:
     20  1.7.8.2  nathanw  *        This product includes software developed by the NetBSD
     21  1.7.8.2  nathanw  *        Foundation, Inc. and its contributors.
     22  1.7.8.2  nathanw  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.7.8.2  nathanw  *    contributors may be used to endorse or promote products derived
     24  1.7.8.2  nathanw  *    from this software without specific prior written permission.
     25  1.7.8.2  nathanw  *
     26  1.7.8.2  nathanw  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.7.8.2  nathanw  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.7.8.2  nathanw  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.7.8.2  nathanw  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.7.8.2  nathanw  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.7.8.2  nathanw  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.7.8.2  nathanw  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.7.8.2  nathanw  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.7.8.2  nathanw  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.7.8.2  nathanw  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.7.8.2  nathanw  * POSSIBILITY OF SUCH DAMAGE.
     37  1.7.8.2  nathanw  */
     38  1.7.8.2  nathanw 
     39  1.7.8.2  nathanw /*
     40  1.7.8.2  nathanw  * Exec.library functions.
     41  1.7.8.2  nathanw  */
     42  1.7.8.2  nathanw #include <machine/asm.h>
     43  1.7.8.2  nathanw 	.comm _C_LABEL(SysBase),4
     44  1.7.8.2  nathanw 
     45  1.7.8.2  nathanw ENTRY_NOPROFILE(OpenLibrary)
     46  1.7.8.2  nathanw 	movl	%a6,%sp@-
     47  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     48  1.7.8.2  nathanw 	movl	%sp@(8),%a1
     49  1.7.8.2  nathanw 	movl	%sp@(12),%d0
     50  1.7.8.2  nathanw 	jsr	%a6@(-0x228)
     51  1.7.8.2  nathanw 	movl	%sp@+,%a6
     52  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
     53  1.7.8.2  nathanw 	rts
     54  1.7.8.2  nathanw 
     55  1.7.8.2  nathanw #ifdef _PRIMARY_BOOT
     56  1.7.8.2  nathanw ENTRY_NOPROFILE(CloseLibrary)
     57  1.7.8.2  nathanw 	movl	%a6,%sp@-
     58  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     59  1.7.8.2  nathanw 	movl	%sp@(8),%a1
     60  1.7.8.2  nathanw 	jsr	%a6@(-0x19e)
     61  1.7.8.2  nathanw 	movl	%sp@+,%a6
     62  1.7.8.2  nathanw 	rts
     63  1.7.8.2  nathanw #endif
     64  1.7.8.2  nathanw ENTRY_NOPROFILE(CreateIORequest)
     65  1.7.8.2  nathanw 	movl	%a6,%sp@-
     66  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     67  1.7.8.2  nathanw 	movl	%sp@(8),%a0
     68  1.7.8.2  nathanw 	movl	%sp@(12),%d0
     69  1.7.8.2  nathanw 	jsr	%a6@(-0x28e)
     70  1.7.8.2  nathanw 	movl	%sp@+,%a6
     71  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
     72  1.7.8.2  nathanw 	rts
     73  1.7.8.2  nathanw 
     74  1.7.8.2  nathanw ENTRY_NOPROFILE(CreateMsgPort)
     75  1.7.8.2  nathanw 	movl	%a6,%sp@-
     76  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     77  1.7.8.2  nathanw 	jsr	%a6@(-0x29a)
     78  1.7.8.2  nathanw 	movl	%sp@+,%a6
     79  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
     80  1.7.8.2  nathanw 	rts
     81  1.7.8.2  nathanw 
     82  1.7.8.2  nathanw #ifdef _PRIMARY_BOOT
     83  1.7.8.2  nathanw ENTRY_NOPROFILE(DeleteMsgPort)
     84  1.7.8.2  nathanw 	movl	%a6,%sp@-
     85  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     86  1.7.8.2  nathanw 	movl	%sp@(8),%a0
     87  1.7.8.2  nathanw 	jsr	%a6@(-0x2a0)
     88  1.7.8.2  nathanw 	movl	%sp@+,%a6
     89  1.7.8.2  nathanw 	rts
     90  1.7.8.2  nathanw 
     91  1.7.8.2  nathanw ENTRY_NOPROFILE(DeleteIORequest)
     92  1.7.8.2  nathanw 	movl	%a6,%sp@-
     93  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     94  1.7.8.2  nathanw 	movl	%sp@(8),%a0
     95  1.7.8.2  nathanw 	jsr	%a6@(-0x294)
     96  1.7.8.2  nathanw 	movl	%sp@+,%a6
     97  1.7.8.2  nathanw 	rts
     98  1.7.8.2  nathanw #endif
     99  1.7.8.2  nathanw 
    100  1.7.8.2  nathanw ENTRY_NOPROFILE(OpenDevice)
    101  1.7.8.2  nathanw 	movl	%a6,%sp@-
    102  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    103  1.7.8.2  nathanw 	movl	%sp@(8),%a0
    104  1.7.8.2  nathanw 	movl	%sp@(12),%d0
    105  1.7.8.2  nathanw 	movl	%sp@(16),%a1
    106  1.7.8.2  nathanw 	movl	%sp@(20),%d1
    107  1.7.8.2  nathanw 	jsr	%a6@(-0x1bc)
    108  1.7.8.2  nathanw 	movl	%sp@+,%a6
    109  1.7.8.2  nathanw 	rts
    110  1.7.8.2  nathanw 
    111  1.7.8.2  nathanw #ifdef _PRIMARY_BOOT
    112  1.7.8.2  nathanw ENTRY_NOPROFILE(CloseDevice)
    113  1.7.8.2  nathanw 	movl	%a6,%sp@-
    114  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    115  1.7.8.2  nathanw 	movl	%sp@(8),%a1
    116  1.7.8.2  nathanw 	jsr	%a6@(-0x1c2)
    117  1.7.8.2  nathanw 	movl	%sp@+,%a6
    118  1.7.8.2  nathanw 	rts
    119  1.7.8.2  nathanw #endif
    120  1.7.8.2  nathanw 
    121  1.7.8.2  nathanw ENTRY_NOPROFILE(DoIO)
    122  1.7.8.2  nathanw 	movl	%a6,%sp@-
    123  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    124  1.7.8.2  nathanw 	movl	%sp@(8),%a1
    125  1.7.8.2  nathanw 	jsr	%a6@(-0x1c8)
    126  1.7.8.2  nathanw 	movl	%sp@+,%a6
    127  1.7.8.2  nathanw 	rts
    128  1.7.8.2  nathanw #ifdef nomore
    129  1.7.8.2  nathanw ENTRY_NOPROFILE(CheckIO)
    130  1.7.8.2  nathanw 	movl	%a6,%sp@-
    131  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    132  1.7.8.2  nathanw 	movl	%sp@(8),%a1
    133  1.7.8.2  nathanw 	jsr	%a6@(-0x1d4)
    134  1.7.8.2  nathanw 	movl	%sp@+,%a6
    135  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
    136  1.7.8.2  nathanw 	rts
    137  1.7.8.2  nathanw #endif
    138  1.7.8.2  nathanw ENTRY_NOPROFILE(WaitIO)
    139  1.7.8.2  nathanw 	movl	%a6,%sp@-
    140  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    141  1.7.8.2  nathanw 	movl	%sp@(8),%a1
    142  1.7.8.2  nathanw 	jsr	%a6@(-0x1da)
    143  1.7.8.2  nathanw 	movl	%sp@+,%a6
    144  1.7.8.2  nathanw 	rts
    145  1.7.8.2  nathanw 
    146  1.7.8.2  nathanw ENTRY_NOPROFILE(SendIO)
    147  1.7.8.2  nathanw 	movl	%a6,%sp@-
    148  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    149  1.7.8.2  nathanw 	movl	%sp@(8),%a1
    150  1.7.8.2  nathanw 	jsr	%a6@(-0x1ce)
    151  1.7.8.2  nathanw 	movl	%sp@+,%a6
    152  1.7.8.2  nathanw 	rts
    153  1.7.8.2  nathanw 
    154  1.7.8.2  nathanw ENTRY_NOPROFILE(AbortIO)
    155  1.7.8.2  nathanw 	movl	%a6,%sp@-
    156  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    157  1.7.8.2  nathanw 	movl	%sp@(8),%a1
    158  1.7.8.2  nathanw 	jsr	%a6@(-0x1e0)
    159  1.7.8.2  nathanw 	movl	%sp@+,%a6
    160  1.7.8.2  nathanw 	rts
    161  1.7.8.2  nathanw 
    162  1.7.8.2  nathanw ENTRY_NOPROFILE(WaitPort)
    163  1.7.8.2  nathanw 	movl	%a6,%sp@-
    164  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    165  1.7.8.2  nathanw 	movl	%sp@(8),%a0
    166  1.7.8.2  nathanw 	jsr	%a6@(-0x180)
    167  1.7.8.2  nathanw 	movl	%sp@+,%a6
    168  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
    169  1.7.8.2  nathanw 	rts
    170  1.7.8.2  nathanw 
    171  1.7.8.2  nathanw #ifndef DOINLINES
    172  1.7.8.2  nathanw ENTRY_NOPROFILE(CacheClearU)
    173  1.7.8.2  nathanw 	movl	%a6,%sp@-
    174  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    175  1.7.8.2  nathanw 	jsr	%a6@(-0x27c)
    176  1.7.8.2  nathanw 	movl	%sp@+,%a6
    177  1.7.8.2  nathanw 	rts
    178  1.7.8.2  nathanw #endif
    179  1.7.8.2  nathanw ENTRY_NOPROFILE(CachePreDMA)
    180  1.7.8.2  nathanw 	movl	%a6,%sp@-
    181  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    182  1.7.8.2  nathanw 	movl	%sp@(8),%a0
    183  1.7.8.2  nathanw 	movl	%sp@(12),%a1
    184  1.7.8.2  nathanw 	movl	%sp@(16),%d0
    185  1.7.8.2  nathanw 	jsr	%a6@(-0x2fa)
    186  1.7.8.2  nathanw 	movl	%sp@+,%a6
    187  1.7.8.2  nathanw 	rts
    188  1.7.8.2  nathanw 
    189  1.7.8.2  nathanw ENTRY_NOPROFILE(FindResident)
    190  1.7.8.2  nathanw 	movl	%a6,%sp@-
    191  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    192  1.7.8.2  nathanw 	movl	%sp@(8),%a1
    193  1.7.8.2  nathanw 	jsr	%a6@(-0x60)
    194  1.7.8.2  nathanw 	movl	%sp@+,%a6
    195  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
    196  1.7.8.2  nathanw 	rts
    197  1.7.8.2  nathanw 
    198  1.7.8.2  nathanw ENTRY_NOPROFILE(OpenResource)
    199  1.7.8.2  nathanw 	movl	%a6,%sp@-
    200  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    201  1.7.8.2  nathanw 	movl	%sp@(8),%a1
    202  1.7.8.2  nathanw 	jsr	%a6@(-0x1f2)
    203  1.7.8.2  nathanw 	movl	%sp@+,%a6
    204  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
    205  1.7.8.2  nathanw 	rts
    206  1.7.8.2  nathanw #ifdef notyet
    207  1.7.8.2  nathanw ENTRY_NOPROFILE(Forbid)
    208  1.7.8.2  nathanw 	movl	%a6,%sp@-
    209  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):W),%a6
    210  1.7.8.2  nathanw 	jsr	%a6@(-0x84)
    211  1.7.8.2  nathanw 	movl	%sp@+,%a6
    212  1.7.8.2  nathanw 	rts
    213  1.7.8.2  nathanw 
    214  1.7.8.2  nathanw ENTRY_NOPROFILE(Permit)
    215  1.7.8.2  nathanw 	movl	%a6,%sp@-
    216  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(SysBase):W),%a6
    217  1.7.8.2  nathanw 	jsr	%a6@(-0x8a)
    218  1.7.8.2  nathanw 	movl	%sp@+,%a6
    219  1.7.8.2  nathanw 	rts
    220  1.7.8.2  nathanw #endif
    221  1.7.8.2  nathanw 
    222  1.7.8.2  nathanw /*
    223  1.7.8.2  nathanw  * Intuition.library functions.
    224  1.7.8.2  nathanw  */
    225  1.7.8.2  nathanw 
    226  1.7.8.2  nathanw 	.comm _C_LABEL(IntuitionBase),4
    227  1.7.8.2  nathanw 
    228  1.7.8.2  nathanw ENTRY_NOPROFILE(OpenScreenTagList)
    229  1.7.8.2  nathanw 	movl	%a6,%sp@-
    230  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    231  1.7.8.2  nathanw 	movl	%sp@(8),%a0
    232  1.7.8.2  nathanw 	movl	%sp@(12),%a1
    233  1.7.8.2  nathanw 	jsr	%a6@(-0x264)
    234  1.7.8.2  nathanw 	movl	%sp@+,%a6
    235  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
    236  1.7.8.2  nathanw 	rts
    237  1.7.8.2  nathanw 
    238  1.7.8.2  nathanw #ifdef _PRIMARY_BOOT
    239  1.7.8.2  nathanw ENTRY_NOPROFILE(CloseScreen)
    240  1.7.8.2  nathanw 	movl	%a6,%sp@-
    241  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    242  1.7.8.2  nathanw 	movl	%sp@(8),%a0
    243  1.7.8.2  nathanw 	jsr	%a6@(-0x42)
    244  1.7.8.2  nathanw 	movl	%sp@+,%a6
    245  1.7.8.2  nathanw 	rts
    246  1.7.8.2  nathanw #endif
    247  1.7.8.2  nathanw 
    248  1.7.8.2  nathanw ENTRY_NOPROFILE(OpenWindowTagList)
    249  1.7.8.2  nathanw 	movl	%a6,%sp@-
    250  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    251  1.7.8.2  nathanw 	movl	%sp@(8),%a0
    252  1.7.8.2  nathanw 	movl	%sp@(12),%a1
    253  1.7.8.2  nathanw 	jsr	%a6@(-0x25e)
    254  1.7.8.2  nathanw 	movl	%sp@+,%a6
    255  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
    256  1.7.8.2  nathanw 	rts
    257  1.7.8.2  nathanw 
    258  1.7.8.2  nathanw #ifdef _PRIMARY_BOOT
    259  1.7.8.2  nathanw ENTRY_NOPROFILE(CloseWindow)
    260  1.7.8.2  nathanw 	movl	%a6,%sp@-
    261  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    262  1.7.8.2  nathanw 	movl	%sp@(8),%a0
    263  1.7.8.2  nathanw 	jsr	%a6@(-0x48)
    264  1.7.8.2  nathanw 	movl	%sp@+,%a6
    265  1.7.8.2  nathanw 	rts
    266  1.7.8.2  nathanw #endif
    267  1.7.8.2  nathanw #ifdef nomore
    268  1.7.8.2  nathanw ENTRY_NOPROFILE(mytime)
    269  1.7.8.2  nathanw 	movl	%a6,%sp@-
    270  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    271  1.7.8.2  nathanw 	subql	#8,%sp
    272  1.7.8.2  nathanw 	movl	%sp,%a0
    273  1.7.8.2  nathanw 	lea	%sp@(4),%a1
    274  1.7.8.2  nathanw 	jsr	%a6@(-0x54)
    275  1.7.8.2  nathanw 	movl	%sp@+,%d0
    276  1.7.8.2  nathanw 	addql	#4,%sp
    277  1.7.8.2  nathanw 	movl	%sp@+,%a6
    278  1.7.8.2  nathanw 	rts
    279  1.7.8.2  nathanw #endif
    280  1.7.8.2  nathanw 	.comm _C_LABEL(ExpansionBase),4
    281  1.7.8.2  nathanw ENTRY_NOPROFILE(FindConfigDev)
    282  1.7.8.2  nathanw 	movl	%a6,%sp@-
    283  1.7.8.2  nathanw 	movl	%pc@(_C_LABEL(ExpansionBase):w),%a6
    284  1.7.8.2  nathanw 	movl	%sp@(8),%a0
    285  1.7.8.2  nathanw 	movl	%sp@(12),%d0
    286  1.7.8.2  nathanw 	movl	%sp@(16),%d1
    287  1.7.8.2  nathanw 	jsr	%a6@(-0x48)
    288  1.7.8.2  nathanw 	movl	%sp@+,%a6
    289  1.7.8.2  nathanw 	movl	%d0,%a0			| Comply with ELF ABI
    290  1.7.8.2  nathanw 	rts
    291