From owner-freebsd-arm@FreeBSD.ORG Wed Oct 29 19:10:10 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09620A6F for ; Wed, 29 Oct 2014 19:10:10 +0000 (UTC) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA054809 for ; Wed, 29 Oct 2014 19:10:08 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id E9E8039D36; Thu, 30 Oct 2014 04:10:05 +0900 (JST) Received: from artemis (unknown [172.18.0.21]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id C798739D0A; Thu, 30 Oct 2014 04:10:05 +0900 (JST) Message-ID: From: "Daisuke Aoyama" To: "Rui Paulo" References: <0A8390C3FC2B444B9AA8AC934B79DCD6@ad.peach.ne.jp> In-Reply-To: Subject: Re: FreeBSD 11-CURRENT on Raspberry Pi 512MB Date: Thu, 30 Oct 2014 04:10:02 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 19:10:10 -0000 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@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