This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM64X: access PCIE mapped memory

Part Number: PROCESSOR-SDK-AM64X

Hi,TI team

I try to test PCIE on AM64x EVM + Processor SDK Linux for AM64X 08_00_00_21 with following:

1. plug a PCIE x1 Networkcontroller card into PCIE slot on AM64x EVM, power on

2. After kernel boot up, using lspci to list pcie device which works fine, the network device is found, and BAR0 assigned with 0x68100000

3. reading memory with devmem2 0x68100000 results Unhandled Exception in EL3,.....

It's apreciated for any help for me to figure out the cause of this problem. Thanks vey much

Cheng Shi

  • Hi Cheng,

    I think I am able to reproduce the same issue with a Realtek PCIe Ethernet card. I am looking into it to understand what causes the issue.

    Meanwhile can you please attach your full dmesg log before running devmem2 command, and the devmem2 command output log which shows the EL3 exception?

  • root@am64xx-evm:~/pciutils# ./lspci -v
    00:00.0 Class 0604: Device 104c:b010
    Flags: bus master, fast devsel, latency 0, IRQ 42
    Memory at <unassigned> (64-bit, prefetchable)
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
    I/O behind bridge: 68002000-68002fff [size=4K]
    Memory behind bridge: 68100000-687fffff [size=7M]
    Prefetchable memory behind bridge: [disabled]
    Capabilities: [80] Power Management version 3
    Capabilities: [90] MSI: Enable+ Count=1/1 Maskable+ 64bit+
    Capabilities: [b0] MSI-X: Enable- Count=1 Masked-
    Capabilities: [c0] Express Root Port (Slot+), MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [150] Device Serial Number 00-00-00-00-00-00-00-00
    Capabilities: [300] Secondary PCI Express
    Capabilities: [4c0] Virtual Channel
    Capabilities: [900] L1 PM Substates
    Capabilities: [a20] Precision Time Measurement
    Kernel driver in use: pcieport

    01:00.0 Class 0200: Device 8086:10a7 (rev 02)
    Subsystem: Device 1d1a:0000
    Flags: fast devsel
    Memory at 68100000 (32-bit, non-prefetchable) [disabled] [size=128K]
    Memory at 68200000 (32-bit, non-prefetchable) [disabled] [size=2M]
    I/O ports at 1000 [disabled] [size=32]
    Memory at 68140000 (32-bit, non-prefetchable) [disabled] [size=16K]
    Expansion ROM at 68400000 [virtual] [disabled] [size=2M]
    Capabilities: [40] Power Management version 2
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [60] MSI-X: Enable- Count=10 Masked-
    Capabilities: [a0] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Device Serial Number 2c-53-4a-ff-ff-02-ff-b0

    01:00.1 Class 0200: Device 8086:10a7 (rev 02)
    Subsystem: Device 1d1a:0000
    Flags: fast devsel
    Memory at 68120000 (32-bit, non-prefetchable) [disabled] [size=128K]
    Memory at 68600000 (32-bit, non-prefetchable) [disabled] [size=2M]
    I/O ports at 1020 [disabled] [size=32]
    Memory at 68144000 (32-bit, non-prefetchable) [disabled] [size=16K]
    Capabilities: [40] Power Management version 2
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [60] MSI-X: Enable- Count=10 Masked-
    Capabilities: [a0] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Device Serial Number 2c-53-4a-ff-ff-02-ff-b0

    root@am64xx-evm:~/pciutils# ./devmem2 0x68100000
    /dev/mem opened.Unhandled Exception in EL3.
    x30 = 0x00000000701c0e6c
    x0 = 0x0000ffffa7a60000
    x1 = 0x0000ffffa7a60000
    x2 = 0x0000000000000000
    x3 = 0x0000000000000000
    x4 = 0x0000000000000000
    x5 = 0x000000002bb402c9
    x6 = 0x000000000000002e
    x7 = 0x000000000000000a
    x8 = 0x0000000000000040
    x9 = 0xffffff80ffffffc8
    x10 = 0x0000000000000000
    x11 = 0x0000ffffec13ee50
    x12 = 0x000000000000000c
    x13 = 0x0000000000000010
    x14 = 0x0000000000000001
    x15 = 0x0000000000000000
    x16 = 0x0000000000412058
    x17 = 0x0000ffffa7950d58
    x18 = 0x0000000000000000
    x19 = 0x0000000000400df0
    x20 = 0x0000000000000000
    x21 = 0x00000000004008f0
    x22 = 0x0000000000000000
    x23 = 0x0000000000000000
    x24 = 0x0000000000000000
    x25 = 0x0000000000000000
    x26 = 0x0000000000000000
    x27 = 0x0000000000000000
    x28 = 0x0000000000000000
    x29 = 0x0000ffffec13ef60
    scr_el3 = 0x000000000000073d
    sctlr_el3 = 0x0000000030cd183f
    cptr_el3 = 0x0000000000000000
    tcr_el3 = 0x0000000080803520
    daif = 0x00000000000002c0
    mair_el3 = 0x00000000004404ff
    spsr_el3 = 0x0000000060000000
    elr_el3 = 0x0000000000400c34
    ttbr0_el3 = 0x00000000701cd780
    esr_el3 = 0x0000000092000010
    far_el3 = 0x0000ffffa7a60000
    spsr_el1 = 0x0000000020000000
    elr_el1 = 0x0000ffffa79ae3d0
    spsr_abt = 0x0000000000000000
    spsr_und = 0x0000000000000000
    spsr_irq = 0x0000000000000000
    spsr_fiq = 0x0000000000000000
    sctlr_el1 = 0x0000000034d4d91d
    actlr_el1 = 0x0000000000000000
    cpacr_el1 = 0x0000000000300000
    csselr_el1 = 0x0000000000000000
    sp_el1 = 0xffff80001ab30000
    esr_el1 = 0x0000000056000000
    ttbr0_el1 = 0x00000000a6120800
    ttbr1_el1 = 0x0b0a000082f10000
    mair_el1 = 0x000c0400bb44ffff
    amair_el1 = 0x0000000000000000
    tcr_el1 = 0x00000032f5d07590
    tpidr_el1 = 0xffff80006ed30000
    tpidr_el0 = 0x0000ffffa7ad30a0
    tpidrro_el0 = 0x0000000000000000
    par_el1 = 0x0000000000000000
    mpidr_el1 = 0x0000000080000000
    afsr0_el1 = 0x0000000000000000
    afsr1_el1 = 0x0000000000000000
    contextidr_el1 = 0x0000000000000000
    vbar_el1 = 0xffff800010010800
    cntp_ctl_el0 = 0x0000000000000005
    cntp_cval_el0 = 0x000000097ca9bc18
    cntv_ctl_el0 = 0x0000000000000000
    cntv_cval_el0 = 0x0000000000000000
    cntkctl_el1 = 0x00000000000000d6
    sp_el0 = 0x0000ffffec13ef60
    isr_el1 = 0x0000000000000040
    dacr32_el2 = 0x0000000000000000
    ifsr32_el2 = 0x0000000000000000
    cpuectlr_el1 = 0x0000000000000040
    cpumerrsr_el1 = 0x00000000000c0479
    l2merrsr_el1 = 0x0000000011004200
    cpuactlr_el1 = 0x00001000090ca000
    [ 194.913366] omap_i2c 20010000.i2c: controller timed out
    [ 194.913399] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 195.969441] omap_i2c 20010000.i2c: controller timed out
    [ 197.025516] omap_i2c 20010000.i2c: controller timed out
    [ 197.025573] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 198.049586] omap_i2c 20010000.i2c: controller timed out
    [ 199.105661] omap_i2c 20010000.i2c: controller timed out
    [ 199.105715] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 200.129723] omap_i2c 20010000.i2c: controller timed out
    [ 201.185797] omap_i2c 20010000.i2c: controller timed out
    [ 201.185853] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 202.209855] omap_i2c 20010000.i2c: controller timed out
    [ 203.265926] omap_i2c 20010000.i2c: controller timed out
    [ 203.265983] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 204.289984] omap_i2c 20010000.i2c: controller timed out
    [ 205.346051] omap_i2c 20010000.i2c: controller timed out
    [ 205.346108] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 206.370109] omap_i2c 20010000.i2c: controller timed out
    [ 207.426182] omap_i2c 20010000.i2c: controller timed out
    [ 207.426237] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 208.450232] omap_i2c 20010000.i2c: controller timed out
    [ 209.506290] omap_i2c 20010000.i2c: controller timed out
    [ 209.506345] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 210.530344] omap_i2c 20010000.i2c: controller timed out
    [ 211.586404] omap_i2c 20010000.i2c: controller timed out
    [ 211.586462] ssd1307fb 1-003c: Couldn't send I2C command.
    [ 212.610455] omap_i2c 20010000.i2c: controller timed out
    [ 213.666515] omap_i2c 20010000.i2c: controller timed out
    [ 213.666573] ssd1307fb 1-003c: Couldn't send I2C command.

    then system is crashed.

  • Hi,

    Memory at 68100000 (32-bit, non-prefetchable) [disabled] [size=128K]

    this memory region is not enabled for access. The 'lspci -v' output also doesn't show "Kernel driver in use" at the end of the network card. Did you enable the network driver for the PICe card you use?

  • Hi, Bin Liu

    After applying pcie device driver to enable the pcie device, it can access registers in pcie device indeed.

    Thanks for your help.

    Cheng Shi