1145332Smarcel/*- 2145332Smarcel * This file is in the public domain. 3145332Smarcel * 4145332Smarcel * $FreeBSD: releng/10.3/sys/powerpc/include/pmc_mdep.h 263122 2014-03-14 00:12:53Z jhibbits $ 5145332Smarcel */ 6145332Smarcel 7145332Smarcel#ifndef _MACHINE_PMC_MDEP_H_ 8145332Smarcel#define _MACHINE_PMC_MDEP_H_ 9145332Smarcel 10263122Sjhibbits#define PMC_MDEP_CLASS_INDEX_CPU 1 11260669Sjhibbits#define PMC_MDEP_CLASS_INDEX_PPC7450 1 12260669Sjhibbits#define PMC_MDEP_CLASS_INDEX_PPC970 1 13233628Sfabient 14147191Sjkoshyunion pmc_md_op_pmcallocate { 15147191Sjkoshy uint64_t __pad[4]; 16147191Sjkoshy}; 17147191Sjkoshy 18147191Sjkoshy/* Logging */ 19147191Sjkoshy#define PMCLOG_READADDR PMCLOG_READ32 20147191Sjkoshy#define PMCLOG_EMITADDR PMCLOG_EMIT32 21147191Sjkoshy 22147191Sjkoshy#if _KERNEL 23147191Sjkoshy 24228869Sjhibbitsstruct pmc_md_powerpc_pmc { 25228869Sjhibbits uint32_t pm_powerpc_evsel; 26228869Sjhibbits}; 27228869Sjhibbits 28147191Sjkoshyunion pmc_md_pmc { 29228869Sjhibbits struct pmc_md_powerpc_pmc pm_powerpc; 30147191Sjkoshy}; 31147191Sjkoshy 32260669Sjhibbits#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->srr0) 33260669Sjhibbits#define PMC_TRAPFRAME_TO_FP(TF) ((TF)->fixreg[1]) 34174405Sjkoshy#define PMC_TRAPFRAME_TO_SP(TF) (0) 35174405Sjkoshy 36147191Sjkoshy#endif 37147191Sjkoshy 38145332Smarcel#endif /* !_MACHINE_PMC_MDEP_H_ */ 39