×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

思元220模块驱动加载失败 已解决 WangQ2021-09-15 10:49:32 回复 4 查看 使用求助
思元220模块驱动加载失败
分享到:

HI大家好:

     我们正在测试思元220边缘加速卡,2021年1月份时借用过贵公司的模块(没有配备散热片),那时候可以成功加载驱动,并且测试了yolo4 demo,

由于散热没有解决好,导致帧率只有4帧左右。

     现在我们已经解决散热问题,因此从贵公司重新借了一块思元220边缘加速卡,在加载驱动时会报错,以下是报错信息:

root@debian:~/neuware-mlu220m.2-driver-aarch64-4.4.6# 

root@debian:~/neuware-mlu220m.2-driver-aarch64-4.4.6# ./load_auto 

TO insmod module cambricon.

[  103.222966] cambricon_drv: loading out-of-tree module taints kernel.

[  103.270160] INFO: [cn_pci_set_dma_mask][679][CPU 2]: set pcie dma mask64 ok

[  103.277130] INFO: Domain: dm_bar_pcie2dm@604: id.device

[  103.284702] INFO: Domain: dm_bar_pcie2dm@616: 

[  103.289142] INFO: Domain: cn_dm_host_early_init@1537: FLOW: start

[  103.295233] INFO: Domain: dm_alloc_and_init_domain_set@1620: domain_set_type

[  103.304378] INFO: Domain: dm_alloc_and_init_domains@1598: allocation 1 function is host side.

[  103.312901] INFO: Domain: dm_domain_initialization@1133: domain(host side) function id

[  103.322640] INFO: Domain: dm_pci_cfg_initialization@524: init pci with data

[  103.338194] INFO: Domain: dm_domain_initialization@1137: domain[0]: init pcie as pf

[  103.345849] INFO: Domain: dm_dev_mem_cfg_initialization@491: dev_mem init with data

[  103.357758] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.371238] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.384538] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.397839] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.411137] INFO: Domain: dm_domain_initialization@1171:  DONE

[  103.416969] INFO: Domain: dm_alloc_and_init_domains@1598: allocation 2 function is host side.

[  103.425493] INFO: Domain: dm_domain_initialization@1133: domain(host side) function id

[  103.435238] INFO: Domain: dm_pci_cfg_initialization@524: init pci with data

[  103.450796] INFO: Domain: dm_domain_initialization@1137: domain[0]: init pcie as pf

[  103.458449] INFO: Domain: dm_dev_mem_cfg_initialization@491: dev_mem init with data

[  103.470359] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.483830] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.497126] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.510421] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.523716] INFO: Domain: dm_domain_initialization@1171:  DONE

[  103.529545] INFO: Domain: dm_domain_initialization@1133: domain(host side) function id

[  103.539283] INFO: Domain: dm_pci_cfg_initialization@524: init pci with data

[  103.554837] INFO: Domain: dm_domain_initialization@1145: domain[1]: init pcie as vf

[  103.562489] INFO: Domain: dm_dev_mem_cfg_initialization@491: dev_mem init with data

[  103.574398] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.587867] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.601165] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.614462] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.627758] INFO: Domain: dm_domain_initialization@1171:  DONE

[  103.633587] INFO: Domain: dm_alloc_and_init_domains@1598: allocation 2 function is host side.

[  103.642107] INFO: Domain: dm_domain_initialization@1133: domain(host side) function id

[  103.651846] INFO: Domain: dm_pci_cfg_initialization@524: init pci with data

[  103.667400] INFO: Domain: dm_domain_initialization@1137: domain[0]: init pcie as pf

[  103.675053] INFO: Domain: dm_dev_mem_cfg_initialization@491: dev_mem init with data

[  103.686962] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.700431] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.713728] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.727024] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.740321] INFO: Domain: dm_domain_initialization@1171:  DONE

[  103.746150] INFO: Domain: dm_domain_initialization@1133: domain(host side) function id

[  103.755886] INFO: Domain: dm_pci_cfg_initialization@524: init pci with data

[  103.771439] INFO: Domain: dm_domain_initialization@1145: domain[1]: init pcie as vf

[  103.779092] INFO: Domain: dm_dev_mem_cfg_initialization@491: dev_mem init with data

[  103.790999] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.804469] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.817766] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.831062] INFO: Domain: dm_processor_cfg_init@475: init processor

[  103.844357] INFO: Domain: dm_domain_initialization@1171:  DONE

[  103.850186] INFO: Domain: cn_dm_host_early_init@1545: domain_set_type

[  103.858186] INFO: Domain: dm_domain_print_pci@1940:     num_of_bar

[  103.864627] INFO: Domain: dm_domain_print_pci@1980:     bar

[  103.864627]      register( [0xffffffff], size[0xffffffff]) register total size[0xffffffff]),

[  103.864627]      share memory( [0xffffffff], size[0xffffffff]), reserved share memory( [0xffffffff], size[0xffff)

[  103.894509] INFO: Domain: dm_domain_print_pci@1984:     pci->ob->mask: 0xffffffff

[  103.901991] INFO: Domain: dm_domain_set_print@2099: dump domain_set

[  103.908253] INFO: Domain: dm_domain_set_print@2100: Upper pointer(core)

[  103.916599] INFO: Domain: dm_domain_set_print@2101: daemon_state

[  103.923210] INFO: Domain: dm_domain_set_print_domain@2063:   domain[OVERALL] magic

[  103.931816] INFO: Domain: dm_domain_set_print_domain@2065:   domain state[0x2: invalid]

[  103.939816] INFO: Domain: dm_domain_print_pu@2047:     processor

[  103.951028] INFO: Domain: dm_domain_print_pu@2047:     processor< ipu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  103.962154] INFO: Domain: dm_domain_print_pu@2047:     processor< vpu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  103.973279] INFO: Domain: dm_domain_print_pu@2047:     processor< jpu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  103.984405] INFO: Domain: dm_domain_set_print_domain@2085: domain

[  103.997962] INFO: Domain: dm_domain_print_dev_mem@2000: number of zones 0

[  104.004745] INFO: Domain: dm_domain_print_pci@1940:     num_of_bar

[  104.011183] INFO: Domain: dm_domain_print_pci@1980:     bar

[  104.011183]      register( [0x0], size[0x4000]) register total size[0x800000]),

[  104.011183]      share memory( [0x0], size[0x800000]), reserved share memory( [0x850000], size[0x4000])

[  104.037604] INFO: Domain: dm_domain_print_pci@1983:     pci->dma->ch: 0xf

[  104.044388] INFO: Domain: dm_domain_print_pci@1984:     pci->ob->mask: 0xfffffff0

[  104.051866] INFO: Domain: dm_domain_set_print@2111: domain

[  104.057783] INFO: Domain: dm_domain_set_print_domain@2063:   domain[PF] magic

[  104.065955] INFO: Domain: dm_domain_set_print_domain@2065:   domain state[0x1: undef]

[  104.073781] INFO: Domain: dm_domain_print_pu@2047:     processor

[  104.084995] INFO: Domain: dm_domain_print_pu@2047:     processor< ipu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  104.096120] INFO: Domain: dm_domain_print_pu@2047:     processor< vpu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  104.107244] INFO: Domain: dm_domain_print_pu@2047:     processor< jpu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  104.118379] INFO: Domain: dm_domain_set_print_domain@2085: domain

[  104.131935] INFO: Domain: dm_domain_print_dev_mem@2000: number of zones 0

[  104.138719] INFO: Domain: dm_domain_print_pci@1940:     num_of_bar

[  104.145157] INFO: Domain: dm_domain_print_pci@1980:     bar

[  104.145157]      register( [0xffffffff], size[0xffffffff]) register total size[0xffffffff]),

[  104.145157]      share memory( [0xffffffff], size[0xffffffff]), reserved share memory( [0xffffffff], size[0xffff)

[  104.175040] INFO: Domain: dm_domain_print_pci@1984:     pci->ob->mask: 0xffffffff

[  104.182518] INFO: Domain: dm_domain_set_print@2111: domain

[  104.188433] INFO: Domain: dm_domain_set_print_domain@2063:   domain[VF0] magic

[  104.196692] INFO: Domain: dm_domain_set_print_domain@2065:   domain state[0x1: undef]

[  104.204518] INFO: Domain: dm_domain_print_pu@2047:     processor

[  104.215735] INFO: Domain: dm_domain_print_pu@2047:     processor< ipu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  104.226859] INFO: Domain: dm_domain_print_pu@2047:     processor< vpu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  104.237985] INFO: Domain: dm_domain_print_pu@2047:     processor< jpu>: cores[0xffffffff] caps[0xffffffff] mems[0xffff]

[  104.249111] INFO: Domain: dm_domain_set_print_domain@2085: domain

[  104.262666] INFO: Domain: dm_domain_print_dev_mem@2000: number of zones 0

[  104.269449] INFO: Domain: dm_domain_print_pci@1940:     num_of_bar

[  104.275887] INFO: Domain: dm_domain_print_pci@1980:     bar

[  104.275887]      register( [0xffffffff], size[0xffffffff]) register total size[0xffffffff]),

[  104.275887]      share memory( [0xffffffff], size[0xffffffff]), reserved share memory( [0xffffffff], size[0xffff)

[  104.305769] INFO: Domain: dm_domain_print_pci@1984:     pci->ob->mask: 0xffffffff

[  104.313249] INFO: Domain: dm_print_type_size@2994: struct domain_type: 1176

[  104.320206] INFO: Domain: dm_print_type_size@2995: struct processor_data: 88

[  104.327250] INFO: Domain: dm_print_type_size@2996: struct dev_mem_data: 88

[  104.334120] INFO: Domain: dm_print_type_size@2997: struct pci_data: 88

[  104.340643] INFO: Domain: dm_print_type_size@2998: struct pmu_data: 88

[  104.347166] INFO: Domain: dm_get_domain_test@2954: Got domain

[  104.355514] INFO: Domain: dm_get_domain_test@2954: Got domain

[  104.363950] INFO: Domain: dm_get_domain_test@2958: Got all the 2 domains.

[  104.370733] INFO: Domain: cn_dm_host_early_init@1562: FLOW: done

[  104.376774] INFO: [c20e_pcie_shm_area_init][472][CPU 2]: share memory virt:0000000098749f3e, phy:0x1000800000, size:0x0

[  104.387999] INFO: [pcie_register_bar][126][CPU 2]: bat_type=0, bar_index=4, bar. =00000000ec02c767, bar.sz=200000

[  104.398516] INFO: [c20e_pcie_dma_pre_init][488][CPU 2]: get from domain mask:0xf

[  104.406994] INFO: [pci_hw_msi_enable][254][CPU 2]: MSK_ADDR_L:0x29930040

[  104.413692] INFO: [pci_hw_msi_enable][255][CPU 2]: MSK_ADDR_u:0x0

[  104.419782] INFO: [pci_hw_msi_enable][256][CPU 2]: MSK_data:0x0

[  104.425699] INFO: [pci_hw_msi_enable][281][CPU 2]: 0x2990001f

[  104.431453] INFO: [adjust_dev_param][121][CPU 2]: PCIe DEV_CONTROL_STATUS_REG :0x2810

[  104.439282] INFO: [adjust_dev_param][124][CPU 2]: PCIe DMA Capability and Version Register:1

[  104.447720] INFO: [adjust_dev_param][131][CPU 2]: PCIe 0x109234 value:10040a40 t:2

[  104.455315] INFO: [pci_hw_msi_enable][254][CPU 2]: MSK_ADDR_L:0x29930040

[  104.462012] INFO: [pci_hw_msi_enable][255][CPU 2]: MSK_ADDR_u:0x0

[  104.468100] INFO: [pci_hw_msi_enable][256][CPU 2]: MSK_data:0x0

[  104.474016] INFO: [pci_hw_msi_enable][281][CPU 2]: 0x2990001f

[  104.479844] INFO: [cn_proc_init][1378][CPU 2]: init OK!

[  104.485069] INFO: [Card0][cn_core_init_idx][2851][CPU 2]: core idx:0 pf_idx:0 vf_idx:0

[  104.492982] INFO: [Card0][cn_mcu_init][204][CPU 2]: mcu init

[  104.498642] INFO: [Card0][mcu_read_basic_info_mlu220][91][CPU 2]: DDR Training Params set by MCU Finish

[  104.498642] 

[  104.509516] INFO: [Card0][mcu_read_basic_info_mlu220][136][CPU 2]: board serial: 0000332010300469

[  104.509516] 

[  104.519861] INFO: [Card0][mcu_read_basic_info_mlu220][184][CPU 2]: board_model_name MLU220-M2 , board_model 0x10, peak8

[  104.531424] INFO: [Card0][mcu_read_basic_info_mlu220][200][CPU 2]: bus_width 64 ecc_support 0, stack_size 409

[  104.541334] INFO: [Card0][mcu_read_basic_info_mlu220][203][CPU 2]: sram_size 1572864, cache_size 1048576, kc_limit 4, 0

[  104.553068] INFO: [Card0][mcu_version_contorl][195][CPU 2]: MCU Ver: v1.2.0, Standard Ver: v1.0.0

[  104.561937] INFO: [Card0][mcu_version_contorl][218][CPU 2]: MCU Minor Version Not Match. Standard MCU Ver: v1.0.0

[  104.572197] INFO: [Card0][cn_mcu_init][227][CPU 2]: MCU Version: v1.2.0

[  104.572197] 

[  104.580285] INFO: [Card0][cn_mcc_init][75][CPU 2]: mcc init

[  104.585855] INFO: [Card0][__mcc_unit_init][62][CPU 2]: board mcc not support

[  104.592902] INFO: [Card0][smmuv2_init][113][CPU 2]: bar0 reg size = 4000000, mem size = 4000000

[  104.601599] INFO: [Card0][smmuv2_init][117][CPU 2]: C20L pcie smmu cau cnt = 25

[  104.608954] INFO: [Card0][cn_mm_init][3159][CPU 2]: phy total:0x400000000

[  104.615737] INFO: [Card0][cn_mm_init][3164][CPU 2]: vir total:0x10000000000

[  104.622696] INFO: [Card0][mempool_init][235][CPU 2]: create pool VA[ffff00000e800000] -> PA[1000800000] : SIZE[800000]

[  104.633391] INFO: [Card0][shm_reserved_init][857][CPU 2]: rpc_reserved:alloc host[ffff00000e800000]

[  104.645646] ERROR: [Card0][cn_device_share_mem_alloc][1499][CPU 2]: alloc share memory error

[  104.654082] INFO: [Card0][shm_reserved_init][857][CPU 2]: ipu_reserved:alloc host[0]

[  104.664947] ERROR: [Card0][cn_device_share_mem_alloc][1499][CPU 2]: alloc share memory error

[  104.673380] INFO: [Card0][shm_reserved_init][857][CPU 2]: param_reserved:alloc host[0]

[  104.684419] ERROR: [Card0][cn_device_share_mem_alloc][1499][CPU 2]: alloc share memory error

[  104.692853] INFO: [Card0][shm_reserved_init][857][CPU 2]: ipu_init_reserved:alloc host[0]

[  104.704154] ERROR: [Card0][cn_device_share_mem_alloc][1499][CPU 2]: alloc share memory error

[  104.712589] INFO: [Card0][shm_reserved_init][857][CPU 2]: commu_reserved:alloc host[0]

[  104.723646] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000

[  104.732428] Mem abort info:

[  104.735212]   ESR = 0x96000044

[  104.738263]   Exception class = DABT (current EL), IL = 32 bits

[  104.744177]   SET = 0, FnV = 0

[  104.747221]   EA = 0, S1PTW = 0

[  104.750359] Data abort info:

[  104.753235]   ISV = 0, ISS = 0x00000044

[  104.757066]   CM = 0, WnR = 1

[  104.760030] user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000dc84aca6

[  104.766640] [0000000000000000] pgd=0000000000000000

[  104.771515] Internal error: Oops: 96000044 [#1] PREEMPT SMP

[  104.777076] Modules  ed in: cambricon_drv(O+) btusb btrtl btintel btbcm bluetooth ecdh_generic rfkill crc32_ce crct6

[  104.790546] Process insmod (pid: 3226, stack limit = 0x00000000173fde39)

[  104.797237] CPU: 2 PID: 3226 Comm: insmod Tainted: G           O      4.19.115 #1

[  104.804708] Hardware name: FT-2000/4-D4-DSK Development Board (DT)

[  104.810877] pstate: 00000005 (nzcv daif -PAN -UAO)

[  104.815703] pc : ctrlq_alloc+0x34/0x50 [cambricon_drv]

[  104.820863] lr : cn_commu_pre_init+0x158/0x290 [cambricon_drv]

[  104.826684] sp : ffff0000237a3730

[  104.829986] x29: ffff0000237a3730 x28: 00000000006000c0 

[  104.835287] x27: ffff0000237a3dc0 x26: 0000000000000000 

[  104.840587] x25: 000000000220cabc x24: 0000000000000000 

[  104.845887] x23: ffff8022e9866c00 x22: ffff8022beda0080 

[  104.851187] x21: 0000000000000020 x20: 0000000000000000 

[  104.856487] x19: ffff8022e9bda000 x18: ffffffffffffffff 

[  104.861787] x17: 0000000000000000 x16: 0000000000000000 

[  104.867087] x15: ffffffffffffffff x14: ffff000000000000 

[  104.872387] x13: ffffffffffffffff x12: 0000000000000030 

[  104.877687] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f 

[  104.882987] x9 : 7f7f7f7f7f7f7f7f x8 : feff636475716472 

[  104.888287] x7 : 000000000000ffff x6 : 0000000000000000 

[  104.893587] x5 : ffff000000000000 x4 : 0000000000000000 

[  104.898887] x3 : 0000000000000000 x2 : 0000000000000020 

[  104.904187] x1 : 0000000000000000 x0 : 0000000000000001 

[  104.909487] Call trace:

[  104.911956]  ctrlq_alloc+0x34/0x50 [cambricon_drv]

[  104.916769]  cn_commu_pre_init+0x158/0x290 [cambricon_drv]

[  104.922278]  cn_core_probe+0x10c/0x378 [cambricon_drv]

[  104.927440]  cn_bus_probe+0x94/0xd0 [cambricon_drv]

[  104.932341]  cn_pci_probe+0x368/0x3e0 [cambricon_drv]

[  104.937384]  local_pci_probe+0x44/0xa8

[  104.941122]  pci_device_probe+0x130/0x1c0

[  104.945122]  really_probe+0x254/0x3b0

[  104.948772]  driver_probe_device+0x12c/0x148

[  104.953031]  __driver_attach+0x148/0x150

[  104.956943]  bus_for_each_dev+0x84/0xd8

[  104.960767]  driver_attach+0x30/0x40

[  104.964331]  bus_add_driver+0x174/0x2a8

[  104.968155]  driver_register+0x64/0x110

[  104.971979]  __pci_register_driver+0x58/0x68

[  104.976272]  cn_pci_drv_init+0x7c/0x88 [cambricon_drv]

[  104.981433]  cn_bus_driver_reg+0x34/0x58 [cambricon_drv]

[  104.986763]  cn_core_init+0x10c/0x1000 [cambricon_drv]

[  104.991891]  do_one_initcall+0x54/0x268

[  104.995717]  do_init_module+0x64/0x1dc

[  104.999454]  load_module+0x1fc0/0x2510

[  105.003191]  __se_sys_finit_module+0xf0/0x100

[  105.007536]  __arm64_sys_finit_module+0x24/0x30

[  105.012056]  el0_svc_common+0x88/0x180

[  105.015794]  el0_svc_handler+0x38/0x78

[  105.019531]  el0_svc+0x8/0xc

[  105.022401] Code: 52800020 a9007e74 29027e75 b9001a60 (b900029f) 

[  105.028483] ---[ end trace ea81472b243b0fb4 ]---


Message from syslogd@debian at Sep 14 14:38:21 ...

 kernel:[  104.771515] Internal error: Oops: 96000044 [#1] PREEMPT SMP


Message from syslogd@debian at Sep 14 14:38:21 ...

 kernel:[  104.790546] Process insmod (pid: 3226, stack limit = 0x00000000173fde39)


Message from syslogd@debian at Sep 14 14:38:21 ...

 kernel:[  105.022401] Code: 52800020 a9007e74 29027e75 b9001a60 (b900029f) 

./load_auto: line 73:  3226 Segmentation fault      /sbin/insmod ./$pcie_module.ko $*


测试环境如下:

     板卡主芯片是飞腾FT2004,arm64架构

     操作系统为Debian 10.07

     Linux内核版本4.19.115

     模块驱动版本为neuware-mlu220m.2-driver-aarch64-4.4.6,使用源码编译并且加载驱动

请帮忙分析一下问题

非常感谢

     


版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭