From owner-freebsd-mips@FreeBSD.ORG Sun Jan 11 16:31:37 2015 Return-Path: Delivered-To: freebsd-mips@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 5087018C for ; Sun, 11 Jan 2015 16:31:37 +0000 (UTC) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F05493EF for ; Sun, 11 Jan 2015 16:31:36 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id t0BG3xru047954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 11 Jan 2015 17:04:14 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id t0BG3uOm025486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Jan 2015 17:03:56 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id t0BG3uYQ060570; Sun, 11 Jan 2015 17:03:56 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id t0BG3ulg060569; Sun, 11 Jan 2015 17:03:56 +0100 (CET) (envelope-from ticso) Date: Sun, 11 Jan 2015 17:03:56 +0100 From: Bernd Walter To: "freebsd-mips@freebsd.org" Subject: Booting on AR9331 based Easylink EL-M150 Message-ID: <20150111160356.GG46805@cicely7.cicely.de> Reply-To: ticso@cicely.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, DNS_FROM_AHBL_RHSBL=2.699, T_RP_MATCHES_RCVD=-0.01 autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: Bernd Walter X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 16:31:37 -0000 This is a devboard using an EL-M150 module. The module has 64M RAM, but unlike the carambola 2 only 8M SPI flash. otherwise it is very similar. However, I get into problems starting the kernel. I use a kernel build for the carambola 2, which I'd also used on a Dragino system, so basicly it is a functional image. the Dragino used a earlier address in SPI flash, so I had to modify and saveenv: setenv bootcmd bootm 0x9F050000 saveenv On the EL-M150 also a different adress is used and a different kernel start address. Unfortunately it doesn't have a saveenv, so unless I can freely change the addresses I will have to rebuild a kernel. In the meantime I'd tried with manual set addresses, but failed decrompessing the image. Somehow before the string "FreeBSD" there is some garbadge, which even gets printed when I try booting from erased flash. U-Boot 1.1.4 (Nov 26 2014 - 16:34:31) ******************************************** * U-boot for Easylink El-m150 * * Build by huangfc(QQ:343669866) * * Taobao:http://huangfc.taobao.com * ******************************************** DRAM: 64 MB id read ox100000ff FLASH: 8M In: serial Out: serial Err: serial Net: ag7240_enet_initialize... Interface eth0 MAC address: 00:23:CD:04:1F:32 s26 reg init ag7240_phy_setup athrs26_phy_setup ATHR_AUTONEG_ADVERT 4 :6f0 athrs26_phy_setup ATHR_PHY_CONTROL 4 :4800 Interface eth0 is up Interface eth1 MAC address: 00:23:CD:04:1F:32 athrs26_reg_init_lan ag7240_phy_setup athrs26_phy_setup ATHR_AUTONEG_ADVERT 0 :de1 athrs26_phy_setup ATHR_PHY_CONTROL 0 :1000 athrs26_phy_setup ATHR_AUTONEG_ADVERT 1 :de1 athrs26_phy_setup ATHR_PHY_CONTROL 1 :1000 athrs26_phy_setup ATHR_AUTONEG_ADVERT 2 :de1 athrs26_phy_setup ATHR_PHY_CONTROL 2 :1000 athrs26_phy_setup ATHR_AUTONEG_ADVERT 3 :de1 athrs26_phy_setup ATHR_PHY_CONTROL 3 :1000 Interface eth1 is up Hit any key to stop autobooting: 0 Easy-Link> printenv bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(ART) bootcmd=bootm 0x9F020000 bootdelay=2 baudrate=115200 ipaddr=192.168.1.1 serverip=192.168.1.100 bootfile="firmware.bin" loadaddr=0x80800000 ncport=6666 stdin=serial stdout=serial stderr=serial ethact=eth0 Environment size: 364 bytes Easy-Link> tftpboot 0x80800000 kernel.CARAMBOLA2.lzma.uImage Link down: eth0 Ethernet mode (duplex/speed): 1/1000 Mbps TFTP from IP: 10.1.1.9 Our IP: 10.1.1.107 Filename: 'kernel.CARAMBOLA2.lzma.uImage' Load address: 0x80800000 Using: eth1 Loading: ######################################## ######################################## ######################################## ######################################## ######################################## ######################################## ######################################## #################### TFTP transfer complete! Bytes transferred: 1534515 (0x176a33) Easy-Link> boot Booting image at: 0x80800000 Image name: y/6T? FreeBSD Image type: MIPS Linux Kernel Image (lzma compressed) Data size: -1828074981 Bytes = 2352.6 MB Load address: 0x08C0C8DF Entry point: 0x4BBDBC84 Uncompressing kernel image... ## Error: LZMA error num: 1 This example is just loading the kernel, also in a different load address than it is done for the carambola and dragino. But the problem stays the same if I would use 0x80050000. Of course I have no idea if 0x80050000 is unused, therefor I also tried 0x80800000. The kernel wasn't rebuild and I don't know if the kernel needs to know about such an address change, but it seems I already have problems with the image format itself. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-mips@FreeBSD.ORG Sun Jan 11 18:16:51 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88430BD7 for ; Sun, 11 Jan 2015 18:16:51 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (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 1C129E79 for ; Sun, 11 Jan 2015 18:16:51 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id bs8so10622134wib.4 for ; Sun, 11 Jan 2015 10:16:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=j+gV6iXMjXRGHCgAGRcFZ0batWv5NRTam/fP/QISF98=; b=b07MocCAVCQ+eo4VsNQehRcPTLBhL3ln9hLsUJ2BjI/uJNdcZfp207YhXUW9UBwHoR gBi5zunRuNUxvZKkzd7S0h8hLRxGJFzt+Gy4sFWIwoI1GSffTbblJaNi1DVgrNpV/Pl1 qjTNHh8EzmB6zoIEwQ/c/ukECBYcnbDxuBtvH/VH+fjRKHr6XYpLqPLSjVUlGPW5ghWk Xm8XEe0Nsyi4Y/PGJepAVLwnwO4Lv3wkfKQYqdYiIUvVSxCihJvjhrX0GYH/Wspc/pSr F1lR4i478I74pkZARnYmeX+SrrspQd3WSX19WKGp4hgv2bc/kIQ5grGHi7cZdy0FQ+x/ 3gNw== MIME-Version: 1.0 X-Received: by 10.180.7.198 with SMTP id l6mr23651315wia.26.1421000209481; Sun, 11 Jan 2015 10:16:49 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Sun, 11 Jan 2015 10:16:49 -0800 (PST) In-Reply-To: <20150111160356.GG46805@cicely7.cicely.de> References: <20150111160356.GG46805@cicely7.cicely.de> Date: Sun, 11 Jan 2015 10:16:49 -0800 X-Google-Sender-Auth: jtJYFvP2gxZAwbamqZO9zpSseDw Message-ID: Subject: Re: Booting on AR9331 based Easylink EL-M150 From: Adrian Chadd To: ticso@cicely.de Content-Type: text/plain; charset=UTF-8 Cc: Bernd Walter , "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 18:16:51 -0000 Hi, I've had this issue reported by someone else - a tplink AR934x based thing. I wonder if it's an updated uboot related thing. So the TL;DR is this. uboot "bootm" doesn't boot a kernel image - it boots a uboot application. The application has a uboot header with details about "where it should be unpacked", "where it should be executed", etc. The tool that we're using is in ports but from an older uboot. It's possible the header contents are now .. wrong. So, the flash address used by the "bootm" comand is 0x9f(blah), and it'll unpack to wherever it says in the uboot header, and then execute wherever it says. Everything above is wrong - Load, entry, size, etc - and so that needs to be debugged. I have a tplink in a box that has the same issue, so I'll go see what the story is. -adrian On 11 January 2015 at 08:03, Bernd Walter wrote: > This is a devboard using an EL-M150 module. > The module has 64M RAM, but unlike the carambola 2 only 8M SPI flash. > otherwise it is very similar. > However, I get into problems starting the kernel. > I use a kernel build for the carambola 2, which I'd also used on a > Dragino system, so basicly it is a functional image. > the Dragino used a earlier address in SPI flash, so I had to modify > and saveenv: > setenv bootcmd bootm 0x9F050000 > saveenv > On the EL-M150 also a different adress is used and a different kernel > start address. > Unfortunately it doesn't have a saveenv, so unless I can freely > change the addresses I will have to rebuild a kernel. > In the meantime I'd tried with manual set addresses, but failed > decrompessing the image. > Somehow before the string "FreeBSD" there is some garbadge, which > even gets printed when I try booting from erased flash. > > U-Boot 1.1.4 (Nov 26 2014 - 16:34:31) > > ******************************************** > * U-boot for Easylink El-m150 * > * Build by huangfc(QQ:343669866) * > * Taobao:http://huangfc.taobao.com * > ******************************************** > DRAM: 64 MB > id read ox100000ff > FLASH: 8M > > In: serial > Out: serial > Err: serial > Net: ag7240_enet_initialize... > > Interface eth0 MAC address: 00:23:CD:04:1F:32 > s26 reg init > ag7240_phy_setup > athrs26_phy_setup ATHR_AUTONEG_ADVERT 4 :6f0 > athrs26_phy_setup ATHR_PHY_CONTROL 4 :4800 > Interface eth0 is up > > Interface eth1 MAC address: 00:23:CD:04:1F:32 > athrs26_reg_init_lan > ag7240_phy_setup > athrs26_phy_setup ATHR_AUTONEG_ADVERT 0 :de1 > athrs26_phy_setup ATHR_PHY_CONTROL 0 :1000 > athrs26_phy_setup ATHR_AUTONEG_ADVERT 1 :de1 > athrs26_phy_setup ATHR_PHY_CONTROL 1 :1000 > athrs26_phy_setup ATHR_AUTONEG_ADVERT 2 :de1 > athrs26_phy_setup ATHR_PHY_CONTROL 2 :1000 > athrs26_phy_setup ATHR_AUTONEG_ADVERT 3 :de1 > athrs26_phy_setup ATHR_PHY_CONTROL 3 :1000 > Interface eth1 is up > Hit any key to stop autobooting: 0 > > Easy-Link> printenv > bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(ART) > bootcmd=bootm 0x9F020000 > bootdelay=2 > baudrate=115200 > ipaddr=192.168.1.1 > serverip=192.168.1.100 > bootfile="firmware.bin" > loadaddr=0x80800000 > ncport=6666 > stdin=serial > stdout=serial > stderr=serial > ethact=eth0 > > Environment size: 364 bytes > > Easy-Link> tftpboot 0x80800000 kernel.CARAMBOLA2.lzma.uImage > Link down: eth0 > Ethernet mode (duplex/speed): 1/1000 Mbps > > TFTP from IP: 10.1.1.9 > Our IP: 10.1.1.107 > Filename: 'kernel.CARAMBOLA2.lzma.uImage' > Load address: 0x80800000 > Using: eth1 > > Loading: ######################################## > ######################################## > ######################################## > ######################################## > ######################################## > ######################################## > ######################################## > #################### > > TFTP transfer complete! > > Bytes transferred: 1534515 (0x176a33) > Easy-Link> boot > Booting image at: 0x80800000 > > Image name: y/6T? FreeBSD > Image type: MIPS Linux Kernel Image (lzma compressed) > Data size: -1828074981 Bytes = 2352.6 MB > Load address: 0x08C0C8DF > Entry point: 0x4BBDBC84 > > Uncompressing kernel image... ## Error: LZMA error num: 1 > > This example is just loading the kernel, also in a different load > address than it is done for the carambola and dragino. > But the problem stays the same if I would use 0x80050000. > Of course I have no idea if 0x80050000 is unused, therefor I also > tried 0x80800000. > The kernel wasn't rebuild and I don't know if the kernel needs > to know about such an address change, but it seems I already have > problems with the image format itself. > > -- > B.Walter http://www.bwct.de > Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@FreeBSD.ORG Sun Jan 11 20:18:13 2015 Return-Path: Delivered-To: freebsd-mips@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 B3FE4363; Sun, 11 Jan 2015 20:18:13 +0000 (UTC) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 420F1C29; Sun, 11 Jan 2015 20:18:12 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id t0BKHsvG052827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 11 Jan 2015 21:17:55 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id t0BKHnfe027387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Jan 2015 21:17:49 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id t0BKHnCi061614; Sun, 11 Jan 2015 21:17:49 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id t0BKHn8M061613; Sun, 11 Jan 2015 21:17:49 +0100 (CET) (envelope-from ticso) Date: Sun, 11 Jan 2015 21:17:48 +0100 From: Bernd Walter To: Adrian Chadd Subject: Re: Booting on AR9331 based Easylink EL-M150 Message-ID: <20150111201748.GI46805@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20150111160356.GG46805@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, DNS_FROM_AHBL_RHSBL=2.699, T_RP_MATCHES_RCVD=-0.01 autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: Bernd Walter , ticso@cicely.de, "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:18:13 -0000 On Sun, Jan 11, 2015 at 10:16:49AM -0800, Adrian Chadd wrote: > Hi, > > I've had this issue reported by someone else - a tplink AR934x based > thing. I wonder if it's an updated uboot related thing. > > So the TL;DR is this. > > uboot "bootm" doesn't boot a kernel image - it boots a uboot > application. The application has a uboot header with details about > "where it should be unpacked", "where it should be executed", etc. The > tool that we're using is in ports but from an older uboot. It's > possible the header contents are now .. wrong. > > So, the flash address used by the "bootm" comand is 0x9f(blah), and > it'll unpack to wherever it says in the uboot header, and then execute > wherever it says. Everything above is wrong - Load, entry, size, etc - > and so that needs to be debugged. > > I have a tplink in a box that has the same issue, so I'll go see what > the story is. Great. My EL-M150 module has the same hynx memory chip as the carambola 2 I compared against, just the flash size ist different (winbond 25Q128 vs 25Q64). Don't know if the SPI flash is hardcoded somehow, otherwise the carambola 2 u-boot should work IMHO. Is there anything important in the flash, like calibration data, which can be trashed by tampering with it? Or failed parsing by a different u-boot version? Guess I should dump the SPI data to tftp server anyway. Never programmed a 25Q myself, but can't be too hard in case I brick it. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-mips@FreeBSD.ORG Sun Jan 11 20:24:41 2015 Return-Path: Delivered-To: freebsd-mips@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 2D4E65D3 for ; Sun, 11 Jan 2015 20:24:41 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (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 B324DCE4 for ; Sun, 11 Jan 2015 20:24:40 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id n3so10940941wiv.5 for ; Sun, 11 Jan 2015 12:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=0RItoulv/ZSTNj9V7tdvx1dXPw/bIOFQ9zF5ggorkJU=; b=yZS3efzdyfeBBghjltu7/aPid6PjWkMG1fE6tUeFHhvA5wm+mjYznsvzMZbCaeXghi 7PdA/mS5EgBUnNGMOExMr/buPhpfeX8mdR7M6DC1LaT7cqeiJ6lK6iY3ZuUOoxwm5vrH QKtjsQvGrWKLJSFAcYJagfuPdqzWjUtGsXKwC7/OR3rjxU0JQeeshMQXCzk/8xJER9rK Qr8oxRw6C2UBKpq5PzKBxOG/bIvdSua+Hs8uwJ2Sr2XXQs9ClMju44zc+qlGqZoeSpdi 4RvfwZxjveCrVwCGiMBRsW9q5zcx7bHyN39XyXXHHJv/CPudErKEWtK2Pd554W2dV2SM r2Dw== MIME-Version: 1.0 X-Received: by 10.194.5.37 with SMTP id p5mr24965997wjp.20.1421007878819; Sun, 11 Jan 2015 12:24:38 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Sun, 11 Jan 2015 12:24:38 -0800 (PST) In-Reply-To: <20150111201748.GI46805@cicely7.cicely.de> References: <20150111160356.GG46805@cicely7.cicely.de> <20150111201748.GI46805@cicely7.cicely.de> Date: Sun, 11 Jan 2015 12:24:38 -0800 X-Google-Sender-Auth: K_zrJochigWn-Tacc9IVZfrjh-I Message-ID: Subject: Re: Booting on AR9331 based Easylink EL-M150 From: Adrian Chadd To: ticso@cicely.de Content-Type: text/plain; charset=UTF-8 Cc: Bernd Walter , "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:24:41 -0000 Yeah, there's calibration data in the flash chip. You should be very careful. :) -a On 11 January 2015 at 12:17, Bernd Walter wrote: > On Sun, Jan 11, 2015 at 10:16:49AM -0800, Adrian Chadd wrote: >> Hi, >> >> I've had this issue reported by someone else - a tplink AR934x based >> thing. I wonder if it's an updated uboot related thing. >> >> So the TL;DR is this. >> >> uboot "bootm" doesn't boot a kernel image - it boots a uboot >> application. The application has a uboot header with details about >> "where it should be unpacked", "where it should be executed", etc. The >> tool that we're using is in ports but from an older uboot. It's >> possible the header contents are now .. wrong. >> >> So, the flash address used by the "bootm" comand is 0x9f(blah), and >> it'll unpack to wherever it says in the uboot header, and then execute >> wherever it says. Everything above is wrong - Load, entry, size, etc - >> and so that needs to be debugged. >> >> I have a tplink in a box that has the same issue, so I'll go see what >> the story is. > > Great. > > My EL-M150 module has the same hynx memory chip as the carambola 2 I compared > against, just the flash size ist different (winbond 25Q128 vs 25Q64). > Don't know if the SPI flash is hardcoded somehow, otherwise the carambola 2 > u-boot should work IMHO. > > Is there anything important in the flash, like calibration data, which > can be trashed by tampering with it? > Or failed parsing by a different u-boot version? > Guess I should dump the SPI data to tftp server anyway. > Never programmed a 25Q myself, but can't be too hard in case I brick it. > > -- > B.Walter http://www.bwct.de > Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-mips@FreeBSD.ORG Sun Jan 11 20:25:02 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69A1B5FB for ; Sun, 11 Jan 2015 20:25:02 +0000 (UTC) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (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 EFAE4CE9 for ; Sun, 11 Jan 2015 20:25:01 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id x13so16159294wgg.5 for ; Sun, 11 Jan 2015 12:25:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=pJ9jHYIqROVzhI9IqUtas/mIl7rBrWKX51CEFwrT2JQ=; b=xTpJOAvqyW6rVApMfKOenSm86C01w2Fk1jE1gTwwdhGlMlxGvoNK+eBB1Vl1PtJWPW tirKofqXv/vZboeicuuy8J/U8gerq2W8C17tOsRsSLChHvKjSmlQwcL/Bfgp7XYtRcCJ mtaAS6ZRaQPqQu9YqmAyrvIg/5tQ2pEpwcyj2ElsLILzp4t3EwE/ape3gCB0eiD9uuz8 yxCq49cZSEElXqKPGiuKuqxfbGXi2e76Q2CbPuu9fjrMvauxK/AhaC8K1qjLYwMQaXxB B17C7m90MBQuRQgEcUHGIzfj+jSbYNqN84Spd9qwcVookrkCwSY1/w2zptmYM1xGfuEy cqiA== MIME-Version: 1.0 X-Received: by 10.180.91.193 with SMTP id cg1mr24349324wib.26.1421007900311; Sun, 11 Jan 2015 12:25:00 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Sun, 11 Jan 2015 12:25:00 -0800 (PST) In-Reply-To: References: <20150111160356.GG46805@cicely7.cicely.de> <20150111201748.GI46805@cicely7.cicely.de> Date: Sun, 11 Jan 2015 12:25:00 -0800 X-Google-Sender-Auth: dt_oNnUm74k8MMXUWZn3UfzldXk Message-ID: Subject: Re: Booting on AR9331 based Easylink EL-M150 From: Adrian Chadd To: ticso@cicely.de Content-Type: text/plain; charset=UTF-8 Cc: Bernd Walter , "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:25:02 -0000 ... .and don't replace the uboot. There may be board variations that are hard-coded in the uboot. Tsk. :) -a On 11 January 2015 at 12:24, Adrian Chadd wrote: > Yeah, there's calibration data in the flash chip. You should be very careful. :) > > > > -a > > > On 11 January 2015 at 12:17, Bernd Walter wrote: >> On Sun, Jan 11, 2015 at 10:16:49AM -0800, Adrian Chadd wrote: >>> Hi, >>> >>> I've had this issue reported by someone else - a tplink AR934x based >>> thing. I wonder if it's an updated uboot related thing. >>> >>> So the TL;DR is this. >>> >>> uboot "bootm" doesn't boot a kernel image - it boots a uboot >>> application. The application has a uboot header with details about >>> "where it should be unpacked", "where it should be executed", etc. The >>> tool that we're using is in ports but from an older uboot. It's >>> possible the header contents are now .. wrong. >>> >>> So, the flash address used by the "bootm" comand is 0x9f(blah), and >>> it'll unpack to wherever it says in the uboot header, and then execute >>> wherever it says. Everything above is wrong - Load, entry, size, etc - >>> and so that needs to be debugged. >>> >>> I have a tplink in a box that has the same issue, so I'll go see what >>> the story is. >> >> Great. >> >> My EL-M150 module has the same hynx memory chip as the carambola 2 I compared >> against, just the flash size ist different (winbond 25Q128 vs 25Q64). >> Don't know if the SPI flash is hardcoded somehow, otherwise the carambola 2 >> u-boot should work IMHO. >> >> Is there anything important in the flash, like calibration data, which >> can be trashed by tampering with it? >> Or failed parsing by a different u-boot version? >> Guess I should dump the SPI data to tftp server anyway. >> Never programmed a 25Q myself, but can't be too hard in case I brick it. >> >> -- >> B.Walter http://www.bwct.de >> Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-mips@FreeBSD.ORG Tue Jan 13 19:06:35 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7DF5141 for ; Tue, 13 Jan 2015 19:06:35 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1.freebsd.org (Postfix) with ESMTP id D2CCCC75 for ; Tue, 13 Jan 2015 19:06:35 +0000 (UTC) Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id A60F710682C3 for ; Tue, 13 Jan 2015 11:06:36 -0800 (PST) Date: Tue, 13 Jan 2015 12:06:34 -0700 (MST) From: sson To: freebsd-mips@freebsd.org Message-ID: <1421175994697-5980362.post@n5.nabble.com> Subject: [RFC] Cache control from user land (patch) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 19:06:36 -0000 Hi all: Below is a link to a patch that provides a sysarch() so that cache lines may be invalidated from userspace (via the sysarch() system call). For convenience mips_cacheflush() is provided in the machine/cachectl.h header file: int mips_cacheflush(void *addr, size_t nbytes, int whichcache); mips_cacheflush() flushes the content of the selected cache for the user addresses in the range from addr to (addr+nbytes-1). whichcache may be: MIPS_CF_ICACHE: Flush the instruction cache lines for a given user address range. MIPS_CF_DCACHE: Write back to memory and invalidate the cache lines for a given user address range. MIPS_CF_BCACHE: Write back and invalidate both types of caches for a given user address range. MIPS_CF_ICACHE_ALL, MIPS_CF_DCACHE, or MIPS_CF_BCACHE: Full the entire given cache(s). mips_cacheflush() may return the errno EFAULT or EINVAL (whichcache is not valid). In short, it is similar to the cacheflush() that netbsd provides for mips. The diff: https://people.freebsd.org/~sson/mips/cacheflush/mips_cacheflush.diff Comments, concerns, questions, suggestions, etc. are welcome. Regards, -stacey. -- View this message in context: http://freebsd.1045724.n5.nabble.com/RFC-Cache-control-from-user-land-patch-tp5980362.html Sent from the freebsd-mips mailing list archive at Nabble.com. From owner-freebsd-mips@FreeBSD.ORG Tue Jan 13 19:22:23 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40B486CE; Tue, 13 Jan 2015 19:22:23 +0000 (UTC) Received: from tazenat.gentiane.org (odyssee.gentiane.org [80.65.224.82]) (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 2FF03E91; Tue, 13 Jan 2015 19:22:21 +0000 (UTC) Received: from localhost (500@localhost [local]); by localhost (OpenSMTPD) with ESMTPA id f1b3dc41; Tue, 13 Jan 2015 19:15:37 +0000 (GMT) Date: Tue, 13 Jan 2015 19:15:36 +0000 From: Miod Vallat To: sson Subject: Re: [RFC] Cache control from user land (patch) Message-ID: <20150113191536.GA29344@tazenat.gentiane.org> References: <1421175994697-5980362.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1421175994697-5980362.post@n5.nabble.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 19:22:23 -0000 > Hi all: > > Below is a link to a patch that provides a sysarch() so that cache lines may > be invalidated from userspace (via the sysarch() system call). For > convenience mips_cacheflush() is provided in the machine/cachectl.h header > file: > > int mips_cacheflush(void *addr, size_t nbytes, int whichcache); Why not provide an IRIX-compatible cacheflush() and _flush_cache() aliases? Many 3rd-party software expects them if defined(__mips__). Miod From owner-freebsd-mips@FreeBSD.ORG Tue Jan 13 19:52:03 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44018F11 for ; Tue, 13 Jan 2015 19:52:03 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (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 22F0D235 for ; Tue, 13 Jan 2015 19:52:02 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 61294192A3B for ; Tue, 13 Jan 2015 19:52:01 +0000 (UTC) Message-ID: <54B57760.3090508@ignoranthack.me> Date: Tue, 13 Jan 2015 11:52:00 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-mips@freebsd.org Subject: Re: [RFC] Cache control from user land (patch) References: <1421175994697-5980362.post@n5.nabble.com> In-Reply-To: <1421175994697-5980362.post@n5.nabble.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 19:52:03 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/13/15 11:06, sson wrote: > Hi all: > > Below is a link to a patch that provides a sysarch() so that cache > lines may be invalidated from userspace (via the sysarch() system > call). For convenience mips_cacheflush() is provided in the > machine/cachectl.h header file: > > int mips_cacheflush(void *addr, size_t nbytes, int whichcache); > > mips_cacheflush() flushes the content of the selected cache for the > user addresses in the range from addr to (addr+nbytes-1). > whichcache may be: > > MIPS_CF_ICACHE: Flush the instruction cache lines for a given > user address range. MIPS_CF_DCACHE: Write back to memory and > invalidate the cache lines for a given user address range. > MIPS_CF_BCACHE: Write back and invalidate both types of caches for > a given user address range. MIPS_CF_ICACHE_ALL, MIPS_CF_DCACHE, or > MIPS_CF_BCACHE: Full the entire given cache(s). > > mips_cacheflush() may return the errno EFAULT or EINVAL (whichcache > is not valid). In short, it is similar to the cacheflush() that > netbsd provides for mips. > > The diff: > https://people.freebsd.org/~sson/mips/cacheflush/mips_cacheflush.diff > > Comments, concerns, questions, suggestions, etc. are welcome. > > Regards, > > -stacey. > > > > I've tried applying this to head. I get a reject from the last bits to sys/mips/mips/sys_machdep.c % cat sys/mips/mips/sys_machdep.c.rej.orig @@ -39,6 +39,8 @@ #include #include +#include +#include #include #include #include @@ -63,9 +115,6 @@ * update it as well. Add the TLS and TCB offsets so the * value in this register is adjusted like in the case of the * rdhwr trap() instruction handler. - - * - - * XXXSS For more information why this offset is required see: - - * 'git show c6be4f4d2d1b71c04de5d3bbb6933ce2dbcdb317' */ if (cpuinfo.userlocal_reg == true) { #if defined(__mips_n64) && defined(COMPAT_FREEBSD32) @@ -94,6 +143,8 @@ case CHERI_SET_STACK: return (cheri_sysarch_setstack(td, uap)); #endif + case MIPS_CACHEFLUSH: + return (mips_sysarch_cacheflush(td, uap)); default: break; -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUtXddXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kzVEH/jpRQeaRNybEv5C7PFiHU0pd NgT6ebfEddNd61P9HqxC3NVQ4US8h5uFRewQWJ/hiXXUsfj3iGvNS2QgaX1SgU16 lXgTEu6IrgfIImtn87cMjXUblGySF1yhh/vMdBkdF4WWqgcUcaWrbr8vibGj6DD9 k4dRKDTci2c6eHNWQbA6pwyqdtDoQit4jMwT+ayjxckkGCx37DLZy7VrzhzmE5YB EO+QcUqjGRNHxmhtkil5eNBlrXeJT+FetlY/l4/4G2OATTYGbsdK78s91dhSlwZ2 umma95WWs+wfi23wZf4xm96DpV7dhh8PvaNJhw4MKldyll4lDIWwuYI+LaqjSPo= =b/5h -----END PGP SIGNATURE----- From owner-freebsd-mips@FreeBSD.ORG Wed Jan 14 05:55:44 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46CA6E3D for ; Wed, 14 Jan 2015 05:55:44 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1.freebsd.org (Postfix) with ESMTP id 315B9AAA for ; Wed, 14 Jan 2015 05:55:44 +0000 (UTC) Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id E02C410766A1 for ; Tue, 13 Jan 2015 21:55:43 -0800 (PST) Date: Tue, 13 Jan 2015 22:55:43 -0700 (MST) From: sson To: freebsd-mips@freebsd.org Message-ID: <1421214943629-5980520.post@n5.nabble.com> In-Reply-To: <54B57760.3090508@ignoranthack.me> References: <1421175994697-5980362.post@n5.nabble.com> <54B57760.3090508@ignoranthack.me> Subject: Re: [RFC] Cache control from user land (patch) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:55:44 -0000 Sean Bruno-6 wrote > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 01/13/15 11:06, sson wrote: >> Hi all: >> >> Below is a link to a patch that provides a sysarch() so that cache >> lines may be invalidated from userspace (via the sysarch() system >> call). For convenience mips_cacheflush() is provided in the >> machine/cachectl.h header file: >> >> int mips_cacheflush(void *addr, size_t nbytes, int whichcache); >> >> mips_cacheflush() flushes the content of the selected cache for the >> user addresses in the range from addr to (addr+nbytes-1). >> whichcache may be: >> >> MIPS_CF_ICACHE: Flush the instruction cache lines for a given >> user address range. MIPS_CF_DCACHE: Write back to memory and >> invalidate the cache lines for a given user address range. >> MIPS_CF_BCACHE: Write back and invalidate both types of caches for >> a given user address range. MIPS_CF_ICACHE_ALL, MIPS_CF_DCACHE, or >> MIPS_CF_BCACHE: Full the entire given cache(s). >> >> mips_cacheflush() may return the errno EFAULT or EINVAL (whichcache >> is not valid). In short, it is similar to the cacheflush() that >> netbsd provides for mips. >> >> The diff: >> https://people.freebsd.org/~sson/mips/cacheflush/mips_cacheflush.diff >> >> Comments, concerns, questions, suggestions, etc. are welcome. >> >> Regards, >> >> -stacey. >> >> >> >> > I've tried applying this to head. > > I get a reject from the last bits to sys/mips/mips/sys_machdep.c I should have mentioned the diff is against cheribsd which will get upstreamed to freebsd at some point. FreeBSD head is missing the UserLevel Register support change, for example: https://people.freebsd.org/~sson/mips/ulri/ulri_kernel.diff -stacey. -- View this message in context: http://freebsd.1045724.n5.nabble.com/RFC-Cache-control-from-user-land-patch-tp5980362p5980520.html Sent from the freebsd-mips mailing list archive at Nabble.com. From owner-freebsd-mips@FreeBSD.ORG Wed Jan 14 05:57:08 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE6C0F73 for ; Wed, 14 Jan 2015 05:57:08 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1.freebsd.org (Postfix) with ESMTP id C864DAB8 for ; Wed, 14 Jan 2015 05:57:08 +0000 (UTC) Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 520D91076562 for ; Tue, 13 Jan 2015 21:48:17 -0800 (PST) Date: Tue, 13 Jan 2015 22:48:17 -0700 (MST) From: sson To: freebsd-mips@freebsd.org Message-ID: <1421214497093-5980519.post@n5.nabble.com> In-Reply-To: <20150113191536.GA29344@tazenat.gentiane.org> References: <1421175994697-5980362.post@n5.nabble.com> <20150113191536.GA29344@tazenat.gentiane.org> Subject: Re: [RFC] Cache control from user land (patch) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:57:09 -0000 miod wrote >> Hi all: >> >> Below is a link to a patch that provides a sysarch() so that cache lines >> may >> be invalidated from userspace (via the sysarch() system call). For >> convenience mips_cacheflush() is provided in the machine/cachectl.h >> header >> file: >> >> int mips_cacheflush(void *addr, size_t nbytes, int whichcache); > > Why not provide an IRIX-compatible cacheflush() and _flush_cache() > aliases? Many 3rd-party software expects them if defined(__mips__). > > Miod Good idea. I have updated the diff: https://people.freebsd.org/~sson/mips/cacheflush/mips_cacheflush.diff i.e., added the following to cachectl.h: +/* IRIX API compatible aliases. */ +#define ICACHE MIPS_CF_ICACHE +#define DCACHE MIPS_CF_DCACHE +#define BCACHE MIPS_CF_BCACHE + +static inline int +cacheflush(void *addr, int nbytes, int whichcache) +{ + + return (mips_cacheflush(addr, (size_t)nbytes, whichcache)); +} + +static inline int +_flush_cache(char *addr, int nbytes, int whichcache) +{ + + return (mips_cacheflush((void *)addr, (size_t)nbytes, whichcache)); +} -stacey. -- View this message in context: http://freebsd.1045724.n5.nabble.com/RFC-Cache-control-from-user-land-patch-tp5980362p5980519.html Sent from the freebsd-mips mailing list archive at Nabble.com. From owner-freebsd-mips@FreeBSD.ORG Wed Jan 14 06:50:55 2015 Return-Path: Delivered-To: freebsd-mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2352D737 for ; Wed, 14 Jan 2015 06:50:55 +0000 (UTC) Received: from fallback7.mail.ru (fallback7.mail.ru [94.100.181.128]) by mx1.freebsd.org (Postfix) with ESMTP id 87037FA0 for ; Wed, 14 Jan 2015 06:50:54 +0000 (UTC) Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) by fallback7.mail.ru (mPOP.Fallback_MX) with ESMTP id E03B112845322 for ; Wed, 14 Jan 2015 09:50:50 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=list.ru; s=mail; h=Date:Message-Id:Content-Type:MIME-Version:Subject:To:From; bh=wH2nAXTjAAj5ndvF6lC/kuMEVXhv7pe1F3hQJSGMW7U=; b=Mkfq5uBW/mRtlBRrac2Ll9lQA1y9a6In+sEMwhPhKCF3iEdjjtht3Ltzv1f0wiqTSaEV5QBehp3rjie/DeZfs+SlSO0UzDeJLYfEuuD8r8aOlLqzIyg2JdlQD/8BTBCHTU5dC5EKq16hUoA/6xDY1VhkTGvnQJhR9Y4G2mja44s=; Received: from [96.47.226.22] (port=36148 helo=localhost) by smtp53.i.mail.ru with esmtpa (envelope-from ) id 1YBHmk-0008LK-Vg for freebsd-mips@FreeBSD.org; Wed, 14 Jan 2015 09:50:42 +0300 From: sig6247 To: freebsd-mips@FreeBSD.org Subject: clang failed to compile lib/csu on Ubiquiti EdgeRouter Lite MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-Id: Date: Wed, 14 Jan 2015 09:50:36 +0300 X-Spam: Not detected X-Mras: Ok X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 06:50:55 -0000 11.0-CURRENT r277126 ===> lib/csu/mips (obj,depend,all,install) rm -f .depend CC='cc ' mkdep -f .depend -a -I/usr/src/lib/csu/mips/../common -I/usr/src/lib/csu/mips/../../libc/include -std=gnu99 /usr/src/lib/csu/mips/crt1.c /usr/src/lib/csu/mips/crti.S /usr/src/lib/csu/mips/crtn.S cc -O -pipe -G0 -I/usr/src/lib/csu/mips/../common -I/usr/src/lib/csu/mips/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -S -o crt1.s /usr/src/lib/csu/mips/crt1.c sed -i "" -e '/\.note\.tag/s/progbits/note/' crt1.s cc -c -o crt1.o crt1.s cc -O -pipe -G0 -I/usr/src/lib/csu/mips/../common -I/usr/src/lib/csu/mips/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c /usr/src/lib/csu/mips/crti.S /usr/src/lib/csu/mips/crti.S:9:16: error: unexpected token in '.set' .set noreorder ^ /usr/src/lib/csu/mips/crti.S:13:2: error: invalid instruction mnemonic 'ptr_addu' PTR_ADDU sp, sp, -CALLFRAME_SIZ ^~~~~~~~ /usr/src/lib/csu/mips/crti.S:14:25: error: unexpected token in memory operand REG_S ra, CALLFRAME_RA(sp) ^ /usr/src/lib/csu/mips/crti.S:26:14: error: unexpected token in '.set' .set reorder ^ /usr/src/lib/csu/mips/crti.S:33:16: error: unexpected token in '.set' .set noreorder ^ /usr/src/lib/csu/mips/crti.S:37:2: error: invalid instruction mnemonic 'ptr_addu' PTR_ADDU sp, sp, -CALLFRAME_SIZ ^~~~~~~~ /usr/src/lib/csu/mips/crti.S:38:25: error: unexpected token in memory operand REG_S ra, CALLFRAME_RA(sp) ^ /usr/src/lib/csu/mips/crti.S:50:14: error: unexpected token in '.set' .set reorder ^ *** Error code 1 Stop. make[4]: stopped in /usr/src/lib/csu/mips *** Error code 1 Stop. make[3]: stopped in /usr/src *** Error code 1 Stop. make[2]: stopped in /usr/src *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src From owner-freebsd-mips@FreeBSD.ORG Sat Jan 17 07:47:49 2015 Return-Path: Delivered-To: freebsd-mips@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 40FAAB88 for ; Sat, 17 Jan 2015 07:47:49 +0000 (UTC) Received: from spazito3.arvixevps.com (spazito3.arvixevps.com [108.175.154.180]) (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 21828604 for ; Sat, 17 Jan 2015 07:47:49 +0000 (UTC) Received: from diariodoestadoms by spazito3.arvixevps.com with local (Exim 4.84) (envelope-from ) id 1YCO6n-000Ckg-1x for freebsd-mips@freebsd.org; Fri, 16 Jan 2015 23:47:49 -0800 To: freebsd-mips@freebsd.org Subject: Dear Beloved From: Madam Abra Jericho. Reply-To: mrsabrajerichofamily@gmail.com MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Message-Id: Date: Fri, 16 Jan 2015 23:47:49 -0800 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - spazito3.arvixevps.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [505 504] / [47 12] X-AntiAbuse: Sender Address Domain - spazito3.arvixevps.com X-Get-Message-Sender-Via: spazito3.arvixevps.com: authenticated_id: diariodoestadoms/only user confirmed/virtual account not confirmed X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 07:47:49 -0000 Dear Beloved I am Madam Abra Jericho.A complete citizen of the Philippines, widow to the late Mr Mayor Jericho who was a victim of the terrorist attack in my country.We were married for 7 years without a child and my late husband was a government contractor. Before his death he had a foreign account in Germany the sum of $7.8M. This deposit was coded under a secret arrangement as a family treasure. This means that the security company does not know the real content of this trunk box which he distinguished and deposited with a security company in Germany I want you to do me a favor to receive this funds to a safe account in your country or any safer place as the beneficiary. I have plans to do investment in your country,like real estate and industrial production and I plead you take it as personal task to assist the widow like me. This is my reason for writing to you.Please if you are willing to assist me indicate your interest in replying. Yours Madam Abra Jericho