fns.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. uvlong allocate(int);
  2. int bootp(char*);
  3. void consinit(void);
  4. int devopen(char*);
  5. int devclose(int);
  6. int devread(int, uchar*, int, int);
  7. int devwrite(int, uchar*, int, int);
  8. uvlong dispatch(uvlong, uvlong, uvlong, uvlong, uvlong);
  9. void dumpenv(void);
  10. void firmware(void);
  11. uvlong gendispatch(uvlong, uvlong, uvlong, uvlong, uvlong, uvlong);
  12. int getcfields(char*, char**, int, char*);
  13. char* getconf(char*);
  14. char* getenv(char*);
  15. uvlong getptbr(void);
  16. void kexec(ulong);
  17. uvlong ldqp(uvlong);
  18. void meminit(void);
  19. void mmuinit(void);
  20. ulong msec(void);
  21. uvlong rdv(uvlong);
  22. uvlong paddr(uvlong);
  23. void panic(char *, ...);
  24. ulong pcc_cnt(void);
  25. uvlong pground(uvlong);
  26. void putstrn(char *, int);
  27. void setconf(char*);
  28. void stqp(uvlong, uvlong);
  29. int swppal(uvlong, uvlong, uvlong, uvlong, uvlong);
  30. void tlbflush(void);
  31. int validrgn(ulong, ulong);
  32. void wrv(uvlong, uvlong);
  33. #define GSHORT(p) (((p)[1]<<8)|(p)[0])
  34. #define GLONG(p) ((GSHORT(p+2)<<16)|GSHORT(p))
  35. #define GLSHORT(p) (((p)[0]<<8)|(p)[1])
  36. #define GLLONG(p) ((GLSHORT(p)<<16)|GLSHORT(p+2))