hello.
I am on MCIMX6SX-SDB (Solo6X) using QSPI 25n256 as a boot device.
i would like to know why nonblocking pool is initialized to late. Kernel configuration has positive options for Hardware crypto devices part. I gess kernel should use RINGA for populating the pool very fast by default or should i make further efforts to populate the pool.
Thank You.
boot log:
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.1.15+ (rdp_user3@vivado) #1 PREEMPT Fri Feb 5 16:50:49 MSK 2021
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Freescale i.MX6 SoloX SDB RevB Board
[ 0.000000] Reserved memory: created CMA memory pool at 0xaa000000, size 320 MiB
[ 0.000000] Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 705164K/1048576K available (4199K kernel code, 189K rwdata, 896K rodata, 192K init, 356K bss, 15732K reserved, 327680K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc0800000 - 0xff000000 (1000 MB)
[ 0.000000] lowmem : 0x80000000 - 0xc0000000 (1024 MB)
[ 0.000000] pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
[ 0.000000] .text : 0x80008000 - 0x80501ff8 (5096 kB)
[ 0.000000] .init : 0x80502000 - 0x80532000 ( 192 kB)
[ 0.000000] .data : 0x80532000 - 0x80561480 ( 190 kB)
[ 0.000000] .bss : 0x80564000 - 0x805bd1ec ( 357 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Additional per-CPU info printed with stalls.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] L2C-310 erratum 769419 enabled
[ 0.000000] L2C-310 enabling early BRESP for Cortex-A9
[ 0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[ 0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[ 0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[ 0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[ 0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76430001
[ 0.000000] mxc_clocksource_init 3000000
[ 0.000000] Switching to timer-based delay loop, resolution 333ns
[ 0.000006] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[ 0.000021] clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[ 0.001112] Console: colour dummy device 80x30
[ 0.001129] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[ 0.001141] pid_max: default: 32768 minimum: 301
[ 0.001224] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.001235] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.001704] CPU: Testing write buffer coherency: ok
[ 0.001922] Setting up static identity map for 0x80008200 - 0x80008258
[ 0.003100] devtmpfs: initialized
[ 0.009749] device-tree: Duplicate name in lcdif@02220000, renamed to "display#1"
[ 0.009947] device-tree: Duplicate name in lcdif@02224000, renamed to "display#1"
[ 0.011941] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.012199] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.022904] pinctrl core: initialized pinctrl subsystem
[ 0.023430] NET: Registered protocol family 16
[ 0.029297] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.050209] cpuidle: using governor ladder
[ 0.080230] cpuidle: using governor menu
[ 0.099116] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.099127] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.099871] imx6sx-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[ 0.101576] MU is ready for cross core communication!
[ 0.132422] mxs-dma 1804000.dma-apbh: initialized
[ 0.133904] i2c i2c-0: IMX I2C adapter registered
[ 0.133921] i2c i2c-0: can't use DMA
[ 0.134289] i2c i2c-1: IMX I2C adapter registered
[ 0.134303] i2c i2c-1: can't use DMA
[ 0.134839] i2c i2c-2: IMX I2C adapter registered
[ 0.134853] i2c i2c-2: can't use DMA
[ 0.135251] i2c i2c-3: IMX I2C adapter registered
[ 0.135265] i2c i2c-3: can't use DMA
[ 0.135434] pps_core: LinuxPPS API ver. 1 registered
[ 0.135442] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.135474] PTP clock support registered
[ 0.136263] Switched to clocksource mxc_timer1
[ 0.144537] NET: Registered protocol family 2
[ 0.145184] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.145260] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.145353] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.145426] UDP hash table entries: 512 (order: 1, 8192 bytes)
[ 0.145451] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
[ 0.145589] NET: Registered protocol family 1
[ 0.145847] RPC: Registered named UNIX socket transport module.
[ 0.145857] RPC: Registered udp transport module.
[ 0.145862] RPC: Registered tcp transport module.
[ 0.145869] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.146241] CPU PMU: Failed to parse /soc/pmu/interrupt-affinity[0]
[ 0.146314] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[ 0.147437] imx rpmsg driver is registered.
[ 0.148391] Bus freq driver module loaded
[ 0.149041] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.154338] VFS: Disk quotas dquot_6.6.0
[ 0.154491] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.155025] NFS: Registering the id_resolver key type
[ 0.155058] Key type id_resolver registered
[ 0.155066] Key type id_legacy registered
[ 0.155166] jffs2: version 2.2. (NAND) В© 2001-2006 Red Hat, Inc.
[ 0.158946] io scheduler noop registered
[ 0.158963] io scheduler deadline registered
[ 0.159008] io scheduler cfq registered (default)
[ 0.159535] imx-weim 21b8000.weim: Driver registered.
[ 0.163387] imx-sdma 20ec000.sdma: no iram assigned, using external mem
[ 0.163552] imx-sdma 20ec000.sdma: no event needs to be remapped
[ 0.163707] imx-sdma 20ec000.sdma: loaded firmware 3.3
[ 0.165943] imx-sdma 20ec000.sdma: initialized
[ 0.217540] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 23, base_baud = 1500000) is a IMX
[ 0.858341] console [ttymxc0] enabled
[ 0.862751] 21f4000.serial: ttymxc4 at MMIO 0x21f4000 (irq = 298, base_baud = 1500000) is a IMX
[ 0.872739] imx sema4 driver is registered.
[ 0.885265] brd: module loaded
[ 0.892659] loop: module loaded
[ 0.897192] fsl-quadspi 21e4000.qspi: n25q256a (32768 Kbytes)
[ 0.902967] 9 cmdlinepart partitions found on MTD device 21e4000.qspi
[ 0.909481] Creating 9 MTD partitions on "21e4000.qspi":
[ 0.914814] 0x000000000000-0x000000100000 : "uboot"
[ 0.937453] 0x000000170000-0x000000870000 : "host0
[ 0.943161] 0x000000870000-0x000000880000 : "dtb"
[ 0.959986] 0x000000f90000-0x000002000000 : "RootFS"
[ 0.969226] pps pps0: new PPS source ptp0
[ 0.974561] libphy: fec_enet_mii_bus: probed
[ 0.980706] fec 2188000.ethernet eth0: registered PHC device 0
[ 0.988028] pps pps1: new PPS source ptp1
[ 0.993820] fec 21b4000.ethernet eth1: registered PHC device 1
[ 1.001186] snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
[ 1.010109] i2c /dev entries driver
[ 1.014830] imx2-wdt 20bc000.wdog: use WDOG_B to reboot.
[ 1.020516] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[ 1.028389] caam 2100000.caam: Entropy delay = 3200
[ 1.154821] caam 2100000.caam: Entropy delay = 3600
[ 1.296409] caam 2100000.caam: Entropy delay = 4000
[ 1.453132] caam 2100000.caam: Entropy delay = 4400
[ 1.625020] caam 2100000.caam: Entropy delay = 4800
[ 1.812065] caam 2100000.caam: Instantiated RNG4 SH0
[ 1.903130] caam 2100000.caam: Instantiated RNG4 SH1
[ 1.908121] caam 2100000.caam: device ID = 0x0a16010000000200 (Era -524)
[ 1.914829] caam 2100000.caam: job rings = 2, qi = 0
[ 1.981098] caam algorithms registered in /proc/crypto
[ 1.990093] caam_jr 2101000.jr0: registering rng-caam
[ 1.995291] NET: Registered protocol family 26
[ 2.000397] NET: Registered protocol family 10
[ 2.005702] sit: IPv6 over IPv4 tunneling driver
[ 2.011242] NET: Registered protocol family 17
[ 2.015771] 8021q: 802.1Q VLAN Support v1.8
[ 2.020085] Key type dns_resolver registered
[ 2.037743] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2017-03-16 11:23:59 UTC (1489663439)
[ 2.612128] VFS: Mounted root (jffs2 filesystem) on device 31:8.
[ 2.618346] devtmpfs: mounted
[ 2.621498] Freeing unused kernel memory: 192K (80502000 - 80532000)
INIT: version 2.88 booting
[ 3.715377] random: dd urandom read with 8 bits of entropy available
Starting udev
[ 4.361496] udevd[159]: starting version 3.1.5
INIT: Entering runlevel: 5
Configuring network interfaces... [ 5.646912] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
[ 5.658231] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
[ 9.646924] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 9.654605] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending discover...
Sending select for 132.0.15.25...
Lease of 132.0.15.25 obtained, lease time 129600
/etc/udhcpc.d/50default: Adding DNS 132.0.15.25
/etc/udhcpc.d/50default: Adding DNS 209.208.37.155
done.
Starting syslogd/klogd: done
Freescale i.MX Release Distro 4.1.15-2.0.0 imx6dqscm-1gb-qwks /dev/ttymxc0
imx6dqscm-1gb-qwks login: root
root@imx6dqscm-1gb-qwks:~# [ 99.046310] random: nonblocking pool is initialized
Solved! Go to Solution.
@o_scherbinin
Hello,
You may use approach, described in section 5.6.3 (RNG trim fuses) of app note
"i.MX Secure Boot on HABv4 Supported Devices, Rev. 4, June 2020"
https://www.nxp.com/docs/en/application-note/AN4581.pdf
Regards,
Yuri.
@o_scherbinin
Hello,
I hope the following clarifies the issue:
https://forums.xilinx.com/t5/Embedded-Linux/random-nonblocking-pool-is-initialized/td-p/739759
Regards,
Yuri.
Thx Yuri.
I have tried implement this mode already ( to carry
entropy pool information across shut-downs and start-ups) , and it was working, but that's not what solved the problem.
Checking the entropy available after bootup ( cat /proc/sys/kernel/random/entropy_avail)
it gets araund 600 and more.. (quite good).
i do not have any idea why service that checks entropy pool does not see saved information..
@o_scherbinin
Hello,
You may use approach, described in section 5.6.3 (RNG trim fuses) of app note
"i.MX Secure Boot on HABv4 Supported Devices, Rev. 4, June 2020"
https://www.nxp.com/docs/en/application-note/AN4581.pdf
Regards,
Yuri.
thank you a lot