xref: /plan9/sys/src/9/ppc/fns.h (revision fac6300f1f1b25611e114fc0bdda9cf428c13da4)
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	faultpower(Ureg*, ulong addr, int read);
21 void	flashprogpower(int);
22 void	fpgareset(void);
23 void	fprestore(FPsave*);
24 void	fpsave(FPsave*);
25 void	fptrap(Ureg*);
26 char*	getconf(char*);
27 ulong	getdar(void);
28 ulong	getdcmp(void);
29 ulong	getdec(void);
30 ulong	getdmiss(void);
31 ulong	getdsisr(void);
32 ulong	gethash1(void);
33 ulong	gethash2(void);
34 ulong	gethid0(void);
35 ulong	gethid1(void);
36 ulong	geticmp(void);
37 ulong	geticmp(void);
38 ulong	getimiss(void);
39 ulong	getmsr(void);
40 ulong	getpvr(void);
41 ulong	getrpa(void);
42 ulong	getsdr1(void);
43 ulong	getsr(int);
44 ulong	getsrr1(void);
45 void	gotopc(ulong);
46 void	hwintrinit(void);
47 void	icacheenb(void);
48 void	icflush(void*, ulong);
49 void	idle(void);
50 #define	idlehands()		/* nothing to do in the runproc */
51 void	imiss(void);
52 int	inb(int);
53 void	intr(Ureg*);
54 void	intrenable(int, void (*)(Ureg*, void*), void*, char*);
55 void	intrdisable(int, void (*)(Ureg*, void*), void*, char*);
56 int	ioalloc(int, int, int, char*);
57 void	iofree(int);
58 int	iprint(char*, ...);
59 int	isaconfig(char*, int, ISAConf*);
60 void	kfpinit(void);
61 #define	kmapinval()
62 void	links(void);
63 void	vectordisable(Vctl *);
64 int	vectorenable(Vctl *);
65 void	intack(void);
66 void	intend(int);
67 int	intvec(void);
68 void	l2disable(void);
69 void	mmuinit(void);
70 void	mmusweep(void*);
71 int	newmmupid(void);
72 void	outb(int, int);
73 int	pcicfgr16(Pcidev*, int);
74 int	pcicfgr32(Pcidev*, int);
75 int	pcicfgr8(Pcidev*, int);
76 void	pcicfgw16(Pcidev*, int, int);
77 void	pcicfgw32(Pcidev*, int, int);
78 void	pcicfgw8(Pcidev*, int, int);
79 void	procsave(Proc*);
80 void	procsetup(Proc*);
81 void	putdcmp(ulong);
82 void	putdec(ulong);
83 void	puthash1(ulong);
84 void	puthash2(ulong);
85 void	puthid0(ulong);
86 void	puthid2(ulong);
87 void	puticmp(ulong);
88 void	puticmp(ulong);
89 void	putmsr(ulong);
90 void	putrpa(ulong);
91 void	putsdr1(ulong);
92 void	putsdr1(ulong);
93 void	putsr(int, ulong);
94 void	putsrr1(ulong);
95 void	sethvec(int, void (*)(void));
96 void	setmvec(int, void (*)(void), void (*)(void));
97 void	sharedseginit(void);
98 void	console(void);
99 void	sync(void);
100 int	tas(void*);
101 void	timeradd(Timer *);
102 void	timerdel(Timer *);
103 void	timerinit(void);
104 void	tlbflush(ulong);
105 void	tlbflushall(void);
106 void	tlbld(ulong);
107 void	tlbli(ulong);
108 void	tlbvec(void);
109 void	touser(void*);
110 void	trapinit(void);
111 void	trapvec(void);
112 #define	userureg(ur) (((ur)->status & MSR_PR) != 0)
113 void	validalign(uintptr, unsigned);
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