How to limit cpu frequency in OS X? The OS X kernel does control this directly since below 5% my CPU gets locked to 1.2GHz instead of the normal 3.7GHz so there has to be a way to control the CPU speed.

I am aware of this question (Limit processor speed like in Windows) which claimed it to be impossible but after noticing that OS X does control your cpu speed directly depending on battery power I find it hard to believe it's impossible.

So is there any hidden kext and/or kernel call to control the cpu speed? Forwarding me to kernel documentation so I can write my own app is an option as well.
I found this for your reading pleasure:

Mavericks: Native CPU/IGPU Power Management


  Native Mavericks power management delivers the best combination of
  processor and graphics performance and efficiency. The ingredients are
  an installed processor specific power management ssdt, a compatible
  system definition and the native power management kext. Native
  Mavericks power management does not require specific BIOS settings or
  anything more than one boot setting to load the power management ssdt.
  Credit for the technique described to PikeRAlpha.
  
  What changed between Mountain Lion and Mavericks power management? The
  existing processor frequency/power state reporting tools (i.e.,
  MSRDumper, HWMonitor) stopped reporting power states between idle and
  max non turbo. This led to an incorrect conclusion that native
  Mavericks power management was not working. A new tool, Intel Power
  Gadget, shows Mavericks power management is working as designed.
  
  To be clear, native Mavericks power management is not mandatory. The
  consequences are not severe. Performance is similar, however, higher
  temps (~10 C), more power (5-10 W) and sleep problems are likely.
  
  Change Log
  
  v1.1 - 4/4/14 - CPU PM/Core i3/5/7 xxx (1st Generation)/Core 2 and
  earlier (below) v1.0 - 4/2/14: Initial Release
  
  Requirements

OS X/10.9.2 or newer
    Desktop/Laptop only
    Server, see Guide: Asus X79 OS X Controlled SpeedStep

Stock Clock
    Verify
    OC, use ./ssdtPRGen.sh -f freq flag

  
  Supported CPU/IGPU

Haswell/HD4600+ (Core i3/5/7 4xxx, 4th Generation)
Ivy Bridge/HD4000 (Core i3/5/7 3xxx, 3rd Generation)
Sandy Bridge/HD3000 (Core i3/5/7 2xxx, 2nd Generation)

  
  Native Mavericks Power Management Recipe

System Definition - match processor generation/desktop or laptop
ssdt - custom to installed processor
kext - native IOPlatformPlugin.kext

  
  Not considered

NullCPUPowerManagement.kext
Safe Mode boot (-x)
Discrete graphics