15 #ifndef _ASM_DEC_PROM_H
16 #define _ASM_DEC_PROM_H
18 #include <linux/types.h>
20 #include <asm/addrspace.h>
26 #define VEC_RESET (u64 *)CKSEG1ADDR(0x1fc00000)
29 #define PMAX_PROM_ENTRY(x) (VEC_RESET + (x))
31 #define PMAX_PROM_HALT PMAX_PROM_ENTRY(2)
32 #define PMAX_PROM_AUTOBOOT PMAX_PROM_ENTRY(5)
33 #define PMAX_PROM_OPEN PMAX_PROM_ENTRY(6)
34 #define PMAX_PROM_READ PMAX_PROM_ENTRY(7)
35 #define PMAX_PROM_CLOSE PMAX_PROM_ENTRY(10)
36 #define PMAX_PROM_LSEEK PMAX_PROM_ENTRY(11)
37 #define PMAX_PROM_GETCHAR PMAX_PROM_ENTRY(12)
38 #define PMAX_PROM_PUTCHAR PMAX_PROM_ENTRY(13)
39 #define PMAX_PROM_GETS PMAX_PROM_ENTRY(15)
40 #define PMAX_PROM_PRINTF PMAX_PROM_ENTRY(17)
41 #define PMAX_PROM_GETENV PMAX_PROM_ENTRY(33)
48 #define REX_PROM_MAGIC 0x30464354
52 #define prom_is_rex(magic) 1
56 #define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC)
65 #define REX_PROM_GETBITMAP 0x84/4
66 #define REX_PROM_GETCHAR 0x24/4
67 #define REX_PROM_GETENV 0x64/4
68 #define REX_PROM_GETSYSID 0x80/4
69 #define REX_PROM_GETTCINFO 0xa4/4
70 #define REX_PROM_PRINTF 0x30/4
71 #define REX_PROM_SLOTADDR 0x6c/4
72 #define REX_PROM_BOOTINIT 0x54/4
73 #define REX_PROM_BOOTREAD 0x58/4
74 #define REX_PROM_CLEARCACHE 0x7c/4
92 extern unsigned long *(*__rex_slot_address)(
int);
93 extern void *(*__rex_gettcinfo)(
void);
98 extern char *(*__prom_getenv)(
char *);
113 #define __DEC_PROM_O32(fun, arg) fun arg __asm__(#fun); \
114 __asm__(#fun " = call_o32")
116 int __DEC_PROM_O32(_rex_bootinit, (
int (*)(
void)));
117 int __DEC_PROM_O32(_rex_bootread, (
int (*)(
void)));
118 int __DEC_PROM_O32(_rex_getbitmap, (
int (*)(
memmap *),
memmap *));
119 unsigned long *__DEC_PROM_O32(_rex_slot_address,
120 (
unsigned long *(*)(
int),
int));
121 void *__DEC_PROM_O32(_rex_gettcinfo, (
void *(*)(
void)));
122 int __DEC_PROM_O32(_rex_getsysid, (
int (*)(
void)));
123 void __DEC_PROM_O32(_rex_clear_cache, (
void (*)(
void)));
125 int __DEC_PROM_O32(_prom_getchar, (
int (*)(
void)));
126 char *__DEC_PROM_O32(
_prom_getenv, (
char *(*)(
char *),
char *));
127 int __DEC_PROM_O32(_prom_printf, (
int (*)(
char *, ...),
char *, ...));
130 #define rex_bootinit() _rex_bootinit(__rex_bootinit)
131 #define rex_bootread() _rex_bootread(__rex_bootread)
132 #define rex_getbitmap(x) _rex_getbitmap(__rex_getbitmap, x)
133 #define rex_slot_address(x) _rex_slot_address(__rex_slot_address, x)
134 #define rex_gettcinfo() _rex_gettcinfo(__rex_gettcinfo)
135 #define rex_getsysid() _rex_getsysid(__rex_getsysid)
136 #define rex_clear_cache() _rex_clear_cache(__rex_clear_cache)
138 #define prom_getchar() _prom_getchar(__prom_getchar)
139 #define prom_getenv(x) _prom_getenv(__prom_getenv, x)
140 #define prom_printf(x...) _prom_printf(__prom_printf, x)
147 #define rex_bootinit __rex_bootinit
148 #define rex_bootread __rex_bootread
149 #define rex_getbitmap __rex_getbitmap
150 #define rex_slot_address __rex_slot_address
151 #define rex_gettcinfo __rex_gettcinfo
152 #define rex_getsysid __rex_getsysid
153 #define rex_clear_cache __rex_clear_cache
155 #define prom_getchar __prom_getchar
156 #define prom_getenv __prom_getenv
157 #define prom_printf __prom_printf
159 #define pmax_open __pmax_open
160 #define pmax_lseek __pmax_lseek
161 #define pmax_read __pmax_read
162 #define pmax_close __pmax_close