pmc.h 997 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. enum{
  10. PmcCtlNullval = 0xdead,
  11. };
  12. typedef struct PmcCtlCtrId PmcCtlCtrId;
  13. struct PmcCtlCtrId {
  14. char portdesc[KNAMELEN];
  15. char archdesc[KNAMELEN];
  16. };
  17. int pmcnregs(void);
  18. int pmcsetctl(uint32_t coreno, PmcCtl *p, uint32_t regno);
  19. int pmctrans(PmcCtl *p);
  20. int pmcgetctl(uint32_t coreno, PmcCtl *p, uint32_t regno);
  21. int pmcdescstr(char *str, int nstr);
  22. int pmcctlstr(char *str, int nstr, PmcCtl *p);
  23. uint64_t pmcgetctr(uint32_t coreno, uint32_t regno);
  24. int pmcsetctr(uint32_t coreno, uint64_t v, uint32_t regno);
  25. void pmcupdate(Mach *m);
  26. extern void (*_pmcupdate)(Mach *m);