pmc_mdep.h (23090366f729c56cab62de74c7a51792357e98a9) | pmc_mdep.h (6411d14d62a6bca53ba67bc581a1d89448f34944) |
---|---|
1/*- 2 * Copyright (c) 2009 Rui Paulo <rpaulo@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * 26 * $FreeBSD$ 27 */ 28 29#ifndef _MACHINE_PMC_MDEP_H_ 30#define _MACHINE_PMC_MDEP_H_ 31 32#define PMC_MDEP_CLASS_INDEX_XSCALE 1 | 1/*- 2 * Copyright (c) 2009 Rui Paulo <rpaulo@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * 26 * $FreeBSD$ 27 */ 28 29#ifndef _MACHINE_PMC_MDEP_H_ 30#define _MACHINE_PMC_MDEP_H_ 31 32#define PMC_MDEP_CLASS_INDEX_XSCALE 1 |
33#define PMC_MDEP_CLASS_INDEX_ARMV7 1 |
|
33/* 34 * On the ARM platform we support the following PMCs. 35 * 36 * XSCALE Intel XScale processors | 34/* 35 * On the ARM platform we support the following PMCs. 36 * 37 * XSCALE Intel XScale processors |
38 * ARMV7 ARM Cortex-A processors |
|
37 */ 38#include <dev/hwpmc/hwpmc_xscale.h> | 39 */ 40#include <dev/hwpmc/hwpmc_xscale.h> |
41#include <dev/hwpmc/hwpmc_armv7.h> |
|
39 40union pmc_md_op_pmcallocate { 41 uint64_t __pad[4]; 42}; 43 44/* Logging */ 45#define PMCLOG_READADDR PMCLOG_READ32 46#define PMCLOG_EMITADDR PMCLOG_EMIT32 47 48#ifdef _KERNEL 49union pmc_md_pmc { 50 struct pmc_md_xscale_pmc pm_xscale; | 42 43union pmc_md_op_pmcallocate { 44 uint64_t __pad[4]; 45}; 46 47/* Logging */ 48#define PMCLOG_READADDR PMCLOG_READ32 49#define PMCLOG_EMITADDR PMCLOG_EMIT32 50 51#ifdef _KERNEL 52union pmc_md_pmc { 53 struct pmc_md_xscale_pmc pm_xscale; |
54 struct pmc_md_armv7_pmc pm_armv7; |
|
51}; 52 53#define PMC_IN_KERNEL_STACK(S,START,END) \ 54 ((S) >= (START) && (S) < (END)) 55#define PMC_IN_KERNEL(va) (((va) >= USRSTACK) && \ 56 ((va) < VM_MAX_KERNEL_ADDRESS)) 57 58#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) --- 9 unchanged lines hidden (view full) --- 68 __asm __volatile("mov %0, pc" : "=r" ((TF)->tf_pc)); \ 69 } while (0) 70 71/* 72 * Prototypes 73 */ 74struct pmc_mdep *pmc_xscale_initialize(void); 75void pmc_xscale_finalize(struct pmc_mdep *_md); | 55}; 56 57#define PMC_IN_KERNEL_STACK(S,START,END) \ 58 ((S) >= (START) && (S) < (END)) 59#define PMC_IN_KERNEL(va) (((va) >= USRSTACK) && \ 60 ((va) < VM_MAX_KERNEL_ADDRESS)) 61 62#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) --- 9 unchanged lines hidden (view full) --- 72 __asm __volatile("mov %0, pc" : "=r" ((TF)->tf_pc)); \ 73 } while (0) 74 75/* 76 * Prototypes 77 */ 78struct pmc_mdep *pmc_xscale_initialize(void); 79void pmc_xscale_finalize(struct pmc_mdep *_md); |
80struct pmc_mdep *pmc_armv7_initialize(void); 81void pmc_armv7_finalize(struct pmc_mdep *_md); |
|
76#endif /* _KERNEL */ 77 78#endif /* !_MACHINE_PMC_MDEP_H_ */ | 82#endif /* _KERNEL */ 83 84#endif /* !_MACHINE_PMC_MDEP_H_ */ |