UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor yair
Visitor
514 Views
Registered: ‎06-03-2018

eMMC - Linux kernel crush when writing big files to eMMC

Hi,

I'm using linux 4.14.0, The eMMC is working e.g. I'm able to create partitions , to mount them and to read & write files.

The issue is when I'm trying  to handle big files (100MB and so) the entire kernel crush (see msg below).

 

- Linux menuconfig screenshot is attached

Boot print out:

[ 1.524413] mmc0: error -110 whilst initialising MMC card
[ 1.632136] mmc0: new high speed MMC card at address 0001
[ 1.637680] mmcblk0: mmc0:0001 R1J58L 55.1 GiB
[ 1.642206] mmcblk0boot0: mmc0:0001 R1J58L partition 1 16.0 MiB
[ 1.648130] mmcblk0boot1: mmc0:0001 R1J58L partition 2 16.0 MiB
[ 1.654098] mmcblk0rpmb: mmc0:0001 R1J58L partition 3 128 KiB
[ 1.660600] mmcblk0: p1 p2 p3

 

Device Tree:

nvmem_firmware {
    compatible = "xlnx,zynqmp-nvmem-fw";
    #address-cells = <1>;
    #size-cells = <1>;

    soc_revision: soc_revision@0 {
        reg = <0x0 0x4>;
    };

};


power-domains {
    compatible = "xlnx,zynqmp-genpd";
    pd_sd0: pd-sd0 {
        #power-domain-cells = <0x0>;
        pd-id = <0x27>;
    };
};

amba: amba {
    compatible = "simple-bus";
    u-boot,dm-pre-reloc;
    #address-cells = <2>;
    #size-cells = <2>;
    ranges;

    smmu: smmu@fd800000 {
        compatible = "arm,mmu-500";
        reg = <0x0 0xfd800000 0x0 0x20000>;
        #iommu-cells = <1>;
        status = "disabled";
        #global-interrupts = <1>;
        interrupt-parent = <&gic>;
        interrupts = <0 155 4>,
        <0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
        <0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
        <0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
        <0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>;
    };

    sdhci0: sdhci@ff160000 {
        u-boot,dm-pre-reloc;
        compatible = "arasan,sdhci-8.9a";
        status = "disabled";
        interrupt-parent = <&gic>;
        interrupts = <0 48 4>;
        reg = <0x0 0xff160000 0x0 0x1000>;
        clock-names = "clk_xin", "clk_ahb";
        xlnx,device_id = <0>;
        #stream-id-cells = <1>;
        iommus = <&smmu 0x870>;
        power-domains = <&pd_sd0>;
        nvmem-cells = <&soc_revision>;
        nvmem-cell-names = "soc_revision";
    };
};

/* SD1 with level shifter */
&sdhci0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_sdhci0_default>;   
    xlnx,mio_bank = <1>;
};

 

- Crush Message

[ 26.610404] mmc0: ADMA error
[ 26.613212] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 26.619632] mmc0: sdhci: Sys addr: 0x00000400 | Version: 0x00001002
[ 26.626054] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000100
[ 26.632478] mmc0: sdhci: Argument: 0x05444340 | Trn mode: 0x0000003b
[ 26.638901] mmc0: sdhci: Present: 0x1ff70206 | Host ctl: 0x0000001f
[ 26.645324] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[ 26.651747] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 26.658170] mmc0: sdhci: Timeout: 0x00000006 | Int stat: 0x00000000
[ 26.664594] mmc0: sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
[ 26.671017] mmc0: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 26.677440] mmc0: sdhci: Caps: 0x75ec3281 | Caps_1: 0x00002007
[ 26.683863] mmc0: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 26.690286] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0xffffffff
[ 26.696709] mmc0: sdhci: Resp[2]: 0x320f5913 | Resp[3]: 0x00000900
[ 26.703132] mmc0: sdhci: Host ctl2: 0x0000008b
[ 26.707560] mmc0: sdhci: ADMA Err: 0x00000001 | ADMA Ptr: 0x0000000070054248
[ 26.714676] mmc0: sdhci: ============================================
[ 26.721147] Unable to handle kernel paging request at virtual address ffffff8008c76004
[ 26.728998] Mem abort info:
[ 26.731777] Exception class = DABT (current EL), IL = 32 bits
[ 26.737678] SET = 0, FnV = 0
[ 26.740716] EA = 0, S1PTW = 0
[ 26.743840] Data abort info:
[ 26.746705] ISV = 0, ISS = 0x00000007
[ 26.750525] CM = 0, WnR = 0
[ 26.753479] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff8008b7a000
[ 26.760247] [ffffff8008c76004] *pgd=000000087fffe003, *pud=000000087fffe003, *pmd=000000087b8d6003, *pte=0000000000000000
[ 26.771185] Internal error: Oops: 96000007 [#1] SMP
[ 26.776045] Modules linked in:
[ 26.779087] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0 #39
[ 26.785071] Hardware name: ZynqMP ZCU102 RevB (DT)
[ 26.789846] task: ffffff800890f580 task.stack: ffffff8008900000
[ 26.795757] PC is at sdhci_irq+0x478/0x900
[ 26.799829] LR is at sdhci_irq+0x464/0x900
[ 26.803908] pc : [<ffffff800854fa38>] lr : [<ffffff800854fa24>] pstate: 800001c5
[ 26.811285] sp : ffffff8008003df0
[ 26.814583] x29: ffffff8008003df0 x28: 0000000000000000
[ 26.819878] x27: 0000000002000000 x26: ffffffc87ae2a600
[ 26.825173] x25: 0000000002ff003f x24: 0000000000000000
[ 26.830467] x23: 00000000fd006e00 x22: 00000000000f0001
[ 26.835762] x21: 000000000270003e x20: ffffffc87b096600
[ 26.841057] x19: 0000000000000010 x18: 0000000000000010
[ 26.846352] x17: 0000000000000000 x16: 0000000000000000
[ 26.851647] x15: ffffffffffffffff x14: ffffff8088970927
[ 26.856941] x13: ffffff8008908aa0 x12: ffffff8008412800
[ 26.862236] x11: 0000000005f5e0ff x10: 0000000000000006
[ 26.867531] x9 : 00000000ffffffd0 x8 : 3d3d3d3d3d3d3d3d
[ 26.872826] x7 : 3d3d3d3d3d3d3d3d x6 : 00000000000000f6
[ 26.878120] x5 : 0000000000000001 x4 : 0000000002008000
[ 26.883415] x3 : ffffff8008c76010 x2 : 0000000000000000
[ 26.888710] x1 : fffffffffffffff4 x0 : 000000000000000c
[ 26.894006] Process swapper/0 (pid: 0, stack limit = 0xffffff8008900000)
[ 26.900689] Call trace:
[ 26.903122] Exception stack(0xffffff8008003cb0 to 0xffffff8008003df0)
[ 26.909544] 3ca0: 000000000000000c fffffffffffffff4
[ 26.917356] 3cc0: 0000000000000000 ffffff8008c76010 0000000002008000 0000000000000001
[ 26.925168] 3ce0: 00000000000000f6 3d3d3d3d3d3d3d3d 3d3d3d3d3d3d3d3d 00000000ffffffd0
[ 26.932980] 3d00: 0000000000000006 0000000005f5e0ff ffffff8008412800 ffffff8008908aa0
[ 26.940792] 3d20: ffffff8088970927 ffffffffffffffff 0000000000000000 0000000000000000
[ 26.948604] 3d40: 0000000000000010 0000000000000010 ffffffc87b096600 000000000270003e
[ 26.956416] 3d60: 00000000000f0001 00000000fd006e00 0000000000000000 0000000002ff003f
[ 26.964228] 3d80: ffffffc87ae2a600 0000000002000000 0000000000000000 ffffff8008003df0
[ 26.972040] 3da0: ffffff800854fa24 ffffff8008003df0 ffffff800854fa38 00000000800001c5
[ 26.979852] 3dc0: 00000000000000f5 3030307830203a72 0000008000000000 ffffff800854fa24
[ 26.987663] 3de0: ffffff8008003df0 ffffff800854fa38
[ 26.992527] [<ffffff800854fa38>] sdhci_irq+0x478/0x900
[ 26.997651] [<ffffff80080dacac>] __handle_irq_event_percpu+0x5c/0x148
[ 27.004070] [<ffffff80080dadb4>] handle_irq_event_percpu+0x1c/0x58
[ 27.010232] [<ffffff80080dae34>] handle_irq_event+0x44/0x78
[ 27.015789] [<ffffff80080deaf0>] handle_fasteoi_irq+0xa0/0x178
[ 27.021603] [<ffffff80080d9dec>] generic_handle_irq+0x24/0x38
[ 27.027332] [<ffffff80080da484>] __handle_domain_irq+0x5c/0xb0
[ 27.033149] [<ffffff80080814e4>] gic_handle_irq+0x64/0xc0
[ 27.038528] Exception stack(0xffffff8008903d80 to 0xffffff8008903ec0)
[ 27.044952] 3d80: 0000000000000000 ffffff8008906b80 0000000000a487af 0000000000000000
[ 27.052764] 3da0: 0000000008888887 00ffffffffffffff 0000000065d0d6e9 0000000000000001
[ 27.060576] 3dc0: 00000000000001c0 ffffff8008082000 0000000000001000 0000000000000000
[ 27.068388] 3de0: 0000000034d5d91d 0000004877684000 ffffff800890f580 0000000000000000
[ 27.076200] 3e00: 0000000000000000 0000000000000000 0000000000000000 00000006321a490b
[ 27.084012] 3e20: 0000000000000001 ffffffc87a93e800 0000000000000001 ffffffc87a81cc00
[ 27.091825] 3e40: 0000000630c32d43 ffffffc87a81cc00 ffffff800890f580 0000000000000400
[ 27.099636] 3e60: 0000000000890018 ffffff8008903ec0 ffffff8008533588 ffffff8008903ec0
[ 27.107448] 3e80: ffffff80085335c8 0000000040000145 ffffffc87a81cc60 0000000000000001
[ 27.115261] 3ea0: ffffffffffffffff 0000000000000001 ffffff8008903ec0 ffffff80085335c8
[ 27.123073] [<ffffff80080830f0>] el1_irq+0xb0/0x140
[ 27.127936] [<ffffff80085335c8>] cpuidle_enter_state+0x158/0x1f8
[ 27.133923] [<ffffff80085336a0>] cpuidle_enter+0x18/0x20
[ 27.139218] [<ffffff80080cef34>] call_cpuidle+0x1c/0x38
[ 27.144425] [<ffffff80080cf178>] do_idle+0x1a0/0x1d8
[ 27.149373] [<ffffff80080cf320>] cpu_startup_entry+0x20/0x28
[ 27.155017] [<ffffff80086917d4>] rest_init+0xac/0xb8
[ 27.159964] [<ffffff8008890b78>] start_kernel+0x398/0x3ac
[ 27.165346] Code: b94087a4 f94047a3 cb0003e1 8b000063 (78616862)
[ 27.171420] ---[ end trace ce91f823f6f6526a ]---
[ 27.176020] Kernel panic - not syncing: Fatal exception in interrupt
[ 27.182358] SMP: stopping secondary CPUs
[ 27.186327] Kernel Offset: disabled
[ 27.189735] CPU features: 0x002004
[ 27.193118] Memory Limit: none
[ 27.196158] ---[ end Kernel panic - not syncing: Fatal exception in interrupt

 

Does anyone know how to fix this ?

 

 

menuconfig.png
0 Kudos
1 Reply
Explorer
Explorer
427 Views
Registered: ‎06-03-2015

Re: eMMC - Linux kernel crush when writing big files to eMMC

Hi

Based on error log, take PC as input 

debug the issue using arm-linux-gnueabi-add2rline -e -f <PC value > vmlinux 

this provide information on, file name, function name,line no.

you can fix the issue, if it is really w.r.t to Code,

or if you are using working version of code, please check next version of driver(do git pull on existing branch) and use the same.

 

Thanks & Regards

Satish G  

G Satish Kumar
0 Kudos