Skip to content

Why is test data mismatching in example_driver #54

@francoccc

Description

@francoccc

I've built the fpga.bit for Alveo U50 and written bitstream to the card. Then I loaded the mod of example_driver and it seemed to be running.
But unfortunately, I couldn't test the dma_cpl_buf_test because of the test data mismatching.

dmesg:

Details


[ 112.305279] edev 0000:18:00.0: Read status

[ 112.305281] edev 0000:18:00.0: 00000001

[ 4152.782667] edev 0000:18:00.0: edev remove

[ 4152.782671] edev 0000:18:00.0: Interrupt

[ 4152.782789] edev 0000:18:00.0: Unmapped BAR[0]

[ 4152.782791] edev 0000:18:00.0: Unmapped BAR[2]

[ 4152.782793] edev 0000:18:00.0: Unmapped BAR[4]

[ 4168.930886] edev 0000:18:00.0: edev probe

[ 4168.930888] edev 0000:18:00.0: Vendor: 0x1234

[ 4168.930888] edev 0000:18:00.0: Device: 0x0001

[ 4168.930889] edev 0000:18:00.0: Subsystem vendor: 0x10ee

[ 4168.930890] edev 0000:18:00.0: Subsystem device: 0x9037

[ 4168.930890] edev 0000:18:00.0: Class: 0x058000

[ 4168.930891] edev 0000:18:00.0: PCI ID: 0000:18:00.0

[ 4168.930895] edev 0000:18:00.0: Max payload size: 256 bytes

[ 4168.930895] edev 0000:18:00.0: Max read request size: 512 bytes

[ 4168.930896] edev 0000:18:00.0: Read completion boundary: 64 bytes

[ 4168.930897] edev 0000:18:00.0: Link capability: gen 3 x16

[ 4168.930897] edev 0000:18:00.0: Link status: gen 3 x8

[ 4168.930898] edev 0000:18:00.0: Relaxed ordering: enabled

[ 4168.930899] edev 0000:18:00.0: Phantom functions: disabled

[ 4168.930899] edev 0000:18:00.0: Extended tags: enabled

[ 4168.930900] edev 0000:18:00.0: No snoop: enabled

[ 4168.930900] edev 0000:18:00.0: NUMA node: 0

[ 4168.930905] edev 0000:18:00.0: 63.008 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x8 link at 0000:16:02.0 (capable of 126.016 Gb/s with 8.0 GT/s PCIe x16 link)

[ 4168.930908] edev 0000:18:00.0: Allocated DMA region virt 00000000be827f9a, phys 00000000f388d7f4

[ 4168.930918] edev 0000:18:00.0: BAR[0] 0x39fffe000000-0x39fffeffffff flags 0x0014220c

[ 4168.930919] edev 0000:18:00.0: BAR[2] 0x39fffd000000-0x39fffdffffff flags 0x0014220c

[ 4168.930920] edev 0000:18:00.0: BAR[4] 0x39ffff000000-0x39ffff00ffff flags 0x0014220c

[ 4168.930932] edev 0000:18:00.0: BAR[0] mapped at 0x000000004093ab23 with length 16777216

[ 4168.930937] edev 0000:18:00.0: BAR[2] mapped at 0x0000000075611646 with length 16777216

[ 4168.930940] edev 0000:18:00.0: BAR[4] mapped at 0x00000000da4696c3 with length 65536

[ 4168.931125] edev 0000:18:00.0: write to BAR2

[ 4168.931126] edev 0000:18:00.0: read from BAR2

[ 4168.931127] edev 0000:18:00.0: 11223344

[ 4168.931128] edev 0000:18:00.0: write test data

[ 4168.931129] edev 0000:18:00.0: read test data

[ 4168.931130] 00000000be827f9a: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................

[ 4168.931130] 000000004d7ca939: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................

[ 4168.931131] 000000000117967b: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f !"#$%&'()*+,-./

[ 4168.931132] 0000000037f89332: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 0123456789:;<=>?

[ 4168.931132] 00000000d1aee458: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f @abcdefghijklmno

[ 4168.931133] 000000008fb80d1c: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f PQRSTUVWXYZ[\]^_

[ 4168.931133] 00000000871e84fb: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f `abcdefghijklmno

[ 4168.931134] 00000000daee07c3: 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f pqrstuvwxyz{|}~.

[ 4168.931134] 000000006eafa1da: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f ................

[ 4168.931135] 00000000d3dd3f46: 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f ................

[ 4168.931135] 000000001ffff600: a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af ................

[ 4168.931136] 00000000e858a5ae: b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf ................

[ 4168.931136] 00000000e3ac005e: c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf ................

[ 4168.931137] 0000000062d160df: d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df ................

[ 4168.931137] 00000000c8c5069d: e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef ................

[ 4168.931138] 00000000ea855a29: f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff ................

[ 4168.931138] edev 0000:18:00.0: check DMA enable

[ 4168.931140] edev 0000:18:00.0: 00000001

[ 4168.931140] edev 0000:18:00.0: enable DMA

[ 4168.931141] edev 0000:18:00.0: check DMA enable

[ 4168.931142] edev 0000:18:00.0: 00000001

[ 4168.931142] edev 0000:18:00.0: enable interrupts

[ 4168.931143] edev 0000:18:00.0: start copy to card

[ 4168.931148] edev 0000:18:00.0: Interrupt

[ 4168.933737] edev 0000:18:00.0: Read status

[ 4168.933738] edev 0000:18:00.0: 00000001

[ 4168.933739] edev 0000:18:00.0: 800000aa

[ 4168.933740] edev 0000:18:00.0: start copy to host

[ 4168.933742] edev 0000:18:00.0: Interrupt

[ 4168.936621] edev 0000:18:00.0: Read status

[ 4168.936623] edev 0000:18:00.0: 00000001

[ 4168.936624] edev 0000:18:00.0: 80000055

[ 4168.936625] edev 0000:18:00.0: read test data

[ 4168.936626] 0000000058afc124: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

[ 4168.936626] 00000000a8eb7c77: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

[ 4168.936627] 000000006fd472b1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

[ 4168.936627] 000000003ec4c5b8: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

[ 4168.936628] 000000007fc4777f: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f @abcdefghijklmno

[ 4168.936628] 00000000abaa1662: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f PQRSTUVWXYZ[\]^_

[ 4168.936629] 00000000f70d419a: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f `abcdefghijklmno

[ 4168.936629] 0000000062f23c1e: 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f pqrstuvwxyz{|}~.

[ 4168.936630] 0000000068817542: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f ................

[ 4168.936631] 00000000931cb7b7: 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f ................

[ 4168.936631] 0000000020dda83f: a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af ................

[ 4168.936632] 00000000304a4f7d: b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf ................

[ 4168.936632] 00000000d60ca053: c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf ................

[ 4168.936633] 0000000007871f63: d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df ................

[ 4168.936633] 00000000ac8249b3: e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef ................

[ 4168.936634] 000000001232ed2a: f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff ................

[ 4168.936634] edev 0000:18:00.0: test data mismatch

[ 4168.936635] edev 0000:18:00.0: start immediate write to host

[ 4168.936637] edev 0000:18:00.0: Interrupt

[ 4168.939621] edev 0000:18:00.0: Read status

[ 4168.939622] edev 0000:18:00.0: 00000001

[ 4168.939623] edev 0000:18:00.0: 800000aa

[ 4168.939624] edev 0000:18:00.0: read data

[ 4168.939625] 11 22 33 44 ."3D

[ 4168.939625] edev 0000:18:00.0: Read status

[ 4168.939626] edev 0000:18:00.0: 00000001

I don't know why the first 64 bytes (dma_region + 0x200) are all zero! It really confused me for a long time. I want to know which possible reasons caused it and how to deal with it.

Thx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions