pmu.hh (12286:fb69c03c88e1) pmu.hh (12973:78a7bbc23c29)
1/*
1/*
2 * Copyright (c) 2011-2014, 2017 ARM Limited
2 * Copyright (c) 2011-2014, 2017-2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

--- 42 unchanged lines hidden (view full) ---

53#include "debug/PMUVerbose.hh"
54#include "sim/eventq.hh"
55#include "sim/sim_object.hh"
56#include "sim/system.hh"
57
58class ArmPMUParams;
59class Platform;
60class ThreadContext;
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

--- 42 unchanged lines hidden (view full) ---

53#include "debug/PMUVerbose.hh"
54#include "sim/eventq.hh"
55#include "sim/sim_object.hh"
56#include "sim/system.hh"
57
58class ArmPMUParams;
59class Platform;
60class ThreadContext;
61class ArmInterruptPin;
61
62namespace ArmISA {
63
64
65/**
66 * Model of an ARM PMU version 3
67 *
68 * This class implements a subset of the ARM PMU v3 specification as

--- 38 unchanged lines hidden (view full) ---

107 void serialize(CheckpointOut &cp) const override;
108 void unserialize(CheckpointIn &cp) override;
109
110 void drainResume() override;
111
112 void regProbeListeners() override;
113
114 public: // ISA Device interface
62
63namespace ArmISA {
64
65
66/**
67 * Model of an ARM PMU version 3
68 *
69 * This class implements a subset of the ARM PMU v3 specification as

--- 38 unchanged lines hidden (view full) ---

108 void serialize(CheckpointOut &cp) const override;
109 void unserialize(CheckpointIn &cp) override;
110
111 void drainResume() override;
112
113 void regProbeListeners() override;
114
115 public: // ISA Device interface
116 void setThreadContext(ThreadContext *tc) override;
117
115 /**
116 * Set a register within the PMU.
117 *
118 * @param misc_reg Register number (see miscregs.hh)
119 * @param val Value to store
120 */
121 void setMiscReg(int misc_reg, MiscReg val) override;
122 /**

--- 471 unchanged lines hidden (view full) ---

594 protected: /* Configuration and constants */
595 /** Constant (configuration-dependent) part of the PMCR */
596 PMCR_t reg_pmcr_conf;
597
598 /** PMCR write mask when accessed from the guest */
599 static const MiscReg reg_pmcr_wr_mask;
600
601 /** Performance monitor interrupt number */
118 /**
119 * Set a register within the PMU.
120 *
121 * @param misc_reg Register number (see miscregs.hh)
122 * @param val Value to store
123 */
124 void setMiscReg(int misc_reg, MiscReg val) override;
125 /**

--- 471 unchanged lines hidden (view full) ---

597 protected: /* Configuration and constants */
598 /** Constant (configuration-dependent) part of the PMCR */
599 PMCR_t reg_pmcr_conf;
600
601 /** PMCR write mask when accessed from the guest */
602 static const MiscReg reg_pmcr_wr_mask;
603
604 /** Performance monitor interrupt number */
602 const unsigned int pmuInterrupt;
603 /** Platform this device belongs to */
604 Platform *const platform;
605 ArmInterruptPin *const interrupt;
605
606 /**
607 * List of event types supported by this PMU.
608 */
609 std::map<EventTypeId, PMUEvent*> eventMap;
610};
611
612} // namespace ArmISA
613#endif
606
607 /**
608 * List of event types supported by this PMU.
609 */
610 std::map<EventTypeId, PMUEvent*> eventMap;
611};
612
613} // namespace ArmISA
614#endif