Le Mon, Feb 12, 2024 at 04:50:48PM +0300, Alexey Romanov a écrit : > Hello! > > This patchset expand the funcionality of the Amlogic > crypto driver by adding support for more SoC families: > AXG, G12A, G12B, SM1, A1, S4. > > Also specify and enable crypto node in device tree > for reference Amlogic devices. > > Tested on AXG, G12A/B, SM1, A1 and S4 devices via > custom tests [1] and tcrypt module. > > --- > I started to test on Lepotato board and added patchs up to "drivers: crypto: meson: process more than MAXDESCS descriptors" booting lead to: [ 18.559922] gxl-crypto c883e000.crypto: will run requests pump with realtime priority [ 18.562492] gxl-crypto c883e000.crypto: will run requests pump with realtime priority [ 18.570328] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028 [ 18.581135] Mem abort info: [ 18.581354] ESR = 0x0000000096000006 [ 18.585138] EC = 0x25: DABT (current EL), IL = 32 bits [ 18.593005] SET = 0, FnV = 0 [ 18.593334] EA = 0, S1PTW = 0 [ 18.597329] FSC = 0x06: level 2 translation fault [ 18.604250] Data abort info: [ 18.604282] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000 [ 18.612243] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 18.614552] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 18.624249] user pgtable: 4k pages, 48-bit VAs, pgdp=000000007b8ab000 [ 18.626196] [0000000000000028] pgd=080000007b8ac003, p4d=080000007b8ac003, pud=080000007b8ad003, pmd=0000000000000000 [ 18.640426] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP [ 18.642929] Modules linked in: of_mdio fixed_phy fwnode_mdio sm4_ce(-) sm4 meson_rng meson_canvas libphy rng_core meson_gxbb_wdt watchdog amlogic_gxl_crypto(+) ghash_generic gcm xctr xts cts essiv authenc cmac xcbc ccm [ 18.662164] CPU: 3 PID: 264 Comm: cryptomgr_test Not tainted 6.8.0-rc1-00052-gf70f2b0814a0 #11 [ 18.670698] Hardware name: Libre Computer AML-S905X-CC (DT) [ 18.676220] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 18.683118] pc : meson_get_engine_number+0x2c/0x50 [amlogic_gxl_crypto] [ 18.689674] lr : meson_skencrypt+0x38/0x8c [amlogic_gxl_crypto] [ 18.695539] sp : ffff800081393790 [ 18.698816] x29: ffff800081393790 x28: 0000000000000400 x27: ffff800080874a80 [ 18.705888] x26: ffff800081393830 x25: ffff800081393bd8 x24: ffff000001aaa000 [ 18.712961] x23: 0000000000000001 x22: 0000000000000000 x21: ffff0000011b1c50 [ 18.720033] x20: ffff00007bac8248 x19: ffff0000011b1c00 x18: ffffffffffffffff [ 18.727105] x17: 00000000000001a4 x16: ffff800078edc1f0 x15: ffff8000813938e0 [ 18.734178] x14: ffff800101393bd7 x13: 0000000000000000 x12: 0000000000000000 [ 18.741250] x11: 000000000000021c x10: fffffffff81213e0 x9 : 00000000000730d5 [ 18.748323] x8 : ffff0000011b1ca8 x7 : fefefefefefefefe x6 : fffffc000007a302 [ 18.755395] x5 : ffff800078eb4148 x4 : 0000000000000000 x3 : 0000000000000028 [ 18.762468] x2 : ffff000001aaa040 x1 : 0000000000000000 x0 : 0000000000000000 [ 18.769541] Call trace: [ 18.771956] meson_get_engine_number+0x2c/0x50 [amlogic_gxl_crypto] [ 18.778167] crypto_skcipher_encrypt+0xe0/0x124 [ 18.782651] test_skcipher_vec_cfg+0x2a8/0x6b0 [ 18.787050] test_skcipher_vec+0x80/0x1c4 [ 18.791017] alg_test_skcipher+0xbc/0x1fc [ 18.794985] alg_test+0x140/0x628 [ 18.798262] cryptomgr_test+0x24/0x44 [ 18.801885] kthread+0x110/0x114 [ 18.805076] ret_from_fork+0x10/0x20 [ 18.808617] Code: 1b008440 d65f03c0 9100a003 f9800071 (885f7c61) [ 18.814651] ---[ end trace 0000000000000000 ]--- [ 18.862270] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found [ 18.863897] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found [ 18.870349] meson8b-dwmac c9410000.ethernet: PTP uses main clock [ 18.880548] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37 [ 18.882403] meson8b-dwmac c9410000.ethernet: DWMAC1000 [ 18.887926] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported [ 18.895215] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported [ 18.902627] meson8b-dwmac c9410000.ethernet: COE Type 2 [ 18.907756] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported [ 18.914750] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported [ 18.921246] meson8b-dwmac c9410000.ethernet: Normal descriptors [ 18.927017] meson8b-dwmac c9410000.ethernet: Ring mode enabled [ 18.932782] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer