Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/include/pmc_mdep.h
Show All 23 Lines | |||||
* POSSIBILITY OF SUCH DAMAGE. | * POSSIBILITY OF SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _MACHINE_PMC_MDEP_H_ | #ifndef _MACHINE_PMC_MDEP_H_ | ||||
#define _MACHINE_PMC_MDEP_H_ | #define _MACHINE_PMC_MDEP_H_ | ||||
#define PMC_MDEP_CLASS_INDEX_ARMV8 1 | |||||
/* | |||||
* On the ARMv8 platform we support the following PMCs. | |||||
* | |||||
* ARMV8 ARM Cortex-A53/57/72 processors | |||||
*/ | |||||
#include <dev/hwpmc/hwpmc_arm64.h> | |||||
union pmc_md_op_pmcallocate { | union pmc_md_op_pmcallocate { | ||||
uint64_t __pad[4]; | uint64_t __pad[4]; | ||||
}; | }; | ||||
/* Logging */ | /* Logging */ | ||||
#define PMCLOG_READADDR PMCLOG_READ64 | #define PMCLOG_READADDR PMCLOG_READ64 | ||||
#define PMCLOG_EMITADDR PMCLOG_EMIT64 | #define PMCLOG_EMITADDR PMCLOG_EMIT64 | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
union pmc_md_pmc { | union pmc_md_pmc { | ||||
struct pmc_md_arm64_pmc pm_arm64; | |||||
}; | }; | ||||
#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */ | #define PMC_IN_KERNEL_STACK(S,START,END) \ | ||||
#define PMC_TRAPFRAME_TO_FP(TF) (0) | ((S) >= (START) && (S) < (END)) | ||||
#define PMC_TRAPFRAME_TO_SP(TF) (0) | #define PMC_IN_KERNEL(va) INKERNEL((va)) | ||||
#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) | |||||
#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_lr) | |||||
#define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_x[29]) | |||||
/* | |||||
* Prototypes | |||||
*/ | |||||
struct pmc_mdep *pmc_arm64_initialize(void); | |||||
void pmc_arm64_finalize(struct pmc_mdep *_md); | |||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* !_MACHINE_PMC_MDEP_H_ */ | #endif /* !_MACHINE_PMC_MDEP_H_ */ |