From owner-freebsd-arm@FreeBSD.ORG Wed Oct 29 16:49:34 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 0CD62B15 for ; Wed, 29 Oct 2014 16:49:34 +0000 (UTC) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C0F98391 for ; Wed, 29 Oct 2014 16:49:33 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id kq14so3498287pab.24 for ; Wed, 29 Oct 2014 09:49:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=Lw9bw+mDoa2A/3B2II2dte0gkJ5pXlzNwMc1uTRt4rM=; b=XS72TDga9WRbqg27M3ZSMu+VGiYPxwfS5p06jsgBGqxwQRJN9P5GkinbeylY2K5YJv RiZF0yPXimVWYJF1qvt5+kIrbTlRNKB24+oKv9fNZJBCYrZPhWiPlTbVnb3ZaQqfOoHf VCQMMywtN2q1W5JF4RPx9f91IH5XoLBRDDW8St+Y6li+HOUtbjg21olTB0uVuKKwR5Ft PTOXIJNe5fBOGWJLhlJ+mdBrrk62CSPdBMxa8kNy1sffYgfq/Mg6m1QATECSCnnk/Wiy XxtP+4Mv/Emf6Yl8gFlbMKXiq5l8cujzW8uioWjxT43EijeQKp9NCMtegxKGv+9hT5KB QIFQ== X-Gm-Message-State: ALoCoQmv5+52OZaR2vBEzRWH9Gn7hsYAB2a8Gr8kUwjSm2NhcC57rRlCUVJonQ0WfDaFz5TXPJN3 X-Received: by 10.69.31.107 with SMTP id kl11mr134479pbd.167.1414601367626; Wed, 29 Oct 2014 09:49:27 -0700 (PDT) Received: from [10.64.27.26] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id s9sm4843279pdp.1.2014.10.29.09.49.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 09:49:26 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_2A553DAD-8ABB-4802-9F82-A7F42B53F1AD"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: FreeBSD 11-CURRENT on Raspberry Pi 512MB From: Warner Losh In-Reply-To: <1414594412.17308.76.camel@revolution.hippie.lan> Date: Wed, 29 Oct 2014 10:49:22 -0600 Message-Id: References: <0A8390C3FC2B444B9AA8AC934B79DCD6@ad.peach.ne.jp> <1414594412.17308.76.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-arm@freebsd.org, Rui Paulo 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 16:49:34 -0000 --Apple-Mail=_2A553DAD-8ABB-4802-9F82-A7F42B53F1AD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Oct 29, 2014, at 8:53 AM, Ian Lepore wrote: > On Tue, 2014-10-28 at 23:49 -0700, Rui Paulo wrote: >> On Oct 28, 2014, at 18:20, Daisuke Aoyama wrote: >>>=20 >>> I've created FreeBSD 11-CURRENT for RPi based on svn 273303. >>>=20 >>> The first version is released at my Japanese blog: >>>=20 >>> Download and tips >>> http://shell.peach.ne.jp/aoyama/archives/2931 >>> Initial setup of FreeBSD 11 on RPi >>> http://shell.peach.ne.jp/aoyama/archives/2946 >>> Package installation of Apache 2.4(event MPM), MySQL 5.6, PHP = 5.6(ZTS) and phpMyAdmin. >>> http://shell.peach.ne.jp/aoyama/archives/2951 >>>=20 >>> The pre-build base images are available from my archives: >>> http://www.peach.ne.jp/archives/rpi/ >>> (Latest version is = FreeBSD-armv6-11.0-RPI-B-test20-r273303-20141026.img.gz) >>>=20 >>> Download and decompress it, then write it to an SD card of 8GB or = more. >>> This image is intended to use as a headless server. (No X11 and GPU = 16MB) >>> For quick playing, I provide some useful packages such as samba 4.1, = AMP. >>>=20 >>> This version have cpufreq(4) based frequency contoller. >>> Clock frequencies can be dynamically changed by hand or powerd. >>> Also realtime raw values including temperature are stored in = hw.cpufreq: >>>=20 >>> Example overclock at 1000MHz: >>>=20 >>> # sysctl hw.cpufreq >>> hw.cpufreq.arm_freq: 1000000000 >>> hw.cpufreq.core_freq: 500000000 >>> hw.cpufreq.sdram_freq: 500000000 >>> hw.cpufreq.turbo: 1 >>> hw.cpufreq.voltage_core: 6 >>> hw.cpufreq.voltage_sdram_c: 1 >>> hw.cpufreq.voltage_sdram_i: 1 >>> hw.cpufreq.voltage_sdram_p: 1 >>> hw.cpufreq.temperature: 50843 >>>=20 >>> # sysctl dev.cpu >>> dev.cpu.%parent: >>> dev.cpu.0.%desc: Open Firmware CPU >>> dev.cpu.0.%driver: cpu >>> dev.cpu.0.%location: >>> dev.cpu.0.%pnpinfo: name=3Dcpu@0 compat=3Darm,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 >>>=20 >>>=20 >>> Note: >>> Do not build kernel without patch to bcm2835_mbox.c, otherwise you = get a panic in msleep. >>>=20 >>> Using config is here: >>> http://www.peach.ne.jp/archives/rpi/config/RPI-B-test20 >>>=20 >>> Source and pacth is here: >>> http://www.peach.ne.jp/archives/rpi/patch/ >>>=20 >>> Local packages is here: >>> http://www.peach.ne.jp/archives/rpi/ports/packages/All/ >>>=20 >>>=20 >>> Pre-configured: >>>=20 >>> MEM 496MB/GPU 16MB/SWAP none >>> Clock: ARM 800MHz/Core 400MHz/SDRAM 400MHz (overclock from = 700/250/400) >>> ntpdate: 0.freebsd.pool.ntp.org >>> portsnap: fetch and extracted >>> powerd: enabled (min 300MHz) >>>=20 >>> See also: >>> http://www.peach.ne.jp/archives/rpi/00README.txt >>=20 >> This is pretty interesting. Is anyone already helping you merge your = code to FreeBSD? >>=20 >> Some questions: >>=20 >> - Did you measure the power consumption when using the different = frequency values? >> - Could you also export the temperature in dev.cpu.0.temperature like = coretemp/amdtemp? You'd need to perform a device lookup and then lookup = its sysctl context. >>=20 >> One suggestion I have is to move the register definition structures = to a header file like bcm2835_cpufreq.h. >>=20 >=20 > Huh, and I would recommend just the opposite, including a need to = clean > up many of our existing drivers. If it's only used by one source = file, > it doesn't need to be in a header file, which is implicitly for = sharing > information between multiple source files. The worst is when you have > foo_driverreg.h with like 4 #defines in it; that's so annoying. (A > valid exception to the "only if it needs to be shared" concept might = be > a file that #defines hundreds-to-thousands of values.) I=92d peg it closer to =91dozens=92 rather than =91hundreds=92. More = than a few dozen lines of register definitions needs their own file. That=92s the point they become a distraction. It is well short of =91hundreds=92 let = alone thousands. Though I=92ve done it in the past in reg.h files (have just a few = defines), a few defines can easily live at the top of the driver. Most devices are complicated enough that the convention arose. It was only when we started having dozens of devices with a few registers and a few bits that it became annoying. Warner --Apple-Mail=_2A553DAD-8ABB-4802-9F82-A7F42B53F1AD Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUURqSAAoJEGwc0Sh9sBEADfsQAJL4/wmxjZsXDdlZsNh3829d c3sUVXPNVk84Zv3eoqd15RHk2PnWwp238eV2OiARjDLSi15Y7+WjgoFqyEqohVGh BRfKIZzV1vYEh/0FL404PBS7Fubr9LAyDTi8ETGn9yLFIz+ziWOBFUs8Rxp9vq4n dtHqPlKtDXWjv/He9/ZFnq+Qb4R7SOon2DGCYCZDRZbY3YpFvTKyYf8TEjcfyMA0 6FmWEYOK4y0yyK9uV0QBDDl7pnempiI+EtuLJcdCfreWiT1OviHDmq2aRhleBJzP lLbPWfc6Oc5QyShPBlUkad6zhOKOh/teM+A5czGPK21+cOdlI9iGYr4prkJLMtk+ knpQJaoI9XbB/sGXE7uQ5+L0HYBQ5MEyosiBkxTdhUy0wm7axCerl92wJlCnVyTr ZAlDT8z5Jfya7FT31adQ15BP8gPPCAnRU9UGE95IXnR89Q7lnINndW8HexQC+hMd dkA/rgGiTCqGirnFmTaZX+KgjWwDRtEBlLkcvRx2K0ooWZS0p5ndHg8dHPUUlMug Yr1yxHL+4C0C4ubYvtV0iDQVUvM9MdkaanKD4TU1PdjERztYZmpXBVxb3dhoj2Nx HbGfV5DOFB0Du9IChg9mh3e6IJ9RIo7GhfQk7YPMFMzxfQf4bU66uE6EtWYeYTz8 +Kt1lId3sFM/48FbiOrG =2/4L -----END PGP SIGNATURE----- --Apple-Mail=_2A553DAD-8ABB-4802-9F82-A7F42B53F1AD--