revert between 56095 -> 55830 in arch
[AROS.git] / arch / .unmaintained / ppc-native / boot / bootstrap.h
blob91dee7e8be92c3e8a1bd8c14451f5f359382648f
1 /*
2 ** linux/arch/m68k/boot/amiga/bootstrap.h -- This file is part of the Amiga
3 ** bootloader.
4 **
5 ** Copyright 1993, 1994 by Hamish Macdonald
6 **
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
19 ** for more details.
24 struct MsgPort {
25 u_char fill1[15];
26 u_char mp_SigBit;
27 u_char fill2[18];
30 struct IOStdReq {
31 u_char fill1[20];
32 struct Device *io_Device;
33 u_char fill2[4];
34 u_short io_Command;
35 u_char io_Flags;
36 char io_Error;
37 u_long io_Actual;
38 u_long io_Length;
39 void *io_Data;
40 u_char fill4[4];
43 #define IOF_QUICK (1<<0)
45 struct timerequest {
46 u_char fill1[28];
47 u_short io_Command;
48 u_char io_Flags;
49 u_char fill2[1];
50 u_long tv_secs;
51 u_long tv_micro;
54 #define UNIT_VBLANK 1
55 #define TR_ADDREQUEST 9
58 struct Library;
59 struct IORequest;
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)"
73 : "=r" (_res)
74 : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1)
75 : "a0","a1","d0","d1", "memory");
76 return(_res);
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)"
85 : /* no output */
86 : "r" (a6), "r" (a1)
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)"
97 : "=r" (_res)
98 : "r" (a6), "r" (a1)
99 : "a0","a1","d0","d1", "memory");
100 return(_res);
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)"
111 : "=r" (_res)
112 : "r" (a6), "r" (a0), "r" (d0)
113 : "a0","a1","d0","d1", "memory");
114 return(_res);
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)"
123 : /* no output */
124 : "r" (a6), "r" (a0)
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)"
134 : "=r" (_res)
135 : "r" (a6)
136 : "a0","a1","d0","d1", "memory");
137 return(_res);
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)"
146 : /* no output */
147 : "r" (a6), "r" (a0)
148 : "a0","a1","d0","d1", "memory");