xref: /inferno-os/os/fads/fns.h (revision 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a)
1 #include "../port/portfns.h"
2 
3 void	addpower(Power*);
4 void	archbacklight(int);
5 void	archconfinit(void);
6 void	archdisableuart(int);
7 void	archdisableusb(void);
8 void	archdisablevideo(void);
9 void	archenableuart(int, int);
10 void	archenableusb(int, int);
11 void	archenablevideo(void);
12 void	archkbdinit(void);
13 void	archresetvideo(void);
14 int	archetherenable(int, int*, int*, int, int);
15 void	archinit(void);
16 int	archoptionsw(void);
17 void	archreboot(void);
18 void	archsetirxcvr(int);
19 uchar*	archvideobuffer(long);
20 ulong	baudgen(int, int);
21 int	brgalloc(void);
22 void	brgfree(int);
23 int	cistrcmp(char*, char*);
24 int	cistrncmp(char*, char*, int);
25 void	clockcheck(void);
26 void	clockinit(void);
27 void	clockintr(Ureg*);
28 void	clrfptrap(void);
29 #define	coherence()		/* nothing needed for uniprocessor */
30 void	cpminit(void);
31 void	cpuidprint(void);
32 void	dcflush(void*, ulong);
33 void	dcinval(void*, ulong);
34 void	delay(int);
35 void	dtlbmiss(void);
36 void	dumplongs(char*, ulong*, int);
37 void	dumpregs(Ureg*);
38 void	eieio(void);
39 void	faultpower(Ureg*);
40 void	firmware(int);
41 void	fpinit(void);
42 int	fpipower(Ureg*);
43 void	fpoff(void);
44 void	fprestore(FPU*);
45 void	fpsave(FPU*);
46 ulong	fpstatus(void);
47 char*	getconf(char*);
48 ulong	getdar(void);
49 ulong	getdec(void);
50 ulong	getdepn(void);
51 ulong	getdsisr(void);
52 ulong	getimmr(void);
53 ulong	getmsr(void);
54 ulong	getpvr(void);
55 ulong	gettbl(void);
56 ulong	gettbu(void);
57 void	gotopc(ulong);
58 void	icflush(void*, ulong);
59 void	idle(void);
60 #define	idlehands()			/* nothing to do in the runproc */
61 void	intr(Ureg*);
62 void	intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
63 void	intrdisable(int, void (*)(Ureg*, void*), void*, int, char*);
64 int	intrstats(char*, int);
65 void	intrvec(void);
66 int	isaconfig(char*, int, ISAConf*);
67 int	isvalid_va(void*);
68 void	itlbmiss(void);
69 void	kbdinit(void);
70 void	kbdreset(void);
71 void	lcdpanel(int);
72 void	links(void);
73 void	mapfree(RMap*, ulong, int);
74 void	mapinit(RMap*, Map*, int);
75 void	mathinit(void);
76 void	mmuinit(void);
77 ulong*	mmuwalk(ulong*, ulong, int);
78 void	pcmenable(void);
79 void	pcmintrenable(int, void (*)(Ureg*, void*), void*);
80 int	pcmpin(int slot, int type);
81 void	pcmpower(int, int);
82 int	pcmpowered(int);
83 void	pcmsetvcc(int, int);
84 void	pcmsetvpp(int, int);
85 int	pcmslotsavail(int);
86 void	procsave(Proc*);
87 void	procsetup(Proc*);
88 void	putdec(ulong);
89 void	putmsr(ulong);
90 void	puttwb(ulong);
91 ulong	rmapalloc(RMap*, ulong, int, int);
92 void	screeninit(void);
93 int	screenprint(char*, ...);			/* debugging */
94 void	screenputs(char*, int);
95 int	segflush(void*, ulong);
96 void	setpanic(void);
97 long	spioutin(void*, long, void*);
98 void	spireset(void);
99 ulong	_tas(ulong*);
100 void	trapinit(void);
101 void	trapvec(void);
102 void	uartinstall(void);
103 void	uartspecial(int, int, Queue**, Queue**, int (*)(Queue*, int));
104 void	uartwait(void);	/* debugging */
105 void	videoreset(void);
106 void	videotest(void);
107 void	wbflush(void);
108 
109 #define	waserror()	(up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
110 ulong	getcallerpc(void*);
111 
112 #define KADDR(a)	((void*)((ulong)(a)|KZERO))
113 #define PADDR(a)	((((ulong)(a)&KSEGM)!=KSEG0)?(ulong)(a):((ulong)(a)&~KZERO))
114 
115 /* IBM bit field order */
116 #define	IBIT(b)	((ulong)1<<(31-(b)))
117 #define	SIBIT(n)	((ushort)1<<(15-(n)))
118