From owner-freebsd-arm@freebsd.org Tue Mar 6 20:20:27 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8198F2B6BC for ; Tue, 6 Mar 2018 20:20:27 +0000 (UTC) (envelope-from hondareyte.luc@laposte.net) Received: from smtp.laposte.net (smtpoutz26.laposte.net [194.117.213.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D2826876C for ; Tue, 6 Mar 2018 20:20:26 +0000 (UTC) (envelope-from hondareyte.luc@laposte.net) Received: from smtp.laposte.net (localhost [127.0.0.1]) by lpn-prd-vrout014 (Postfix) with ESMTP id 85C12122891 for ; Tue, 6 Mar 2018 20:59:37 +0100 (CET) Received: from smtp.laposte.net (localhost [127.0.0.1]) by lpn-prd-vrout014 (Postfix) with ESMTP id 780B912289E for ; Tue, 6 Mar 2018 20:59:37 +0100 (CET) Received: from lpn-prd-vrin002 (lpn-prd-vrin002.laposte [10.128.63.3]) by lpn-prd-vrout014 (Postfix) with ESMTP id 73909122891 for ; Tue, 6 Mar 2018 20:59:37 +0100 (CET) Received: from lpn-prd-vrin002 (localhost [127.0.0.1]) by lpn-prd-vrin002 (Postfix) with ESMTP id 63CE95C3703 for ; Tue, 6 Mar 2018 20:59:37 +0100 (CET) Received: from Hibiscus.local (unknown [88.190.12.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lpn-prd-vrin002 (Postfix) with ESMTPSA id 3C5B85C36D9 for ; Tue, 6 Mar 2018 20:59:37 +0100 (CET) To: freebsd-arm@freebsd.org From: Luc Hondareyte Subject: cpufreq support on Allwinner H3 Message-ID: <5332936b-f38b-ca7a-03d9-dfc7c92e2727@laposte.net> Date: Tue, 6 Mar 2018 20:59:37 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: fr X-VR-FullState: 0 X-VR-Score: 0 X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrgedtfedrjeelgddufeduucetufdoteggodetrfdotffvucfrrhho X-VR-Cause-2: fhhilhgvmecunfetrffquffvgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefvhffukfff X-VR-Cause-3: fgggtgfgsehtkeertddtfeejnecuhfhrohhmpefnuhgtucfjohhnuggrrhgvhihtvgcuoehhohhnuggr X-VR-Cause-4: rhgvhihtvgdrlhhutgeslhgrphhoshhtvgdrnhgvtheqnecukfhppeekkedrudeltddruddvrddukeek X-VR-Cause-5: necurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepjfhisghishgtuhhsrdhlohgtrghl X-VR-Cause-6: pdhinhgvthepkeekrdduledtrdduvddrudekkedpmhgrihhlfhhrohhmpehhohhnuggrrhgvhihtvgdr X-VR-Cause-7: lhhutgeslhgrphhoshhtvgdrnhgvthdprhgtphhtthhopehfrhgvvggsshguqdgrrhhmsehfrhgvvggs X-VR-Cause-8: shgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-VR-AvState: No X-VR-State: 0 X-VR-State: 0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 20:20:27 -0000 Hi, I've just build 12-current for Allwinner H3  (armv7) and it seems that cpufreq support is missing (orangepi or nanopi): root@allwinner-h3:~ # service powerd onestart Starting powerd. powerd: no cpufreq(4) support -- aborting: No such file or directory /etc/rc.d/powerd: WARNING: failed to start powerd So, on nanopi neo, it's slowdown (not on orange-pi that seems to run at full speed). I am using a custom kernel conf that just contains: include GENERIC nooptions       INVARIANTS nooptions       INVARIANT_SUPPORT nooptions       WITNESS nooptions       WITNESS_SKIPSPIN nooptions       BUF_TRACKING nooptions       DEADLKRES nooptions       FULL_BUF_TRACKING Here the output I get on orange-pi: U-Boot SPL 2016.03 (Jun 17 2016 - 18:48:42) DRAM: 1024 MiB Trying to boot from MMC U-Boot 2016.03 (Jun 17 2016 - 18:48:42 +0200) Allwinner Technology CPU:   Allwinner H3 (SUN8I) I2C:   ready DRAM:  1 GiB WARNING: Caches not enabled MMC:   SUNXI SD/MMC: 0 reading u-boot.env ** Unable to read "u-boot.env" from mmc0:1 ** Using default environment In:    serial Out:   serial Err:   serial Net:   No ethernet found. starting USB... USB0:   USB EHCI 1.00 USB1:   USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found scanning bus 1 for devices... 1 USB Device(s) found Hit any key to stop autoboot:  0 Booting from: mmc 0 ubldr.bin reading ubldr.bin 238600 bytes read in 57 ms (4 MiB/s) ## No elf image at address 0x42000000 ## Starting application at 0x42000000 ... Consoles: U-Boot console Compatible U-Boot API signature found @0x7bf4a610 FreeBSD/armv7 U-Boot loader, Revision 1.2 (Mon Mar  5 23:38:55 CET 2018 luc@unxbox) DRAM: 1024MB MMC Device 1 not found Number of U-Boot devices: 1 U-Boot env: loaderdev='mmc 0' Found U-Boot device: disk   Checking unit=0 slice= partition=... good. Booting from disk0s2a: Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0x8ad654+0x1869ac syms=[0x4+0x979b0+0x4+0xdbf6a] /boot/entropy size=0x1000 Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel] in 1 second... Type '?' for a list of commands, 'help' for more detailed help. loader> load -t dtb boot/dtb/sun8i-h3-orangepi-one.dtb boot/dtb/sun8i-h3-orangepi-one.dtb size=0x4ec5 loader> boot Booting... Using DTB from loaded file 'boot/dtb/sun8i-h3-orangepi-one.dtb'. Kernel entry at 0x42200100... Kernel args: (null) KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2018 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994     The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-CURRENT #0 34d79fcc910(master)-dirty: Tue Mar  6 02:11:39 CET 2018 luc@unxbox:/usr/home/luc/ARM/obj/usr/home/luc/ARM/src/arm.armv7/sys/CUSTOM arm FreeBSD clang version 6.0.0 (branches/release_60 325932) (based on LLVM 6.0.0) VT: init without driver. module_register: cannot register simplebus/ahci from kernel; already loaded from kernel Module simplebus/ahci failed to register: 17 module_register: cannot register simplebus/ehci from kernel; already loaded from kernel Module simplebus/ehci failed to register: 17 module_register: cannot register simplebus/pcib from kernel; already loaded from kernel Module simplebus/pcib failed to register: 17 module_register: cannot register simplebus/ehci from kernel; already loaded from kernel Module simplebus/ehci failed to register: 17 CPU: ARM Cortex-A7 r0p5 (ECO: 0x00000000) CPU Features:   Multiprocessing, Thumb2, Security, Virtualization, Generic Timer, VMSAv7,   PXN, LPAE, Coherent Walk Optional instructions:   SDIV/UDIV, UMULL, SMULL, SIMD(ext) LoUU:2 LoC:3 LoUIS:2 Cache level 1:  32KB/64B 4-way data cache WB Read-Alloc Write-Alloc  32KB/32B 2-way instruction cache Read-Alloc Cache level 2:  512KB/64B 8-way unified cache WB Read-Alloc Write-Alloc real memory  = 1073741824 (1024 MB) avail memory = 1036685312 (988 MB) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs random: unblocking device. random: entropy device external interface kbd0 at kbdmux0 ofwbus0: aw_ccu0: on ofwbus0 clk_fixed0: on aw_ccu0 clk_fixed1: on aw_ccu0 clk_fixed2: on aw_ccu0 simplebus0: on ofwbus0 aw_ccung0: mem 0x1c20000-0x1c203ff on simplebus0 aw_ccung1: mem 0x1f01400-0x1f014ff on simplebus0 regfix0: on ofwbus0 regfix1: on ofwbus0 regfix2: on ofwbus0 regfix3: on ofwbus0 awusbphy0: mem 0x1c19400-0x1c1942b,0x1c1a800-0x1c1a803,0x1c1b800-0x1c1b803,0x1c1c800-0x1c1c803,0x1c1d800-0x1c1d803 on simplebus0 gic0: mem 0x1c81000-0x1c81fff,0x1c82000-0x1c83fff,0x1c84000-0x1c85fff,0x1c86000-0x1c87fff irq 36 on simplebus0 gic0: pn 0x1, arch 0x2, rev 0x1, implementer 0x43b irqs 160 gpio0: mem 0x1c20800-0x1c20bff irq 17,18 on simplebus0 gpiobus0: on gpio0 gpio1: mem 0x1f02c00-0x1f02fff irq 40 on simplebus0 gpiobus1: on gpio1 rtc0: mem 0x1f00000-0x1f00053 irq 37,38 on simplebus0 rtc0: registered as a time-of-day clock, resolution 1.000000s generic_timer0: irq 0,1,2,3 on ofwbus0 Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000 Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000 aw_syscon0: mem 0x1c00000-0x1c00fff on simplebus0 a31dmac0: mem 0x1c02000-0x1c02fff irq 4 on simplebus0 aw_mmc0: mem 0x1c0f000-0x1c0ffff irq 5 on simplebus0 mmc0: on aw_mmc0 ehci0: mem 0x1c1a000-0x1c1a0ff irq 9 on simplebus0 usbus0: EHCI version 1.0 usbus0 on ehci0 ohci0: mem 0x1c1a400-0x1c1a4ff irq 10 on simplebus0 usbus1 on ohci0 ehci1: mem 0x1c1b000-0x1c1b0ff irq 11 on simplebus0 usbus2: EHCI version 1.0 usbus2 on ehci1 ohci1: mem 0x1c1b400-0x1c1b4ff irq 12 on simplebus0 usbus3 on ohci1 gpioc0: on gpio0 awg0: mem 0x1c30000-0x1c3ffff irq 21 on simplebus0 miibus0: on awg0 ukphy0: PHY 0 on miibus0 ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow ukphy1: PHY 1 on miibus0 ukphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow awg0: Ethernet address: f2:00:ee:63:b5:59 aw_wdog0: mem 0x1c20ca0-0x1c20cbf irq 24 on simplebus0 uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 29 on simplebus0 uart0: console (115384,n,8,1) gpioc1: on gpio1 cpulist0: on ofwbus0 cpu0: on cpulist0 cpu1: on cpulist0 cpu2: on cpulist0 cpu3: on cpulist0 gpioled0: on ofwbus0 cryptosoft0: Timecounters tick every 1.000 msec usbus0: 480Mbps High Speed USB v2.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 480Mbps High Speed USB v2.0 usbus3: 12Mbps Full Speed USB v1.0 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen3.1: at usbus3 uhub2: on usbus3 ugen2.1: at usbus2 uhub3: on usbus2 mmcsd0: 16GB at mmc0 50.0MHz/4bit/65535-block Release APs Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]... mmc0: ACMD42 failed, RESULT: 4 mmc0: Card at relative address 43690 failed to set bus width uhub1: 1 port with 1 removable, self powered uhub2: 1 port with 1 removable, self powered uhub0: 1 port with 1 removable, self powered uhub3: 1 port with 1 removable, self powered Setting hostuuid: ae41a69a-f668-11de-b3da-93fd68e687d1. Setting hostid: 0x3905964e. No suitable dump device was found. Starting file system checks: /dev/mmcsd0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/mmcsd0s2a: clean, 3583737 free (57 frags, 447960 blocks, 0.0% fragmentation) Mounting local filesystems:. ELF ldconfig path: /lib /usr/lib /usr/lib/compat Soft Float compatibility ldconfig path: Setting hostname: allwinner-h3. Setting up harvesting: [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED Feeding entropy: . Starting devd. awg0: link state changed to DOWN add host 127.0.0.1: gateway lo0 add host ::1: gateway lo0 add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Waiting 30s for the default route interface: .....(no carrier) Creating and/or trimming log files. Starting syslogd. Clearing /tmp (X related). Updating motd:. Mounting late filesystems:. Starting ntpd. Performing sanity check on sshd configuration. Jan  1 11:34:21 allwinner-h3 ntpd[419]: unable to bind to wildcard address :: - another process may be running - EXITING Starting sshd. Jan  1 11:34:22 allwinner-h3 sshd[449]: error: Bind to port 22 on :: failed: Can't assign requested address. Jan  1 11:34:22 allwinner-h3 sshd[449]: error: Bind to port 22 on 0.0.0.0 failed: Can't assign requested address. Jan  1 11:34:22 allwinner-h3 sshd[449]: fatal: Cannot bind any address. Starting sendmail_msp_queue. Starting cron. devmatch: Can't read linker hints file. Starting background file system checks in 60 seconds. Fri Jan  1 11:34 FreeBSD/arm (allwinner-h3) (ttyu0) login: Thanks