2 ** linux/arch/m68k/boot/amiga/bootstrap.h -- This file is part of the Amiga
5 ** Copyright 1993, 1994 by Hamish Macdonald
7 ** Some minor additions by Michael Rausch 1-11-94
8 ** Modified 11-May-94 by Geert Uytterhoeven
9 ** (Geert.Uytterhoeven@cs.kuleuven.ac.be)
10 ** - inline Supervisor() call
11 ** Modified 10-Jan-96 by Geert Uytterhoeven
12 ** - The real Linux/m68k boot code moved to linuxboot.[ch]
13 ** Modified 9-Sep-96 by Geert Uytterhoeven
14 ** - const library bases
15 ** - fixed register naming for m68k-cbm-amigados-gcc
17 ** This file is subject to the terms and conditions of the GNU General Public
18 ** License. See the file COPYING in the main directory of this archive
32 struct Device
*io_Device
;
43 #define IOF_QUICK (1<<0)
55 #define TR_ADDREQUEST 9
62 static __inline
char OpenDevice(u_char
*devName
, u_long unit
,
63 struct IORequest
*ioRequest
, u_long flags
)
65 register char _res
__asm("d0");
66 register const struct ExecBase
*a6
__asm("a6") = SysBase
;
67 register u_char
*a0
__asm("a0") = devName
;
68 register u_long d0
__asm("d0") = unit
;
69 register struct IORequest
*a1
__asm("a1") = ioRequest
;
70 register u_long d1
__asm("d1") = flags
;
72 __asm
__volatile ("jsr a6@(-0x1bc)"
74 : "r" (a6
), "r" (a0
), "r" (a1
), "r" (d0
), "r" (d1
)
75 : "a0","a1","d0","d1", "memory");
79 static __inline
void CloseDevice(struct IORequest
*ioRequest
)
81 register const struct ExecBase
*a6
__asm("a6") = SysBase
;
82 register struct IORequest
*a1
__asm("a1") = ioRequest
;
84 __asm
__volatile ("jsr a6@(-0x1c2)"
87 : "a0","a1","d0","d1", "memory");
90 static __inline
char DoIO(struct IORequest
*ioRequest
)
92 register char _res
__asm("d0");
93 register const struct ExecBase
*a6
__asm("a6") = SysBase
;
94 register struct IORequest
*a1
__asm("a1") = ioRequest
;
96 __asm
__volatile ("jsr a6@(-0x1c8)"
99 : "a0","a1","d0","d1", "memory");
103 static __inline
void *CreateIORequest(struct MsgPort
*port
, u_long size
)
105 register struct Library
*_res
__asm("d0");
106 register const struct ExecBase
*a6
__asm("a6") = SysBase
;
107 register struct MsgPort
*a0
__asm("a0") = port
;
108 register u_long d0
__asm("d0") = size
;
110 __asm
__volatile ("jsr a6@(-0x28e)"
112 : "r" (a6
), "r" (a0
), "r" (d0
)
113 : "a0","a1","d0","d1", "memory");
117 static __inline
void DeleteIORequest(void *ioRequest
)
119 register const struct ExecBase
*a6
__asm("a6") = SysBase
;
120 register void *a0
__asm("a0") = ioRequest
;
122 __asm
__volatile ("jsr a6@(-0x294)"
125 : "a0","a1","d0","d1", "memory");
128 static __inline
struct MsgPort
*CreateMsgPort(void)
130 register struct MsgPort
*_res
__asm("d0");
131 register const struct ExecBase
*a6
__asm("a6") = SysBase
;
133 __asm
__volatile ("jsr a6@(-0x29a)"
136 : "a0","a1","d0","d1", "memory");
140 static __inline
void DeleteMsgPort(struct MsgPort
*port
)
142 register const struct ExecBase
*a6
__asm("a6") = SysBase
;
143 register struct MsgPort
*a0
__asm("a0") = port
;
145 __asm
__volatile ("jsr a6@(-0x2a0)"
148 : "a0","a1","d0","d1", "memory");