xref: /plan9/sys/src/9/ppc/fns.h (revision 6f8e93f6894df6375fc490745e7cb8df51855166)
1 #include "../port/portfns.h"
2 
3 ulong	cankaddr(ulong);
4 int	cistrcmp(char*, char*);
5 int	cistrncmp(char*, char*, int);
6 void	clockinit(void);
7 void	clockintr(Ureg*);
8 int	cmpswap(long*, long, long);
9 void	cpuidprint(void);
10 void	cycles(uvlong*);
11 void	dbgputc(int c);
12 void	dcacheenb(void);
13 void	dcflush(void*, ulong);
14 void	dczap(void*, ulong);
15 void	delay(int);
16 void	delayloopinit(void);
17 void	dmiss(void);
18 void	dumpregs(Ureg*);
19 void	eieio(void);
20 void	evenaddr(ulong);
21 void	faultpower(Ureg*, ulong addr, int read);
22 void	flashprogpower(int);
23 void	fpgareset(void);
24 void	fprestore(FPsave*);
25 void	fpsave(FPsave*);
26 void	fptrap(Ureg*);
27 char*	getconf(char*);
28 ulong	getdar(void);
29 ulong	getdcmp(void);
30 ulong	getdec(void);
31 ulong	getdmiss(void);
32 ulong	getdsisr(void);
33 ulong	gethash1(void);
34 ulong	gethash2(void);
35 ulong	gethid0(void);
36 ulong	gethid1(void);
37 ulong	geticmp(void);
38 ulong	geticmp(void);
39 ulong	getimiss(void);
40 ulong	getmsr(void);
41 ulong	getpvr(void);
42 ulong	getrpa(void);
43 ulong	getsdr1(void);
44 ulong	getsr(int);
45 ulong	getsrr1(void);
46 void	gotopc(ulong);
47 void	hwintrinit(void);
48 void	icacheenb(void);
49 void	icflush(void*, ulong);
50 void	idle(void);
51 #define	idlehands()		/* nothing to do in the runproc */
52 void	imiss(void);
53 int	inb(int);
54 void	intr(Ureg*);
55 void	intrenable(int, void (*)(Ureg*, void*), void*, char*);
56 void	intrdisable(int, void (*)(Ureg*, void*), void*, char*);
57 int	ioalloc(int, int, int, char*);
58 void	iofree(int);
59 int	iprint(char*, ...);
60 int	isaconfig(char*, int, ISAConf*);
61 void	kfpinit(void);
62 #define	kmapinval()
63 void	links(void);
64 void	vectordisable(Vctl *);
65 int	vectorenable(Vctl *);
66 void	intack(void);
67 void	intend(int);
68 int	intvec(void);
69 void	l2disable(void);
70 void	mmuinit(void);
71 void	mmusweep(void*);
72 int	newmmupid(void);
73 void	outb(int, int);
74 int	pcicfgr16(Pcidev*, int);
75 int	pcicfgr32(Pcidev*, int);
76 int	pcicfgr8(Pcidev*, int);
77 void	pcicfgw16(Pcidev*, int, int);
78 void	pcicfgw32(Pcidev*, int, int);
79 void	pcicfgw8(Pcidev*, int, int);
80 void	procsave(Proc*);
81 void	procsetup(Proc*);
82 void	putdcmp(ulong);
83 void	putdec(ulong);
84 void	puthash1(ulong);
85 void	puthash2(ulong);
86 void	puthid0(ulong);
87 void	puthid2(ulong);
88 void	puticmp(ulong);
89 void	puticmp(ulong);
90 void	putmsr(ulong);
91 void	putrpa(ulong);
92 void	putsdr1(ulong);
93 void	putsdr1(ulong);
94 void	putsr(int, ulong);
95 void	putsrr1(ulong);
96 void	sethvec(int, void (*)(void));
97 void	setmvec(int, void (*)(void), void (*)(void));
98 void	sharedseginit(void);
99 void	console(void);
100 void	sync(void);
101 int	tas(void*);
102 void	timeradd(Timer *);
103 void	timerdel(Timer *);
104 void	timerinit(void);
105 void	tlbflush(ulong);
106 void	tlbflushall(void);
107 void	tlbld(ulong);
108 void	tlbli(ulong);
109 void	tlbvec(void);
110 void	touser(void*);
111 void	trapinit(void);
112 void	trapvec(void);
113 #define	userureg(ur) (((ur)->status & MSR_PR) != 0)
114 #define	waserror()	(up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
115 #define KADDR(a)	((void*)((ulong)(a)|KZERO))
116 #define PADDR(a)	((((ulong)(a)&0xf0000000)==0xf0000000)?(ulong)(a):((ulong)(a)&~KZERO))
117 #define coherence()	eieio()
118 Pcidev* pcimatch(Pcidev*, int, int);
119 Pcidev* pcimatchtbdf(int);
120 void	procrestore(Proc*);
121 
122 #ifdef ucuconf
123 extern ulong getpll(void);
124 extern ulong getl2cr(void);
125 extern void putl2cr(ulong);
126 #endif
127