changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > plan9front / sys/src/9/bcm64/fns.h

revision 7199: ba62683c0e2d
child 7222: 761a37c3fc9a
     1.1new file mode 100644
     1.2--- /dev/null
     1.3+++ b/sys/src/9/bcm64/fns.h
     1.4@@ -0,0 +1,168 @@
     1.5+#include "../port/portfns.h"
     1.6+
     1.7+#define	waserror()	(up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
     1.8+
     1.9+/* l.s */
    1.10+extern void sev(void);
    1.11+extern int tas(void *);
    1.12+extern int cmpswap(long*, long, long);
    1.13+extern void coherence(void);
    1.14+extern void idlehands(void);
    1.15+extern uvlong cycles(void);
    1.16+extern int splfhi(void);
    1.17+extern void splflo(void);
    1.18+extern void touser(uintptr sp);
    1.19+extern void forkret(void);
    1.20+extern void noteret(void);
    1.21+extern void returnto(void*);
    1.22+extern void fpsaveregs(void*);
    1.23+extern void fploadregs(void*);
    1.24+extern void magic(void);
    1.25+
    1.26+extern void setttbr(uintptr pa);
    1.27+extern uintptr getfar(void);
    1.28+
    1.29+extern void flushasidva(uintptr asidva);
    1.30+extern void tlbivae1is(uintptr asidva);
    1.31+
    1.32+extern void flushasidvall(uintptr asidva);
    1.33+extern void tlbivale1is(uintptr asidva);
    1.34+
    1.35+extern void flushasid(uintptr asid);
    1.36+extern void tlbiaside1is(uintptr asid);
    1.37+
    1.38+extern void flushtlb(void);
    1.39+extern void tlbivmalle1(void);
    1.40+
    1.41+/* cache */
    1.42+extern ulong cachesize(int level);
    1.43+
    1.44+extern void cacheiinvse(void*, int);
    1.45+extern void cacheuwbinv(void);
    1.46+extern void cacheiinv(void);
    1.47+
    1.48+extern void cachedwbse(void*, int);
    1.49+extern void cacheduwbse(void*, int);
    1.50+extern void cachedinvse(void*, int);
    1.51+extern void cachedwbinvse(void*, int);
    1.52+
    1.53+extern void cachedwb(void);
    1.54+extern void cachedinv(void);
    1.55+extern void cachedwbinv(void);
    1.56+
    1.57+extern void l2cacheuwb(void);
    1.58+extern void l2cacheuinv(void);
    1.59+extern void l2cacheuwbinv(void);
    1.60+
    1.61+/* mmu */
    1.62+#define	getpgcolor(a)	0
    1.63+extern uintptr paddr(void*);
    1.64+#define PADDR(a) paddr((void*)(a))
    1.65+extern uintptr cankaddr(uintptr);
    1.66+extern void* kaddr(uintptr);
    1.67+#define KADDR(a) kaddr(a)
    1.68+extern void kmapinval(void);
    1.69+#define	VA(k)	((uintptr)(k))
    1.70+extern KMap *kmap(Page*);
    1.71+extern void kunmap(KMap*);
    1.72+extern uintptr mmukmap(uintptr, uintptr, usize);
    1.73+
    1.74+extern void mmu0init(uintptr*);
    1.75+extern void mmu0clear(uintptr*);
    1.76+extern void mmu1init(void);
    1.77+
    1.78+extern void putasid(Proc*);
    1.79+
    1.80+/* clock */
    1.81+extern void clockinit(void);
    1.82+extern void synccycles(void);
    1.83+extern void armtimerset(int);
    1.84+
    1.85+/* fpu */
    1.86+extern void fpuinit(void);
    1.87+extern void fpoff(void);
    1.88+extern void fpinit(void);
    1.89+extern void fpclear(void);
    1.90+extern void fpsave(FPsave*);
    1.91+extern void fprestore(FPsave*);
    1.92+extern void mathtrap(Ureg*);
    1.93+
    1.94+/* trap */
    1.95+extern void trapinit(void);
    1.96+extern int userureg(Ureg*);
    1.97+extern void evenaddr(uintptr);
    1.98+extern void setkernur(Ureg*, Proc*);
    1.99+extern void procfork(Proc*);
   1.100+extern void procsetup(Proc*);
   1.101+extern void procsave(Proc*);
   1.102+extern void procrestore(Proc *);
   1.103+extern void trap(Ureg*);
   1.104+extern void syscall(Ureg*);
   1.105+extern void noted(Ureg*, ulong);
   1.106+extern void faultarm64(Ureg*);
   1.107+extern void dumpstack(void);
   1.108+extern void dumpregs(Ureg*);
   1.109+
   1.110+/* irq */
   1.111+extern void intrcpushutdown(void);
   1.112+extern void intrsoff(void);
   1.113+#define intrenable(i, f, a, b, n)	irqenable((i), (f), (a))
   1.114+extern void irqenable(int, void (*)(Ureg*, void*), void*);
   1.115+extern int irq(Ureg*);
   1.116+extern void fiq(Ureg*);
   1.117+
   1.118+/* sysreg */
   1.119+extern uvlong	sysrd(ulong);
   1.120+extern void	syswr(ulong, uvlong);
   1.121+
   1.122+/* gpio */
   1.123+extern void gpiosel(uint, int);
   1.124+extern void gpiopull(uint, int);
   1.125+extern void gpiopullup(uint);
   1.126+extern void gpiopulloff(uint);
   1.127+extern void gpiopulldown(uint);
   1.128+extern void gpioout(uint, int);
   1.129+extern int gpioin(uint);
   1.130+extern void gpioselevent(uint, int, int);
   1.131+extern int gpiogetevent(uint);
   1.132+extern void gpiomeminit(void);
   1.133+
   1.134+/* arch */
   1.135+extern char *cputype2name(char*, int);
   1.136+extern void cpuidprint(void);
   1.137+extern void uartconsinit(void);
   1.138+extern void links(void);
   1.139+extern int getncpus(void);
   1.140+extern int startcpu(uint);
   1.141+extern void okay(int);
   1.142+
   1.143+/* dma */
   1.144+extern uintptr dmaaddr(void*);
   1.145+extern void dmastart(int, int, int, void*, void*, int);
   1.146+extern int dmawait(int);
   1.147+
   1.148+/* vcore */
   1.149+extern void* fbinit(int set, int *width, int *height, int *depth);
   1.150+extern int fbblank(int blank);
   1.151+extern void setpower(int dev, int on);
   1.152+extern int getpower(int dev);
   1.153+extern char* getethermac(void);
   1.154+extern uint getboardrev(void);
   1.155+extern uint getfirmware(void);
   1.156+extern void getramsize(Confmem *mem);
   1.157+extern ulong getclkrate(int clkid);
   1.158+extern void setclkrate(int clkid, ulong hz);
   1.159+extern uint getcputemp(void);
   1.160+extern void vgpinit(void);
   1.161+extern void vgpset(uint port, int on);
   1.162+
   1.163+/* bootargs */
   1.164+extern void bootargsinit(void);
   1.165+extern char *getconf(char *name);
   1.166+extern void setconfenv(void);
   1.167+extern void writeconf(void);
   1.168+
   1.169+/* screen */
   1.170+extern void screeninit(void);
   1.171+
   1.172+extern int isaconfig(char*, int, ISAConf*);