isa_device.hh (12972:832a2d71a6cf) | isa_device.hh (13581:b6dcd0183747) |
---|---|
1/* 2 * Copyright (c) 2014, 2017 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 --- 58 unchanged lines hidden (view full) --- 67 virtual void setThreadContext(ThreadContext *tc) {} 68 69 /** 70 * Write to a system register belonging to this device. 71 * 72 * @param misc_reg Register number (see miscregs.hh) 73 * @param val Value to store 74 */ | 1/* 2 * Copyright (c) 2014, 2017 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 --- 58 unchanged lines hidden (view full) --- 67 virtual void setThreadContext(ThreadContext *tc) {} 68 69 /** 70 * Write to a system register belonging to this device. 71 * 72 * @param misc_reg Register number (see miscregs.hh) 73 * @param val Value to store 74 */ |
75 virtual void setMiscReg(int misc_reg, MiscReg val) = 0; | 75 virtual void setMiscReg(int misc_reg, RegVal val) = 0; |
76 77 /** 78 * Read a system register belonging to this device. 79 * 80 * @param misc_reg Register number (see miscregs.hh) 81 * @return Register value. 82 */ | 76 77 /** 78 * Read a system register belonging to this device. 79 * 80 * @param misc_reg Register number (see miscregs.hh) 81 * @return Register value. 82 */ |
83 virtual MiscReg readMiscReg(int misc_reg) = 0; | 83 virtual RegVal readMiscReg(int misc_reg) = 0; |
84 85 protected: 86 ISA *isa; 87}; 88 89/** 90 * Dummy device that prints a warning when it is accessed. 91 * 92 * This device can be used as a placeholder when a real device model 93 * is not present. For example, the ISA code uses it to avoid having 94 * to check for a PMU in the register access code. 95 */ 96class DummyISADevice : public BaseISADevice 97{ 98 public: 99 DummyISADevice() 100 : BaseISADevice() {} 101 ~DummyISADevice() {} 102 | 84 85 protected: 86 ISA *isa; 87}; 88 89/** 90 * Dummy device that prints a warning when it is accessed. 91 * 92 * This device can be used as a placeholder when a real device model 93 * is not present. For example, the ISA code uses it to avoid having 94 * to check for a PMU in the register access code. 95 */ 96class DummyISADevice : public BaseISADevice 97{ 98 public: 99 DummyISADevice() 100 : BaseISADevice() {} 101 ~DummyISADevice() {} 102 |
103 void setMiscReg(int misc_reg, MiscReg val) override; 104 MiscReg readMiscReg(int misc_reg) override; | 103 void setMiscReg(int misc_reg, RegVal val) override; 104 RegVal readMiscReg(int misc_reg) override; |
105}; 106 107} 108 109#endif // __ARCH_ARM_ISA_DEVICE_HH__ | 105}; 106 107} 108 109#endif // __ARCH_ARM_ISA_DEVICE_HH__ |