FreeBSD 11-CURRENT on Raspberry Pi 512MB

Daisuke Aoyama aoyama at peach.ne.jp
Wed Oct 29 19:10:10 UTC 2014


Thank you for interesting.

I forget to write "hw.cpufreq" is writable except temperature.

> Is anyone already helping you merge your code to FreeBSD?

Not yet. This is my first working on 11-CURRENT.

> - Did you measure the power consumption when using the different frequency values?

No. I will check. I thought that temperature was more important than power consumption.

> - Could you also export the temperature in dev.cpu.0.temperature like coretemp/amdtemp?

Yes, it's a good point. I have written a part of raw to kelvin conversion.
Also the prop definitions are separated to bcm2835_mbox_prop.h.

Now temperature is in dev.cpu.

# sysctl hw.cpufreq dev.cpu
hw.cpufreq.arm_freq: 300000000
hw.cpufreq.core_freq: 250000000
hw.cpufreq.sdram_freq: 400000000
hw.cpufreq.turbo: 0
hw.cpufreq.voltage_core: 0
hw.cpufreq.voltage_sdram_c: 0
hw.cpufreq.voltage_sdram_i: 0
hw.cpufreq.voltage_sdram_p: 0
hw.cpufreq.temperature: 47615
dev.cpu.%parent:
dev.cpu.0.%desc: Open Firmware CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location:
dev.cpu.0.%pnpinfo: name=cpu at 0 compat=arm,1176jzf-s
dev.cpu.0.%parent: cpulist0
dev.cpu.0.freq: 300
dev.cpu.0.freq_levels: 1000/-1 900/-1 800/-1 700/-1 600/-1 500/-1 400/-1 300/-1
dev.cpu.0.temperature: 46.8C


Updated source and kernel:
http://www.peach.ne.jp/archives/rpi/patch/bcm2835_cpufreq.c
http://www.peach.ne.jp/archives/rpi/patch/bcm2835_mbox_prop.h
http://www.peach.ne.jp/archives/rpi/kernel/kernel-20141030.gz

> One suggestion I have is to move the register definition structures to a header file like 
> bcm2835_cpufreq.h.

To separate prop functions, it needs more work. I don't know where is better place.

Mailbox property interface
https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface
is not only CPU frequencies. But mbox_if have no method for it.

-- 
Daisuke Aoyama
 



More information about the freebsd-arm mailing list