I did this with setting up in /etc/sysfs.cfg
In my case I did fill in this file the following line for each cpu
devices/system/cpu/cpufreq/policy0/scaling_max_freq = 2700000
devices/system/cpu/cpufreq/policy1/scaling_max_freq = 2700000
and it worked for me. To find out how the exact path is to your controls, you've only to search through /sys/ as the lines in the /etc/sysfs.ctl do exactly that, they set up the values in this place. I had 8 cpus so there are 8 lines beginning with policy0 and ending with polidy7.
To quick check how it works on your system I did use the inline function:
cpufreq-info
with that function you may see how your system operates the cpu at the moment. So if it is setted up you may check if that worked or not.
To quick check how it workes you may do such kind of a command
sudo /bin/sh -c " echo 2700000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq "
if you only want to give a special programm rules you could use the tool cgroups. I think to drop down the speed is not allways better for the temperatur as if you get than because of this to much processes waiting, your cpus will run all the time on full speed and your system stays slow. But I did it because of the same reason. My cpu is now not more running with full speed 3100000 and uses a maximum value of 2700000 what is quick enough for me and doesn*t disturbs at all. I've never got the heat that quick up.
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
and perhaps edit that information into your question.