summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa_device.hh
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2014-12-23 09:31:17 -0500
committerAndreas Sandberg <andreas.sandberg@arm.com>2014-12-23 09:31:17 -0500
commit070b4a81dbf9cc040ecb771e128993ae519cf80f (patch)
treed3f7f059aafb0dff016a0486166d71c34bc8abc2 /src/arch/arm/isa_device.hh
parent809134a2b151f82c29593e64086393b31bc110b7 (diff)
downloadgem5-070b4a81dbf9cc040ecb771e128993ae519cf80f.tar.xz
arm: Add support for filtering in the PMU
This patch adds support for filtering events in the PMU. In order to do so, it updates the ISADevice base class to forward an ISA pointer to ISA devices. This enables such devices to access the MiscReg file to determine the current execution level.
Diffstat (limited to 'src/arch/arm/isa_device.hh')
-rw-r--r--src/arch/arm/isa_device.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/arch/arm/isa_device.hh b/src/arch/arm/isa_device.hh
index edf43f1cb..8b12fa502 100644
--- a/src/arch/arm/isa_device.hh
+++ b/src/arch/arm/isa_device.hh
@@ -46,6 +46,8 @@
namespace ArmISA
{
+class ISA;
+
/**
* Base class for devices that use the MiscReg interfaces.
*
@@ -56,9 +58,11 @@ namespace ArmISA
class BaseISADevice
{
public:
- BaseISADevice() {}
+ BaseISADevice();
virtual ~BaseISADevice() {}
+ virtual void setISA(ISA *isa);
+
/**
* Write to a system register belonging to this device.
*
@@ -74,6 +78,9 @@ class BaseISADevice
* @return Register value.
*/
virtual MiscReg readMiscReg(int misc_reg) = 0;
+
+ protected:
+ ISA *isa;
};
/**