From owner-freebsd-arm@freebsd.org Mon Jun 6 10:20:20 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9932CB4664A for ; Mon, 6 Jun 2016 10:20:20 +0000 (UTC) (envelope-from jau789@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 201E411A3 for ; Mon, 6 Jun 2016 10:20:20 +0000 (UTC) (envelope-from jau789@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id k184so8844782wme.2 for ; Mon, 06 Jun 2016 03:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=Pkd/a2u0BgK+/XfyLRArCRcS9vAmFXmi23xjQ4Aj9kU=; b=S2BY2WQt4+Z8izI4vwWPeRG7JleM3zLwiKfKC4yYEgTWyqqDTrUbttwUo1NFlC/Yop BRn9YjJ+bYSTg3dBrENfYvkwpgA2cI+PQs4DNTOJGrkBRPg/2eO7KAoAAko5SuXM6gYS zlKpLs8kK72ErnCvbRAfQyHjkJ9GwlbdWHibdR6ADXfnYMYRbT72rWHiSQrlO0ofRH+L eBvZb3GSd2iVEJleWDHTSv8CjITK5mV/pCd0NARoF44dYf63Qgk6jolu21vjQmFR+hXc irYp8AoCEqvIq760DpGl3Xps6hZjDAegk/K2fnMdslvWz0u+4qSkgK+MTAN7IN1bK4v2 ilMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Pkd/a2u0BgK+/XfyLRArCRcS9vAmFXmi23xjQ4Aj9kU=; b=D40fcBXxLg8eQp8bSDCAM0goW+m6npXR3kTiFHZc9j31kSvqKp8p9OaDgpD17a9ErS BKRWwNS0ITQnJaQnvXlQ/dSyTK4hobjN3xAVQUIZix8wlgIzvrdP0Cjkc+jvPMmF4LxG hCYfO23AbaBZBLgblqkNKErO5xdUA5cNpq4sJ2E5XfVS8umatpsExuMHH6Xw5IvbK1r7 StsQtLNLLjT7AXRe3BL26sGkMvEju7+6VdLJGTgN3cUxAxJV19L+BlKBK+v2hMSZqHLq JOak9dH/TeynKz5BPRt3KUWb7zBrJvmeVd4lYxQB67DfSdQRd26KE0eIpxs90t/id3vy z0KQ== X-Gm-Message-State: ALyK8tLKqz/OwAa248jY6M7P+dNvtvKEJMpf8Jk6SQ9OCqH0RHSLKm6JnCAsxDgZFPaN9Q== X-Received: by 10.28.57.196 with SMTP id g187mr10570942wma.86.1465208418628; Mon, 06 Jun 2016 03:20:18 -0700 (PDT) Received: from [192.168.1.131] (xdsl-205-1.nblnetworks.fi. [83.145.205.1]) by smtp.googlemail.com with ESMTPSA id w16sm13425914wmw.6.2016.06.06.03.20.17 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Jun 2016 03:20:17 -0700 (PDT) Subject: Re: Random number generator on rpi To: freebsd-arm@freebsd.org References: From: "Jukka A. Ukkonen" Message-ID: <2016dde0-b6b6-d71a-17d7-b2d8d07f5a63@gmail.com> Date: Mon, 6 Jun 2016 13:20:07 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2016 10:20:20 -0000 At boot time on my RPI2... bcmrng0: mem 0x104000-0x10400f on simplebus0 --jau On 06/06/16 07:49, Jia-Shiun Li wrote: > Hi all, > > I occasionally found that RPi has a mysterious undocumented random number > generator and Linux has a driver for it. [1] > > Out of curiosity I wrote a simple driver according to the Linux one. It is > simple enough for me without prior rng knowledge to make it work. Or so it > appears. Patch is attached. > > (Note you need to have the updated dtb file by copying > {OBJDIR}/{SRCDIR}/sys/{KERNCONF}/modules/{SRCDIR}/sys/modules/dtb/rpi/rpi{,2}.dtb > to your /boot/msdos) > > Once booted the kernel will output the following line indicating it is > working: > > bcmrng0: mem 0x104000-0x10400f on > simplebus0 > > I only tested it on RPi2. Guess it will work fine on RPi too. > > I tried to compile rndtest(4) together into the kernel, and it did not > output or complain about anything. According to the man page this should > mean the rng works fine, right? Or is there any other tools to verify the > quality of a rng? > > > [1]: > http://scruss.com/blog/2013/06/07/well-that-was-unexpected-the-raspberry-pis-hardware-random-number-generator/ > > -Jia-Shiun. > > > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >