summaryrefslogtreecommitdiff
path: root/src/dev/arm/RealView.py
diff options
context:
space:
mode:
authorDavid Guillen Fandos <david.guillen@arm.com>2015-05-13 15:02:25 +0100
committerDavid Guillen Fandos <david.guillen@arm.com>2015-05-13 15:02:25 +0100
commit65ecd954861aa76532ca79453afcf66a837e1fa6 (patch)
tree65a7eef6c12995b1215ce5b0622da7732fd87cea /src/dev/arm/RealView.py
parent75c82f1fe3e654ca7d472d8f824424ff450c01d1 (diff)
downloadgem5-65ecd954861aa76532ca79453afcf66a837e1fa6.tar.xz
sim: Thermal support for Linux
This patch enables Linux to read the temperature using hwmon infrastructure. In order to use this in your gem5 you need to compile the kernel using the following configs: CONFIG_HWMON=y CONFIG_SENSORS_VEXPRESS=y And a proper dts file (containing an entry such as): dcc { compatible = "arm,vexpress,config-bus"; arm,vexpress,config-bridge = <&v2m_sysreg>; temp@0 { compatible = "arm,vexpress-temp"; arm,vexpress-sysreg,func = <4 0>; label = "DCC"; }; };
Diffstat (limited to 'src/dev/arm/RealView.py')
-rw-r--r--src/dev/arm/RealView.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index 9d4dc6aaf..17b3eb51d 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -129,6 +129,22 @@ class RealViewOsc(ClockDomain):
freq = Param.Clock("Default frequency")
+class RealViewTemperatureSensor(SimObject):
+ type = 'RealViewTemperatureSensor'
+ cxx_header = "dev/arm/rv_ctrl.hh"
+
+ parent = Param.RealViewCtrl(Parent.any, "RealView controller")
+
+ system = Param.System(Parent.any, "system")
+
+ # See ARM DUI 0447J (ARM Motherboard Express uATX -- V2M-P1) and
+ # the individual core/logic tile reference manuals for details
+ # about the site/position/dcc/device allocation.
+ site = Param.UInt8("Board Site")
+ position = Param.UInt8("Position in device stack")
+ dcc = Param.UInt8("Daughterboard Configuration Controller")
+ device = Param.UInt8("Device ID")
+
class VExpressMCC(SubSystem):
"""ARM V2M-P1 Motherboard Configuration Controller
@@ -140,11 +156,17 @@ Express (V2M-P1) motherboard. See ARM DUI 0447J for details.
class Osc(RealViewOsc):
site, position, dcc = (0, 0, 0)
+ class Temperature(RealViewTemperatureSensor):
+ site, position, dcc = (0, 0, 0)
+
osc_mcc = Osc(device=0, freq="50MHz")
osc_clcd = Osc(device=1, freq="23.75MHz")
osc_peripheral = Osc(device=2, freq="24MHz")
osc_system_bus = Osc(device=4, freq="24MHz")
+ # See Table 4.19 in ARM DUI 0447J (Motherboard Express uATX TRM).
+ temp_crtl = Temperature(device=0)
+
class CoreTile2A15DCC(SubSystem):
"""ARM CoreTile Express A15x2 Daughterboard Configuration Controller