From mboxrd@z Thu Jan 1 00:00:00 1970 From: Weijie Gao Date: Thu, 9 Jan 2020 17:16:56 +0800 Subject: [PATCH v2 2/2] Port to new board "VoCore2" In-Reply-To: <7222113d-6db9-01f3-ddc3-5be12223947e@gmail.com> References: <20191227132515.15869-1-mc5686@mclink.it> <20191227132515.15869-2-mc5686@mclink.it> <28a0c648-0eee-3406-55f6-7c298ea36ecc@denx.de> <7222113d-6db9-01f3-ddc3-5be12223947e@gmail.com> Message-ID: <1578561416.5535.33.camel@mcddlt001> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mauro, As far as I know MT7628 only has a hw crypto engine. I have only the same programming guide as yours so I can't tell you what does the "RESV1 Select Random Generator mode" mean. Best Regards, Weijie On Wed, 2020-01-08 at 14:37 +0100, Daniel Schwierzeck wrote: > +cc Weijie > > On 1/7/20 6:43 PM, Mauro Condarelli wrote: > > Thanks Daniel. > > > > On 1/7/20 4:58 PM, Daniel Schwierzeck wrote: > >> On Tue, Jan 7, 2020 at 3:30 PM Mauro Condarelli wrote: > >> ... > >>> I also have problems with entropy pool in Linux, do you happen to know > >>> if (and how) MT7628 supports HWRNG? > >> what problems exactly? > > Currently it takes a LOT of time to fill-up the entropy pool > > (over half an hour) and on first startup, when it has to > > generate ssh keys and other stuff system is virtually dead > > for that long. > > if possible you should generate the host keys on the first SSH > connection attempt. Otherwise the time of generation is predictable. If > you use dropbear you can configure that. > > >> > >> On a embedded device you usually can only add randomness from > >> interrupts sources to the entropy pool > >> due to lack of disk or input devices. On a router the most interrupts > >> are typically generated by drivers > >> for ethernet and SPI/NAND/MMC controllers. You could use user-space > >> daemons like haveged [1] > >> to add more randomness from hardware events. > > I tried that and it helps. > > I also found *traces* pointing in the direction of hardware > > support for RNG in my SoC; I have ca opy of the (badly > > incomplete) "MT7628 PROGRAMMING GUIDE" and it > > reports in "PWM1 Control register" an "interesting" field: > > RESV1 Select Random Generator mode. > > This males a lot of sense because this SoC is meant to implement > > Wireless routers, so crypto and random acceleration would > > be very useful. > > Unfortunately I don't have more precise information, hence > > the question. > > maybe Weijie from Mediatek can tell if MT7628 has a HWRNG. But PWM1 > sounds more like a pulse width modulator and shouldn't be related to a > HWRNG. >