dma_alloc_coherent() Fails when increasing system memory larger than 4GB on T1040

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dma_alloc_coherent() Fails when increasing system memory larger than 4GB on T1040

4,057 Views
cordong2956
Contributor I
  • Using Kernel 5.1.9
  • dma_alloc_coherent() call works as expected when total system memory is 2GB / 3GB

The call is used within Kernel PCI Driver within the code snippet below:

  • int32_t alloc_ob_mem(fsl_crypto_dev_t*dev, struct crypto_dev_config*config)
    {
    void *
    host_v_addr;
    struct pci_bar_info*mem;
    uint32_t
    ob_mem_len;
  • /* First get the total obmem required */
    ob_mem_len= calc_ob_mem_len(dev, config);
    mem = &(dev->
    priv_dev->bars[MEM_TYPE_DRIVER]);
  • print_debug("alloc_ob_mementered...\n");
    print_debug("Total obmem returned: %d\n", ob_mem_len);
  • host_v_addr= dma_alloc_coherent(&dev->priv_dev->dev->dev, ob_mem_len,
    &(mem->
    host_dma_addr), GFP_KERNEL);
    if (!
    host_v_addr)
  • { print_error("Allocating obmem failed...\n"); return -ENOMEM; }

Log of failure:

pastedImage_3.png

Uboot PCI configuration:

#define CONFIG_SYS_PCIE2_MEM_VIRT 0x90000000
#define CONFIG_SYS_PCIE2_MEM_BUS 0xe0000000
#define CONFIG_SYS_PCIE2_MEM_PHYS 0xc10000000ull
#define CONFIG_SYS_PCIE2_MEM_SIZE 0x10000000 /* 256M */
#define CONFIG_SYS_PCIE2_IO_VIRT 0xf8010000
#define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
#define CONFIG_SYS_PCIE2_IO_PHYS 0xff8010000ull
#define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */

Kernel DTS:

pci1: pcie@ffe250000 {
reg = <0xf 0xfe250000 0 0x10000>;
ranges = <0x02000000 0x0 0xe0000000 0xc 0x10000000 0x0 0x10000000
0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
0 0x10000000

0x01000000 0 0x00000000
0x01000000 0 0x00000000
0 0x00010000>;
};
};

My main questions from this are:

-  Is there specific kernel configuration or any kernel drivers necessary to allow the dma_alloc_coherent() call

to successfully work past the 32 bit addressing ? 

 

If any more details are required please let me know so that I can provide them.

 

Thanks in advance!

0 Kudos
4 Replies

3,865 Views
cordong2956
Contributor I

Hi Yiping Wang,

Thanks! for the reply,  I have added "cma = 256M" and the issue is still present.

Log Below:


FSL-CRYPTO-DRV [fsl_crypto_pci_probe:1538] DEBUG: ========== PROBE FUNCTION ==========
FSL-Crypto-Driver 0000:01:00.0: [fsl_crypto_pci_probe:1565] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: Found C29x Device
FSL-Crypto-Driver 0000:01:00.0: [fsl_get_bar_map:845] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: BAR 0: physical address 0x0000000c10000000
FSL-Crypto-Driver 0000:01:00.0: [fsl_get_bar_map:850] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: BAR 0: virtual address 00000000afaa5ba5, length 0x0000000000100000
FSL-Crypto-Driver 0000:01:00.0: [fsl_get_bar_map:845] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: BAR 1: physical address 0x0000000c10100000
FSL-Crypto-Driver 0000:01:00.0: [fsl_get_bar_map:850] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: BAR 1: virtual address 000000004880f74e, length 0x0000000000100000
FSL-CRYPTO-DRV [get_dev_config:725] DEBUG: Config Dev no:1 Arg Dev no: 1
FSL-Crypto-Driver 0000:01:00.0: [get_msi_config_data:932] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: MSI addr low [FF045140] MSI addr high [0] MSI data [0]
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1149] DEBUG: IB mem addr: 000000004880f74e
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1150] DEBUG: Device hs mem addr: 000000000347d8a3
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1153] DEBUG: Rearrange rings.....
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1155] DEBUG: Rearrange complete....
FSL-CRYPTO-DRV [alloc_ob_mem:291] DEBUG: alloc_ob_mem entered...
FSL-CRYPTO-DRV [alloc_ob_mem:292] DEBUG: Total ob mem returned: 548864
FSL-CRYPTO-DRV [alloc_ob_mem:297] ERROR: Allocating ob mem failed...
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1159] ERROR: Ob mem alloc failed....
FSL-Crypto-Driver 0000:01:00.0: Adding device as crypto dev failed
FSL-Crypto-Driver 0000:01:00.0: [fsl_release_irqs:948] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: Freeing Irq
FSL-Crypto-Driver 0000:01:00.0: Probe of device [1] failed
FSL-CRYPTO-DRV [fsl_crypto_drv_init:1780] ERROR: NO DEVICE FOUND...
insmod: ERROR: could not insert module ./lib/modules/5.1.9/extra/fsl_pkc_crypto_offload_drv.ko: No such device
# cat /proc/cmdline
root=/dev/ram rw console=ttyS0,115200 ramdiskaddr=20000000 ramdisk_size=500000 cma = 256M ip=10.194.147.161::10.194.147.129:255.255.255.192::eth0:off
# ^C
# lspci
01:00.0 Class 0b20: 1957:0809
00:00.0 Class 0604: 1957:0824
#

0 Kudos

3,865 Views
yipingwang
NXP TechSupport
NXP TechSupport

The issue is that dma_alloc_coherent() failed to allocate memory, so it is a generic issue instead of PCIe specific.

 

The given CMA size on the >4G RAM board is not enough? Give cma=512M in bootargs, and have a try.

 

For further debugging, Please provide the complete boot logs and list the difference between 3G RAM and 4G RAM board.

0 Kudos

3,865 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please try to add bootargs "cma = 256M".

The consistent DMA mapping interfaces, for non-NULL dev, will by default return a DMA address which is 32-bit addressable. Even if the device indicates (via DMA mask) that it may address the upper 32-bits, consistent allocation will only return > 32-bit addresses for DMA if the consistent DMA mask has been explicitly changed via dma_set_coherent_mask().

Please refer to Documentation/DMA-API-HOWTO.txt for details.

0 Kudos

3,865 Views
cordong2956
Contributor I

Hi Yiping Wang,

Is there any kernel configuration, or additional driver support required ?

Below is the latest Full kernel powerup Log with error:

## Transferring control to Linux (at address 00000000) ...
Booting using OF flat tree...
OF: reserved mem: initialized node qman-fqd, compatible id fsl,qman-fqd
OF: reserved mem: initialized node qman-pfdr, compatible id fsl,qman-pfdr
OF: reserved mem: initialized node bman-fbpr, compatible id fsl,bman-fbpr
MMU: Supported page sizes
4 KB as direct
4096 KB as direct
16384 KB as direct
65536 KB as direct
262144 KB as direct
1048576 KB as direct
MMU: Book3E HW tablewalk not supported
Linux version 5.1.9 (ncipher@ncipher) (gcc version 5.5.0 (Buildroot 2019.08.2)) #1 SMP Mon May 11 19:53:48 EDT 2020
Found initrd at 0xc00000002e719000:0xc00000002ffff08f
Using CoreNet Generic machine description
printk: bootconsole [udbg0] enabled
CPU maps initialized for 1 thread per core
-----------------------------------------------------
phys_mem_size = 0x200000000
dcache_bsize = 0x40
icache_bsize = 0x40
cpu_features = 0x00000003008003b4
possible = 0x00000003009003b6
always = 0x00000003008003b4
cpu_user_features = 0xcc008000 0x08000000
mmu_features = 0x000a0010
firmware_features = 0x0000000000000000
-----------------------------------------------------
CoreNet Generic board
barrier-nospec: using isync; sync as speculation barrier
Zone ranges:
DMA [mem 0x0000000000000000-0x000000007fffefff]
Normal [mem 0x000000007ffff000-0x00000001ffffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x00000001ffffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x00000001ffffffff]
MMU: Allocated 2112 bytes of context maps for 255 contexts
percpu: Embedded 21 pages/cpu s48024 r0 d37992 u262144
Built 1 zonelists, mobility grouping on. Total pages: 2064383
Kernel command line: root=/dev/ram rw console=ttyS0,115200 ramdiskaddr=20000000 ramdisk_size=500000 cma=256M pci=realloc ip=10.194.147.161::10.194.147.129:255.255.255.192::eth0:off
printk: log_buf_len individual max cpu contribution: 4096 bytes
printk: log_buf_len total cpu_extra contributions: 12288 bytes
printk: log_buf_len min size: 16384 bytes
printk: log_buf_len: 32768 bytes
printk: early log buf free: 12324(75%)
Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
Memory: 8088124K/8388608K available (6704K kernel code, 1576K rwdata, 2448K rodata, 400K init, 327K bss, 300484K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU event tracing is enabled.
rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
NR_IRQS: 512, nr_irqs: 512, preallocated irqs: 16
mpic: Setting up MPIC " OpenPIC " version 1.2 at ffe040000, max 4 CPUs
mpic: ISU size: 512, shift: 9, mask: 1ff
mpic: Initializing for 512 sources
clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x8a60dd6a9, max_idle_ns: 440795204056 ns
clocksource: timebase mult[1aaaaaab] shift[24] registered
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
LSM: Security Framework initializing
SELinux: Initializing.
*** VALIDATE SELinux ***
Mount-cache hash table entries: 16384 (order: 5, 131072 bytes)
Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes)
*** VALIDATE proc ***
*** VALIDATE cgroup1 ***
*** VALIDATE cgroup2 ***
e500 family performance monitor hardware support registered
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
No cpu-release-addr for cpu 1
smp: failed starting cpu 1 (rc -2)
No cpu-release-addr for cpu 2
smp: failed starting cpu 2 (rc -2)
No cpu-release-addr for cpu 3
smp: failed starting cpu 3 (rc -2)
smp: Brought up 1 node, 1 CPU
Using standard scheduler topology
devtmpfs: initialized
random: get_random_u32 called from .bucket_table_alloc+0x16c/0x1b4 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 1024 (order: 4, 65536 bytes)
NET: Registered protocol family 16
audit: initializing netlink subsys (disabled)
Found FSL PCI host bridge at 0x0000000ffe250000. Firmware bus number: 0->1
PCI host bridge /pcie@ffe250000 ranges:
MEM 0x0000000c10000000..0x0000000c1fffffff -> 0x00000000e0000000
IO 0x0000000ff8010000..0x0000000ff801ffff -> 0x0000000000000000
/pcie@ffe250000: PCICSRBAR @ 0xff000000
setup_pci_atmu: end of DRAM 200000000
/pcie@ffe250000: Setup 64-bit PCI DMA window
/pcie@ffe250000: WARNING: Outbound window cfg leaves gaps in memory map. Adjusting the memory map could reduce unnecessary bounce buffering.
/pcie@ffe250000: DMA window size is 0xe0000000
audit: type=2000 audit(0.068:1): state=initialized audit_enabled=0 res=1
platform ff6000000.qman-portal: Adding to iommu group 0
platform ff6004000.qman-portal: Adding to iommu group 1
platform ff6008000.qman-portal: Adding to iommu group 2
platform ff600c000.qman-portal: Adding to iommu group 3
platform ff6010000.qman-portal: Adding to iommu group 4
platform ff6014000.qman-portal: Adding to iommu group 5
platform ff6018000.qman-portal: Adding to iommu group 6
platform ff601c000.qman-portal: Adding to iommu group 7
platform ff6020000.qman-portal: Adding to iommu group 8
platform ff6024000.qman-portal: Adding to iommu group 9
platform ffe100300.dma: Adding to iommu group 10
platform ffe101300.dma: Adding to iommu group 11
platform ffe318000.qman: Adding to iommu group 12
platform ffe31a000.bman: Adding to iommu group 13
platform ffe240000.pcie: Adding to iommu group 14
fsl-pci ffe250000.pcie: Adding to iommu group 15
platform ffe140000.qe: Adding to iommu group 16
software IO TLB: mapped [mem 0xfbfff000-0xfffff000] (64MB)
PCI: Probing PCI hardware
fsl-pci ffe250000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x8000080000010000-0x800008000001ffff] (bus address [0x0000-0xffff])
pci_bus 0000:00: root bus resource [mem 0xc10000000-0xc1fffffff] (bus address [0xe0000000-0xefffffff])
pci_bus 0000:00: root bus resource [bus 00-01]
fsl-pci ffe250000.pcie: Removing from iommu group 15
pci 0000:00:00.0: Adding to iommu group 17
pci 0000:01:00.0: Adding to iommu group 17
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
PCI: Cannot allocate resource region 0 of device 0000:00:00.0, will remap
pci 0000:00:00.0: BAR 0: no space for [mem size 0x01000000]
pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x01000000]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x8000080000010000-0x800008000001ffff]
pci 0000:00:00.0: bridge window [mem 0xc10000000-0xc1fffffff]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x8000080000010000-0x800008000001ffff]
pci 0000:00:00.0: bridge window [mem 0xc10000000-0xc1fffffff]
HugeTLB registered 4.00 MiB page size, pre-allocated 0 pages
HugeTLB registered 16.0 MiB page size, pre-allocated 0 pages
HugeTLB registered 64.0 MiB page size, pre-allocated 0 pages
HugeTLB registered 256 MiB page size, pre-allocated 0 pages
HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
Freescale Elo series DMA driver
fsl-elo-dma ffe100300.dma: #0 (fsl,eloplus-dma-channel), irq 28
fsl-elo-dma ffe100300.dma: #1 (fsl,eloplus-dma-channel), irq 29
fsl-elo-dma ffe100300.dma: #2 (fsl,eloplus-dma-channel), irq 30
fsl-elo-dma ffe100300.dma: #3 (fsl,eloplus-dma-channel), irq 31
fsl-elo-dma ffe100300.dma: #4 (fsl,eloplus-dma-channel), irq 76
fsl-elo-dma ffe100300.dma: #5 (fsl,eloplus-dma-channel), irq 77
fsl-elo-dma ffe100300.dma: #6 (fsl,eloplus-dma-channel), irq 78
fsl-elo-dma ffe100300.dma: #7 (fsl,eloplus-dma-channel), irq 79
fsl-elo-dma ffe101300.dma: #0 (fsl,eloplus-dma-channel), irq 32
fsl-elo-dma ffe101300.dma: #1 (fsl,eloplus-dma-channel), irq 33
fsl-elo-dma ffe101300.dma: #2 (fsl,eloplus-dma-channel), irq 34
fsl-elo-dma ffe101300.dma: #3 (fsl,eloplus-dma-channel), irq 35
fsl-elo-dma ffe101300.dma: #4 (fsl,eloplus-dma-channel), irq 80
fsl-elo-dma ffe101300.dma: #5 (fsl,eloplus-dma-channel), irq 81
fsl-elo-dma ffe101300.dma: #6 (fsl,eloplus-dma-channel), irq 82
fsl-elo-dma ffe101300.dma: #7 (fsl,eloplus-dma-channel), irq 83
EDAC MC: Ver: 3.0.0
fsl-ifc ffe124000.localbus: Freescale Integrated Flash Controller
fsl-ifc ffe124000.localbus: IFC version 1.3, 8 banks
clocksource: Switched to clocksource timebase
*** VALIDATE hugetlbfs ***
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
UDP hash table entries: 4096 (order: 5, 131072 bytes)
UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 25496K
workingset: timestamp_bits=46 max_order=21 bucket_order=0
ntfs: driver 2.1.32 [Flags: R/O].
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler mq-deadline registered
io scheduler kyber registered
aer 0000:00:00.0:pcie002: AER enabled with IRQ 21
bman_portal ff4000000.bman-portal: Portal initialised, cpu 0
bman_portal ff4004000.bman-portal: Portal initialised, cpu 1
bman_portal ff4008000.bman-portal: Portal initialised, cpu 2
bman_portal ff400c000.bman-portal: Portal initialised, cpu 3
qman_portal ff6000000.qman-portal: Portal initialised, cpu 0
qman_portal ff6004000.qman-portal: Portal initialised, cpu 1
qman_portal ff6008000.qman-portal: Portal initialised, cpu 2
qman_portal ff600c000.qman-portal: Portal initialised, cpu 3
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
printk: console [ttyS0] disabled
serial8250.0: ttyS0 at MMIO 0xffe11c500 (irq = 36, base_baud = 18750000) is a 16550A_FSL64
printk: console [ttyS0] enabled
printk: console [ttyS0] enabled
printk: bootconsole [udbg0] disabled
printk: bootconsole [udbg0] disabled
serial8250.0: ttyS1 at MMIO 0xffe11c600 (irq = 36, base_baud = 18750000) is a 16550A_FSL64
serial8250.0: ttyS2 at MMIO 0xffe11d500 (irq = 37, base_baud = 18750000) is a 16550A_FSL64
serial8250.0: ttyS3 at MMIO 0xffe11d600 (irq = 37, base_baud = 18750000) is a 16550A_FSL64
ePAPR hypervisor byte channel driver
brd: module loaded
loop: module loaded
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa3
nand: Micron MT29F8G08ADBDAH4
nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
6 fixed-partitions partitions found on MTD device fff800000.flash
Creating 6 MTD partitions on "fff800000.flash":
0x000000000000-0x000001000000 : "U-Boot"
0x000001000000-0x000002000000 : "Long-term"
0x000002000000-0x000006000000 : "Recovery Image"
0x000006000000-0x00000e000000 : "Primary Image"
0x00000e000000-0x00002e000000 : "Library"
0x00002e000000-0x00003e000000 : "User"
fsl,ifc-nand fff800000.nand: IFC NAND device at 0xfff800000, bank 0
fsl_espi ffe110000.spi: at 0x(____ptrval____) (irq = 53)
libphy: Fixed MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
mdio_bus ffe4fc000: MDIO device at address 3 is missing.
mdio_bus ffe4fc000: MDIO device at address 1 is missing.
mdio_bus ffe4fc000: MDIO device at address 2 is missing.
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
fsl_dpaa_mac ffe4e8000.ethernet: FMan MEMAC
fsl_dpaa_mac ffe4e8000.ethernet: FMan MAC address: 00:04:9f:78:d9:15
fsl_dpaa_mac ffe4e0000.ethernet: FMan MEMAC
fsl_dpaa_mac ffe4e0000.ethernet: FMan MAC address: 00:04:9f:78:d9:11
fsl_dpaa_mac ffe4e8000.ethernet eth0: Probed interface eth0
fsl_dpaa_mac ffe4e0000.ethernet eth1: Probed interface eth1
i2c /dev entries driver
mpc-i2c ffe118100.i2c: timeout 1000000 us
at24 0-0057: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
mpc-i2c ffe118000.i2c: timeout 1000000 us
mpc-i2c ffe119000.i2c: timeout 1000000 us
mpc-i2c ffe119100.i2c: timeout 1000000 us
Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software
EDAC MC0: Giving out device to module fsl_ddr_edac controller fsl_mc_err: DEV fsl_mc_err (INTERRUPT)
fsl_ddr_edac acquired irq 490 for MC
fsl_ddr_edac MC err registered
EDAC PCI0: Giving out device to module MPC85xx_edac controller mpc85xx_pci_err: DEV mpc85xx-pci-edac.0.auto (INTERRUPT)
MPC85xx_edac acquired irq 21 for PCI Err
MPC85xx_edac PCI err registered
platform ffe301000.jr: Adding to iommu group 15
platform ffe302000.jr: Adding to iommu group 18
platform ffe303000.jr: Adding to iommu group 19
platform ffe304000.jr: Adding to iommu group 20
platform caam_qi: Linux CAAM Queue I/F driver initialised
caam ffe300000.crypto: Entropy delay = 3200
caam ffe300000.crypto: Instantiated RNG4 SH0
caam ffe300000.crypto: Instantiated RNG4 SH1
caam ffe300000.crypto: device ID = 0x0a12040000000000 (Era 6)
caam ffe300000.crypto: job rings = 4, qi = 1
caam algorithms registered in /proc/crypto
platform caam_qi: algorithms registered in /proc/crypto
caam_jr ffe301000.jr: registering rng-caam
caam ffe300000.crypto: caam pkc algorithms registered in /proc/crypto
ipip: IPv4 and MPLS over IPv4 tunneling driver
Initializing XFRM netlink socket
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
drmem: No dynamic reconfiguration memory found
fsl_dpaa_mac ffe4e8000.ethernet eth0: init_phy() failed
IP-Config: Failed to open eth0
IP-Config: Device `eth0' not found
Freeing unused kernel memory: 400K
This architecture does not have kernel memory protection.
Run /init as init process
created directory: '/mnt/longterm'
random: fast init done
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00000: 0x234e instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00004: 0x4554 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f0000c: 0x0080 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00010: 0x56dc instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00014: 0xc7a7 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00018: 0xe7e5 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f0001c: 0x6cc0 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00020: 0x344b instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00024: 0xbcd7 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00028: 0x2bec instead
jffs2: Further such events for this erase block will not be printed
jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
jffs2: empty_blocks 127, bad_blocks 0, c->nr_blocks 128
unable to mount -t jffs2 mtd1 /mnt/longterm > /dev/null 2>&1unable to mount /dev/mtd1
formatting /dev/mtd1 as JFFS2
/etc/init.d/S01longterm: line 53: formatJFFSPartition: command not found
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00000: 0x234e instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00004: 0x4554 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f0000c: 0x0080 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00010: 0x56dc instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00014: 0xc7a7 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00018: 0xe7e5 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f0001c: 0x6cc0 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00020: 0x344b instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00024: 0xbcd7 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00f00028: 0x2bec instead
jffs2: Further such events for this erase block will not be printed
jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
jffs2: empty_blocks 127, bad_blocks 0, c->nr_blocks 128
unable to mount -t jffs2 mtd1 /mnt/longterm > /dev/null 2>&1Starting syslogd: OK
Starting klogd: OK
ubi0: attaching mtd4
ubi0: scanning is finished
ubi0: attached mtd4 (name "Library", size 512 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 4096, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 7/4, WL threshold: 4096, image sequence number: 721580262
ubi0: available PEBs: 0, total reserved PEBs: 4096, PEBs reserved for bad PEB handling: 160
ubi0: background thread "ubi_bgt0d" started, PID 1343
UBI device number 0, total 4096 LEBs (520093696 bytes, 496.0 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
created directory: '/mnt/library'
UBIFS (ubi0:0): Mounting in unauthenticated mode
UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 1351
UBIFS (ubi0:0): recovery needed
UBIFS (ubi0:0): recovery completed
UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "library"
UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS (ubi0:0): FS size: 497238016 bytes (474 MiB, 3916 LEBs), journal size 24887296 bytes (23 MiB, 196 LEBs)
UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 9FCE1FDF-3B4A-46CA-85FB-6E76F0C882C7, small LPT model
Running sysctl: OK
ubi1: attaching mtd5
random: crng init done
ubi1: scanning is finished
ubi1: attached mtd5 (name "User", size 256 MiB)
ubi1: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi1: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi1: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi1: good PEBs: 2048, bad PEBs: 0, corrupted PEBs: 0
ubi1: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi1: max/mean erase counter: 10/4, WL threshold: 4096, image sequence number: 1342984301
ubi1: available PEBs: 0, total reserved PEBs: 2048, PEBs reserved for bad PEB handling: 160
ubi1: background thread "ubi_bgt1d" started, PID 1364
UBI device number 1, total 2048 LEBs (260046848 bytes, 248.0 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
created directory: '/mnt/user'
UBIFS (ubi1:0): Mounting in unauthenticated mode
UBIFS (ubi1:0): background thread "ubifs_bgt1_0" started, PID 1372
UBIFS (ubi1:0): recovery needed
UBIFS (ubi1:0): recovery completed
UBIFS (ubi1:0): UBIFS: mounted UBI device 1, volume 0, name "user"
UBIFS (ubi1:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS (ubi1:0): FS size: 237572096 bytes (226 MiB, 1871 LEBs), journal size 11935744 bytes (11 MiB, 94 LEBs)
UBIFS (ubi1:0): reserved for root: 4952683 bytes (4836 KiB)
UBIFS (ubi1:0): media format: w5/r0 (latest is w5/r0), UUID 569127A4-49DC-4D6C-ACDD-1CE689417A2E, small LPT model
Starting mdev... OK
Initializing random number generator... done.
Starting system message bus: done
Starting network: ip: RTNETLINK answers: File exists
FAIL
Starting dropbear sshd: OK

Welcome to Buildroot
sawshark login:

Welcome to Buildroot
sawshark login: root
Password:
# cd /
# find . -name *.ko
./lib/modules/5.1.9/kernel/fs/udf/udf.ko
./lib/modules/5.1.9/kernel/fs/nls/nls_utf8.ko
./lib/modules/5.1.9/kernel/fs/isofs/isofs.ko
./lib/modules/5.1.9/kernel/fs/fat/msdos.ko
./lib/modules/5.1.9/kernel/drivers/phy/ti/phy-gmii-sel.ko
./lib/modules/5.1.9/kernel/lib/crc-itu-t.ko
./lib/modules/5.1.9/kernel/lib/libcrc32c.ko
./lib/modules/5.1.9/kernel/crypto/pcbc.ko
./lib/modules/5.1.9/kernel/net/sctp/sctp.ko
./lib/modules/5.1.9/kernel/net/sctp/sctp_diag.ko
./lib/modules/5.1.9/extra/cryptodev.ko
./lib/modules/5.1.9/extra/fsl_pkc_crypto_offload_drv.ko
./lib/modules/c2x0/fsl_pkc_crypto_offload_drv.ko
#
# insmod ./lib/modules/5.1.9/extra/fsl_pkc_crypto_offload_drv.ko
fsl_pkc_crypto_offload_drv: loading out-of-tree module taints kernel.
FSL-CRYPTO-DRV [fsl_crypto_drv_init:1728] INFO: CPU mask for NAPI threads is not specified, using one thread per cpu
FSL-CRYPTO-DRV [fsl_crypto_drv_init:1739] INFO: NAPI poll count is not specified, using default value: 1
FSL-CRYPTO-DRV [parse_config_file:1326] INFO: Using configuration file: /etc/crypto/crypto.cfg
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [<device>]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [<device>], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [firmware:/etc/crypto/pkc-firmware.bin]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [firmware], value : [-714335616]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [rings:2]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [rings], value : [2]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file []
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [<ring>]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [<ring>], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [depth:16]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [depth], value : [16]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [affinity:0]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [affinity], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [priority:1]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [priority], value : [1]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [order:0]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [order], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [<end>]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [<end>], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file []
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [<ring>]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [<ring>], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [depth:1024]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [depth], value : [1024]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [affinity:0]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [affinity], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [priority:1]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [priority], value : [1]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [order:0]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [order], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [<end>]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [<end>], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file []
FSL-CRYPTO-DRV [parse_config_file:1357] DEBUG: Line read from file [<end>]
FSL-CRYPTO-DRV [parse_config_file:1364] DEBUG: Label [<end>], value : [0]
FSL-CRYPTO-DRV [parse_config_file:1351] DEBUG: Error/End of file reached
FSL-CRYPTO-DRV [fsl_crypto_pci_probe:1538] DEBUG: ========== PROBE FUNCTION ==========
FSL-Crypto-Driver 0000:01:00.0: [fsl_crypto_pci_probe:1565] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: Found C29x Device
FSL-Crypto-Driver 0000:01:00.0: [fsl_get_bar_map:845] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: BAR 0: physical address 0x0000000c10000000
FSL-Crypto-Driver 0000:01:00.0: [fsl_get_bar_map:850] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: BAR 0: virtual address 000000008312fad8, length 0x0000000000100000
FSL-Crypto-Driver 0000:01:00.0: [fsl_get_bar_map:845] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: BAR 1: physical address 0x0000000c10100000
FSL-Crypto-Driver 0000:01:00.0: [fsl_get_bar_map:850] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: BAR 1: virtual address 00000000b25f52a3, length 0x0000000000100000
FSL-CRYPTO-DRV [get_dev_config:725] DEBUG: Config Dev no:1 Arg Dev no: 1
FSL-Crypto-Driver 0000:01:00.0: [get_msi_config_data:932] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: MSI addr low [FF045140] MSI addr high [0] MSI data [0]
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1154] DEBUG: IB mem addr: 00000000b25f52a3
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1155] DEBUG: Device hs mem addr: 000000002db28f7d
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1158] DEBUG: Rearrange rings.....
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1160] DEBUG: Rearrange complete....
FSL-CRYPTO-DRV [alloc_ob_mem:291] DEBUG: alloc_ob_mem entered...
FSL-CRYPTO-DRV [alloc_ob_mem:292] DEBUG: Total ob mem returned: 548864
FSL-CRYPTO-DRV [alloc_ob_mem:296] ERROR: mydev: 24-bit DMA addressing not available
FSL-CRYPTO-DRV [alloc_ob_mem:302] ERROR: Allocating ob mem failed...
FSL-CRYPTO-DRV [fsl_crypto_layer_add_device:1164] ERROR: Ob mem alloc failed....
FSL-Crypto-Driver 0000:01:00.0: Adding device as crypto dev failed
FSL-Crypto-Driver 0000:01:00.0: [fsl_release_irqs:948] Devcnt:1, DevId:0x809, VendorId:0x1957, Bus:1
FSL-Crypto-Driver 0000:01:00.0: Freeing Irq
FSL-Crypto-Driver 0000:01:00.0: Probe of device [1] failed
FSL-CRYPTO-DRV [fsl_crypto_drv_init:1780] ERROR: NO DEVICE FOUND...
insmod: ERROR: could not insert module ./lib/modules/5.1.9/extra/fsl_pkc_crypto_offload_drv.ko: No such device
# ^C
# ^C
# dmesg | grep 0xfe250000
# dmesg | grep fe250000
fsl-pci ffe250000.pcie: Adding to iommu group 15
fsl-pci ffe250000.pcie: PCI host bridge to bus 0000:00
fsl-pci ffe250000.pcie: Removing from iommu group 15

Thanks in advance!

0 Kudos