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.

Linux/AM5728: PCIe bus fails to initialize

Part Number: AM5728


Tool/software: Linux

Hi, 

I'm developing on am5728 a realtime linux OS.

I tried connecting a realtek network adapter to the PCIe slot and quickly discovered that there are known issues:

e2e.ti.com/.../2383314

I'm using kernel 4.9.65 with rt-preempt patch. lspci shows nothing and dmesg shows errors:

root@am57xx-evm:~# dmesg | grep -i pci

[ 0.690382] PCI: CLS 0 bytes, default 64
[ 0.712427] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.3
[ 0.712591] dra7-pcie 51000000.pcie: GPIO lookup for consumer (null)
[ 0.712598] dra7-pcie 51000000.pcie: using device tree for GPIO lookup
[ 0.712627] dra7-pcie 51000000.pcie: lookup for GPIO (null) failed
[ 0.712635] dra7-pcie 51000000.pcie: gpio request failed, ret -517
[ 0.712770] dra7-pcie 51000000.pcie: Dropping the link to phy-4a094000.pciephy.3
[ 0.712802] dra7-pcie 51000000.pcie: probe deferral not supported
root@am57xx-evm:~#

Is there a remedy?

thanks a lot.

  • Hi, Nir,

    Are you running on a TI EVM or your custom board? Can you attach the console boot logs?

    Rex
  • U-Boot SPL 2017.01-gc68ed086bd (Jul 19 2018 - 18:17:01)
    DRA752-GP ES2.0
    Trying to boot from MMC1
    ** First descriptor is NOT a primary desc on 1:1 **
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    
    
    U-Boot 2017.01-gc68ed086bd (Jul 19 2018 - 18:17:01 +0300)
    
    CPU  : DRA752-GP ES2.0
    Model: TI AM5728 IDK
    Board: AM572x IDK REV 1.3B
    DRAM:  2 GiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    ** First descriptor is NOT a primary desc on 1:1 **
    GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
    part_get_info_efi: *** ERROR: Invalid GPT ***
    GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
    part_get_info_efi: *** ERROR: Invalid Backup GPT ***
    SCSI:  SATA link 0 timeout.
    AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
    scanning bus for devices...
    Found 0 device(s).
    Net:   eth0: ethernet@48484000
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc0 is current device
    reading uEnv.txt
    1525 bytes read in 4 ms (372.1 KiB/s)
    Importing environment from mmc0 ...
    3710536 bytes read in 271 ms (13.1 MiB/s)
    106860 bytes read in 148 ms (705.1 KiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8ffe2000, end 8ffff16b ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.65-rt23-g7069a470d5 (stx-ti@stxti-3I610DW) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #194 SMP PREEMPT RT Mon Aug 13 13:11:52 IDT 2018
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [    0.000000] CPU: div instructions available: patching division code
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] OF: fdt:Machine model: TI AM5728 IDK
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
    [    0.000000] OF: reserved mem: initialized node ipu2_cma@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
    [    0.000000] OF: reserved mem: initialized node dsp1_cma@99000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009d000000, size 32 MiB
    [    0.000000] OF: reserved mem: initialized node ipu1_cma@9d000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB
    [    0.000000] OF: reserved mem: initialized node dsp2_cma@9f000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 24 MiB at 0x00000000fe400000
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] OMAP4: Map 0x00000000ffd00000 to fe600000 for dram barrier
    [    0.000000] DRA752 ES2.0
    [    0.000000] percpu: Embedded 13 pages/cpu @d4532000 s20576 r8192 d24480 u53248
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 406674
    [    0.000000] Kernel command line: console=ttyO2,115200n8 root=PARTUUID=af23ac91-02 rw rootfstype=ext4 rootwait vmalloc=512M
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 1411852K/1631232K available (8192K kernel code, 322K rwdata, 2472K rodata, 2048K init, 340K bss, 30964K reserved, 188416K cma-reserved, 1090560K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0000000 - 0xff800000   ( 504 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xdf800000   ( 504 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0a00000   (10208 kB)
    [    0.000000]       .init : 0xc0e00000 - 0xc1000000   (2048 kB)
    [    0.000000]       .data : 0xc1000000 - 0xc1050a20   ( 323 kB)
    [    0.000000]        .bss : 0xc1052000 - 0xc10a7358   ( 341 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  RCU kthread priority: 1.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] omap5_realtime_timer_init(): in
    [    0.000000] omap4_sync32k_timer_init(): in
    [    0.000000] __omap_sync32k_timer_init(): in: clkev_nr = 1, clkev_src = timer_32k_ck, clkev_prop = ti,timer-alwon
    [    0.000000] __omap_sync32k_timer_init(): in: clksrc_nr = 2, clksrc_src = sys_clkin_ck, clksrc_prop = (null), gptimer = 0
    [    0.000000] omap_dmtimer_init(): in
    [    0.000000] omap_dmtimer_init(): out
    [    0.000000] omap2_gp_clockevent_init(): in: gptimer_id = 1, fck_source = timer_32k_ck, property = ti,timer-alwon
    [    0.000000] omap_dm_timer_init_one(): in
    [    0.000000] omap_dm_timer_init_one(): out
    [    0.000000] omap2_gp_timer_shutdown(): done
    [    0.000000] omap2_gp_timer_set_periodic(): clkev.rate = 32786, period = 326
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] omap2_gp_clockevent_init(): out
    [    0.000000] __omap_sync32k_timer_init(): -> omap2_gptimer_clocksource_init
    [    0.000000] omap2_gptimer_clocksource_init(): gptimer_id = 2, fck_source = sys_clkin_ck, property = (null)
    [    0.000000] omap_dm_timer_init_one(): in
    [    0.000000] omap_dm_timer_init_one(): out
    [    0.000005] sched_clock: 32 bits at 20MHz, resolution 50ns, wraps every 107374182375ns
    [    0.000012] clocksource: timer3: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 95563022313 ns
    [    0.000015] OMAP clocksource: timer3 at 20000000 Hz
    [    0.000017] omap2_gptimer_clocksource_init(): out
    [    0.000019] __omap_sync32k_timer_init(): out
    [    0.000020] omap4_sync32k_timer_init(): out
    [    0.000022] omap5: realtime_timer_init(): in
    [    0.000042] omap5: realtime_timer_init(): out
    [    0.000242] omap2_gp_timer_shutdown(): done
    [    0.000248] omap2_gp_timer_shutdown(): done
    [    0.000459] arm_arch_timer: Architected cp15 timer(s) running at 6.14MHz (phys).
    [    0.000468] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
    [    0.000475] Switching to timer-based delay loop, resolution 162ns
    [    0.000769] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000772] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.001113] omap5_realtime_timer_init(): out
    [    0.001190] Console: colour dummy device 80x30
    [    0.001340] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
    [    0.001342] This ensures that you still see kernel messages. Please
    [    0.001343] update your kernel commandline.
    [    0.001360] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.001363] pid_max: default: 32768 minimum: 301
    [    0.001460] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.001465] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.002096] CPU: Testing write buffer coherency: ok
    [    0.002286] /cpus/cpu@0 missing clock-frequency property
    [    0.002322] /cpus/cpu@1 missing clock-frequency property
    [    0.002332] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.002351] Setting up static identity map for 0x80200000 - 0x80200060
    [    0.120628] EFI services will not be available.
    [    0.240850] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.240985] Brought up 2 CPUs
    [    0.240998] SMP: Total of 2 processors activated (24.59 BogoMIPS).
    [    0.241006] CPU: All CPU(s) started in HYP mode.
    [    0.241012] CPU: Virtualization extensions available.
    [    0.241491] devtmpfs: initialized
    [    0.271095] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.271319] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.271336] futex hash table entries: 512 (order: 3, 32768 bytes)
    [    0.274999] pinctrl core: initialized pinctrl subsystem
    [    0.275886] NET: Registered protocol family 16
    [    0.277036] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.278082] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.495661] OMAP GPIO hardware version 0.1
    [    0.506948] irq: no irq domain found for /ocp/l4@4a000000/scm@2000/pinmux@1400 !
    [    0.532179] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.532191] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.532209] omap2_dm_timer_init(): in
    [    0.532216] omap2_dm_timer_init(): of_have_populated_dt failed
    [    0.532562] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [    0.532571] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [    0.533226] OMAP DMA hardware revision 0.0
    [    0.553226] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [    0.554662] edma 43300000.edma: memcpy is disabled
    [    0.559564] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.563679] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [    0.563928] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [    0.564172] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.564406] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.564758] omap-iommu 41501000.mmu: 41501000.mmu registered
    [    0.565017] omap-iommu 41502000.mmu: 41502000.mmu registered
    [    0.567657] palmas 0-0058: Irq flag is 0x00000004
    [    0.592907] palmas 0-0058: Muxing GPIO 2f, PWM 0, LED 0
    [    0.596117] SMPS3: supplied by VMAIN
    [    0.599497] SMPS6: supplied by VMAIN
    [    0.601315] SMPS7: supplied by VMAIN
    [    0.603269] SMPS8: supplied by VMAIN
    [    0.604498] random: fast init done
    [    0.604675] SMPS9: supplied by VMAIN
    [    0.605637] V3_3D: supplied by smps9
    [    0.605876] vtt_fixed: supplied by V3_3D
    [    0.606006] LDO1: supplied by VMAIN
    [    0.612016] LDO2: supplied by VMAIN
    [    0.621861] LDO3: supplied by VMAIN
    [    0.631864] LDO4: supplied by VMAIN
    [    0.644111] LDO9: supplied by VMAIN
    [    0.652303] LDOLN: supplied by VMAIN
    [    0.661999] LDOUSB: supplied by VMAIN
    [    0.675173] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.675364] media: Linux media interface: v0.10
    [    0.675417] Linux video capture interface: v2.00
    [    0.675452] pps_core: LinuxPPS API ver. 1 registered
    [    0.675459] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.675479] PTP clock support registered
    [    0.675511] EDAC MC: Ver: 3.0.0
    [    0.676471] omap-mailbox 4883c000.mailbox: omap mailbox rev 0x400
    [    0.676768] omap-mailbox 4883e000.mailbox: omap mailbox rev 0x400
    [    0.677075] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [    0.677377] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [    0.677707] Advanced Linux Sound Architecture Driver Initialized.
    [    0.678543] clocksource: Switched to clocksource arch_sys_counter
    [    0.688841] NET: Registered protocol family 2
    [    0.689376] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.689420] TCP bind hash table entries: 4096 (order: 4, 114688 bytes)
    [    0.689557] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.689610] UDP hash table entries: 256 (order: 2, 16384 bytes)
    [    0.689643] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
    [    0.689808] NET: Registered protocol family 1
    [    0.690128] RPC: Registered named UNIX socket transport module.
    [    0.690137] RPC: Registered udp transport module.
    [    0.690144] RPC: Registered tcp transport module.
    [    0.690151] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.691102] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.693867] workingset: timestamp_bits=14 max_order=19 bucket_order=5
    [    0.701700] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.702429] NFS: Registering the id_resolver key type
    [    0.702456] Key type id_resolver registered
    [    0.702465] Key type id_legacy registered
    [    0.702507] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.703730] bounce: pool size: 64 pages
    [    0.703885] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    0.703896] io scheduler noop registered
    [    0.703904] io scheduler deadline registered
    [    0.704036] io scheduler cfq registered (default)
    [    0.709447] pinctrl-single 4a003400.pinmux: 282 pins at pa fc003400 size 1128
    [    0.712206] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.3
    [    0.712414] dra7-pcie 51000000.pcie: gpio request failed, ret -517
    [    0.712550] dra7-pcie 51000000.pcie: Dropping the link to phy-4a094000.pciephy.3
    [    0.712582] dra7-pcie 51000000.pcie: probe deferral not supported
    [    0.772384] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.775399] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 236, base_baud = 3000000) is a 8250
    [    1.827978] console [ttyS2] enabled
    [    1.833360] omap_rng 48090000.rng: OMAP Random Number Generator ver. 20
    [    1.840123] [drm] Initialized
    [    1.844880] OMAP DSS rev 6.1
    [    1.848234] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
    [    1.856651] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops)
    [    1.877714] brd: module loaded
    [    1.886157] loop: module loaded
    [    1.893522] m25p80 spi0.0: s25fl256s1 (32768 Kbytes)
    [    1.898621] 7 ofpart partitions found on MTD device spi0.0
    [    1.904132] Creating 7 MTD partitions on "spi0.0":
    [    1.908948] 0x000000000000-0x000000040000 : "QSPI.SPL"
    [    1.915101] 0x000000040000-0x000000140000 : "QSPI.u-boot"
    [    1.921480] 0x000000140000-0x0000001c0000 : "QSPI.u-boot-spl-os"
    [    1.928458] 0x0000001c0000-0x0000001d0000 : "QSPI.u-boot-env"
    [    1.935191] 0x0000001d0000-0x0000001e0000 : "QSPI.u-boot-env.backup1"
    [    1.942572] 0x0000001e0000-0x0000009e0000 : "QSPI.kernel"
    [    1.948952] 0x0000009e0000-0x000002000000 : "QSPI.file-system"
    [    1.956406] libphy: Fixed MDIO Bus: probed
    [    2.018580] davinci_mdio 48485000.mdio: davinci mdio revision 1.6
    [    2.024707] davinci_mdio 48485000.mdio: detected phy mask fffffffc
    [    2.035214] libphy: 48485000.mdio: probed
    [    2.039250] davinci_mdio 48485000.mdio: phy[0]: device 48485000.mdio:00, driver Micrel KSZ9031 Gigabit PHY
    [    2.048948] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
    [    2.059368] cpsw 48484000.ethernet: Detected MACID = a0:f6:fd:b2:bb:ae
    [    2.065989] cpsw 48484000.ethernet: device node lookup for pps timer failed
    [    2.073020] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
    [    2.081239] cpsw 48484000.ethernet: cpsw: Detected MACID = a0:f6:fd:b2:bb:af
    [    2.089997] mousedev: PS/2 mouse device common for all mice
    [    2.095854] i2c /dev entries driver
    [    2.104141] omap_hsmmc 4809c000.mmc: Got CD GPIO
    [    2.179054] omap_hsmmc 480b4000.mmc: no pinctrl state for sdr25 mode
    [    2.185442] omap_hsmmc 480b4000.mmc: no pinctrl state for sdr12 mode
    [    2.255146] NET: Registered protocol family 10
    [    2.273475] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    2.279994] NET: Registered protocol family 17
    [    2.284655] Key type dns_resolver registered
    [    2.289083] omap_voltage_late_init: Voltage driver support not added
    [    2.295563] Power Management for TI OMAP4+ devices.
    [    2.300717] Registering SWP/SWPB emulation handler
    [    2.310279] mmc1: new DDR MMC card at address 0001
    [    2.327740] dmm 4e000000.dmm: workaround for errata i878 in use
    [    2.333894] mmcblk1: mmc1:0001 R1J56L 13.8 GiB
    [    2.338594] mmcblk1boot0: mmc1:0001 R1J56L partition 1 4.00 MiB
    [    2.344765] mmcblk1boot1: mmc1:0001 R1J56L partition 2 4.00 MiB
    [    2.354504] dmm 4e000000.dmm: initialized all PAT entries
    [    2.361647] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    2.365978] mmc0: host does not support reading read-only switch, assuming write-enable
    [    2.368236] mmc0: new high speed SD card at address 0260
    [    2.378824] mmcblk0: mmc0:0260 SD    977 MiB
    [    2.380166]  mmcblk0: p1 p2
    [    2.388825] [drm] No driver support for vblank timestamp query.
    [    2.394797] omapdrm omapdrm.0: No connectors reported connected with modes
    [    2.401707] [drm] Cannot find any crtc or sizes - going 1024x768
    [    2.412967] [drm] Enabling DMM ywrap scrolling
    [    2.423854] Console: switching to colour frame buffer device 128x48
    [    2.435698] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    2.443844] hctosys: unable to open rtc device (rtc0)
    [    2.449909] ALSA device list:
    [    2.452893]   No soundcards found.
    [    2.559546] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.567708] VFS: Mounted root (ext4 filesystem) on device 179:50.
    [    2.576212] devtmpfs: mounted
    [    2.580723] Freeing unused kernel memory: 2048K
    [    2.796593] systemd[1]: System time before build time, advancing clock.
    [    2.824499] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    [    2.842990] systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2017.12!
    
    [    2.889868] systemd[1]: Set hostname to <am57xx-evm>.
    [    3.239242] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
    [    3.280437] systemd[1]: Created slice User and Session Slice.
    [  OK  ] Created slice User and Session Slice.
    [    3.308848] systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    [    3.338709] systemd[1]: Reached target Swap.
    [  OK  ] Reached target Swap.
    [    3.369001] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    3.398869] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    [    3.438675] systemd[1]: Reached target Remote File Systems.
    [  OK  ] Reached target Remote File Systems.
    [  OK  ] Created slice System Slice.
    [  OK  ] Created slice system-getty.slice.
    [  OK  ] Listening on udev Kernel Socket.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [  OK  ] Reached target Slices.
    [  OK  ] Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Process Core Dump Socket.
    [  OK  ] Listening on Journal Socket.
             Mounting POSIX Message Queue File System...
             Mounting Temporary Directory...
             Starting Create Static Device Nodes in /dev...
             Starting Load Kernel Modules...
    [    3.857850] cryptodev: loading out-of-tree module taints kernel.
             Starting Setup Virtual Console...
    [    3.881637] cryptodev: driver 1.8 loaded.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Reached target Paths.
             Starting Remount Root and Kernel File Systems...
    [    3.975778] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [  OK  ] Listening on Syslog Socket.
             Starting Journal Service...
             Mounting Debug File System...
    [  OK  ] Mounted Debug File System.
    [  OK  ] Mounted POSIX Message Queue File System.
    [  OK  ] Mounted Temporary Directory.
    [  OK  ] Started Journal Service.
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Setup Virtual Console.
    [  OK  ] Started Remount Root and Kernel File Systems.
             Starting udev Coldplug all Devices...
             Mounting Configuration File System...
             Starting Apply Kernel Variables...
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /media/ram...
             Mounting /var/volatile...
             Starting udev Kernel Device Manager...
             Starting Flush Journal to Persistent Storage...
    [  OK  ] Mounted Configuration File System.
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Started Apply Kernel Variables.
    [  OK  ] Reached target Local File Systems.
             Starting Load/Save Random Seed...
    [  OK  ] Started Load/Save Random Seed.
    [    5.071215] systemd-journald[160]: Received request to flush runtime journal from PID 1
    [  OK  ] Started Flush Journal to Persistent Storage.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Update UTMP about System Boot/Shutdown...
             Starting Network Time Synchronization...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Synchronized.
    [    5.581469] omap-rproc 58820000.ipu: assigned reserved memory node ipu1_cma@9d000000
    [    5.625899] remoteproc remoteproc0: 58820000.ipu is available
    [    5.634007] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
    [    5.643113] remoteproc remoteproc0: powering up 58820000.ipu
    [    5.656309] omap-rproc 55020000.ipu: assigned reserved memory node ipu2_cma@95800000
    [    5.667651] remoteproc remoteproc1: 55020000.ipu is available
    [    5.669059] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
    [    5.679052] remoteproc remoteproc2: 40800000.dsp is available
    [    5.681959] omap-rproc 41000000.dsp: assigned reserved memory node dsp2_cma@9f000000
    [    5.698264] remoteproc remoteproc3: 41000000.dsp is available
    [    5.796106] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
    [    5.805597] remoteproc remoteproc0: request_firmware failed: -2
    [    5.811855] remoteproc remoteproc1: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
    [    5.821068] remoteproc remoteproc1: powering up 55020000.ipu
    [    5.826920] remoteproc remoteproc1: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
    [    5.836199] remoteproc remoteproc1: request_firmware failed: -2
    [    5.842402] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [    5.852794] remoteproc remoteproc2: powering up 40800000.dsp
    [    5.858865] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [    5.868282] remoteproc remoteproc2: request_firmware failed: -2
    [    5.875071] remoteproc remoteproc3: Direct firmware load for dra7-dsp2-fw.xe66 failed with error -2
    [    5.884463] remoteproc remoteproc3: powering up 41000000.dsp
    [    5.890298] remoteproc remoteproc3: Direct firmware load for dra7-dsp2-fw.xe66 failed with error -2
    [    5.899514] remoteproc remoteproc3: request_firmware failed: -2
    [  OK  ] Found device /dev/ttyS2.
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [    6.251784] crypto_engine: disagrees about version of symbol sched_setscheduler
    [  OK  [    6.280786] crypto_engine: Unknown symbol sched_setscheduler (err -22)
    ] Listening on RPCbind Server Activation Socket.
    [    6.293968] ov2659 0-0030: Sensor detection failed (3030, 0)
             Starting sshd.socket.[    6.318426] crypto_engine: disagrees about version of symbol wake_up_process
    
    [    6.331189] crypto_engine: Unknown symbol wake_up_process (err -22)
    [    6.386147] crypto_engine: disagrees about version of symbol sched_setscheduler
    [    6.400462] crypto_engine: Unknown symbol sched_setscheduler (err -22)
    [    6.407327] crypto_engine: disagrees about version of symbol wake_up_process
    [    6.414528] crypto_engine: Unknown symbol wake_up_process (err -22)
    [    6.479154] palmas-rtc 48070000.i2c:tps659038@58:tps659038_rtc: rtc core: registered 48070000.i2c:tps659 as rtc0
    [    6.510578] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [    6.541099] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [  OK  ] Listening on sshd.socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
    [    6.704067] omap_rtc 48838000.rtc: rtc core: registered 48838000.rtc as rtc1
    [    6.736038] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [  OK  ] Started System Logging Service.
    [    6.827237] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [    6.899157] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
             Starting telnetd.service...
    [    6.921114] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [    6.928886] vpe 489d0000.vpe: Device registered as /dev/video0
    [    6.932090] vip 48990000.vip: loading firmware vpdma-1b8.bin
    [    6.988693] vip 48990000.vip: VPDMA firmware loaded
    [    7.021787] scsi_mod: disagrees about version of symbol wake_up_process
    [    7.028441] scsi_mod: Unknown symbol wake_up_process (err -22)
    [    7.047438] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
             Starting tiipclad-daemon.service...
             Starting Print notice about GPLv3 packages...
    [  OK  ] Started Periodic Command Scheduler.
    [    7.172288] scsi_mod: disagrees about version of symbol wake_up_process
    [    7.182198] scsi_mod: Unknown symbol wake_up_process (err -22)
    [  OK  ] Started Kernel Logging Service.
             Starting Login Service...
    [  OK  ] Started Job spooling tools.
    [  OK  ] Started D-Bus System Message Bus.
    [    7.942107] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    7.999487] CAN device driver interface
    [    8.013044] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [    8.032206] omap-sham 4b101000.sham: hw accel on OMAP rev 4.3
    [    8.060404] crypto_engine: disagrees about version of symbol sched_setscheduler
    [    8.060410] crypto_engine: Unknown symbol sched_setscheduler (err -22)
    [    8.060417] crypto_engine: disagrees about version of symbol wake_up_process
    [    8.060421] crypto_engine: Unknown symbol wake_up_process (err -22)
    [    8.098724] crypto_engine: disagrees about version of symbol sched_setscheduler
    [    8.098731] crypto_engine: Unknown symbol sched_setscheduler (err -22)
    [    8.098738] crypto_engine: disagrees about version of symbol wake_up_process
    [    8.098743] crypto_engine: Unknown symbol wake_up_process (err -22)
    [    8.157162] crypto_engine: disagrees about version of symbol sched_setscheduler
    [    8.157168] crypto_engine: Unknown symbol sched_setscheduler (err -22)
    [    8.157175] crypto_engine: disagrees about version of symbol wake_up_process
    [    8.157179] crypto_engine: Unknown symbol wake_up_process (err -22)
    [    8.172550] c_can_platform 4ae3c000.can: c_can_platform device registered (regs=fce3c000, irq=284)
    [    8.190770] crypto_engine: disagrees about version of symbol sched_setscheduler
    [    8.190776] crypto_engine: Unknown symbol sched_setscheduler (err -22)
    [    8.190784] crypto_engine: disagrees about version of symbol wake_up_process
    [    8.190789] crypto_engine: Unknown symbol wake_up_process (err -22)
    [    8.282200] net eth1: initializing cpsw version 1.15 (0)
    [    8.282821] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [    8.282904] cpsw 48484000.ethernet: ALE Table size 1024
    [    8.422382] omap-hdmi-audio omap-hdmi-audio.0.auto: snd-soc-dummy-dai <-> 58040000.encoder mapping ok
    [    8.452054] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=-1)
    [    8.482149] cpts ptp bc clkid 0
    [    8.488287] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [    8.520082] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [    8.537871] net eth0: initializing cpsw version 1.15 (0)
    [    8.703772] Micrel KSZ9031 Gigabit PHY 48485000.mdio:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:00, irq=-1)
             Starting Network Service...
    [    8.744410] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [    8.760240] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [    8.795136] prueth pruss2_eth: unable to get pruss handle
    [    8.795156] prueth: probe of pruss2_eth failed with error -2
    [  OK  ] Started Network Service.
    [  OK  ] Started telnetd.service.
    [  OK  ] Started tiipclad-daemon.service.
    [  OK  ] Started Login Service.
             Starting thttpd.service...
    [  OK  ] Reached target Network.
             Starting Permit User Sessions...
             Starting Network Name Resolution...
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyS2.
    [  OK  ] Reached target Login Prompts.
             Starting Synchronize System and HW clocks...
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Started thttpd.service.
    [  OK  ] Started Synchronize System and HW clocks.
             Starting rng-tools.service...
    [  OK  ] Started rng-tools.service.
    [    9.688445] random: crng init done
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
            binutils
            cifs-utils
            cpio
            dosfstools
            gawk
            gzip
            libreadline6
            m4
            which
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
             Starting thermal-zone-init.service...
    [  OK  ] Started Print notice about GPLv3 packages.
    [  OK  ] Started thermal-zone-init.service.
    [  OK  ] Reached target Multi-User System.
             Starting Update UTMP about System Runlevel Changes...
    [  OK  ] Started Update UTMP about System Runlevel Changes.
    [   10.987535] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [   11.046095] usbcore: registered new interface driver usbfs
    [   11.052473] usbcore: registered new interface driver hub
    [   11.059490] usbcore: registered new device driver usb
    [   11.095176] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   11.101434] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
    [   11.109872] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x02010010
    [   11.123024] xhci-hcd xhci-hcd.1.auto: irq 368, io mem 0x48890000
    [   11.130241] hub 1-0:1.0: USB hub found
    [   11.134058] hub 1-0:1.0: 1 port detected
    [   11.145687] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    [   11.154429] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   11.154529] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
    [   11.161453] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [   11.165336] hub 2-0:1.0: USB hub found
    [   11.165648] hub 2-0:1.0: 1 port detected
    [   11.203900] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: failed to get id gpio
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org am57xx-evm ttyS2
    
    Arago 2017.12 am57xx-evm ttyS2
    
    am57xx-evm login: [   12.887194] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   12.895193] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org am57xx-evm ttyS2
    
    Arago 2017.12 am57xx-evm ttyS2
    
    am57xx-evm login:
    
    Hi Rex,

    I'm running on TI EVM.

    After following  "Building the SDK" in  "Processor SDK Linux Software Developer’s Guide"

    I was able to build rt linux, and I am able to boot the board. Kernel version is 4.9.65.

    Boot log is attached.

    Thanks,

    Nir.

  • Hi, Nir,

    The boot logs do not show PCIe gets initialized. Did you rebuild the kernel with the patches mentioned in the e2e thread quoted in your previous post or without any changes? By looking at the timeline, the fix doesn't seem to be in Processor SDK 4.2 (Kernel v4.9.59). It should be in PSDK 4.3 (Kernel v 4.9.69). I'll need to find my equipment to see what I get on AM572x IDK using ProcSDK 4.3

    Rex

  • Hi Rex,

    The yocto project builds the kernel from branch ti-rt-linux-4.9.y, commit

    764089ed2a847e9d4c06c0e0baaaeaf42aa2d99f

    The kernel version is 4.9.65.

    After I realized that the PCI is not initialized I found that post added the patches.
    Some of the code was already added to the kernel, but it made no difference at all.

    Thanks,

    Nir.
  • Hi, Nir,

    I don't have 4.9.59 version, but using 4.9.69 (ProcSDk 4.3 release) prebuilt image, I see PCIe initialization prints in boot logs. Without having anything plugged into the EVM PCIe slot, lscpi shows the TI PCI bridge. Could you try using the prebuilt images? You should at least see PCIe gets initialized.

    I am using the same EVM as yours:

    U-Boot 2017.01-gc68ed086bd (Mar 26 2018 - 17:06:19 -0400)

    CPU : DRA752-GP ES2.0
    Model: TI AM5728 IDK
    Board: AM572x IDK REV 1.3B
    DRAM: 2 GiB

    root@am57xx-evm:~# dmesg | grep pci
    [ 0.720247] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.3
    [ 0.720404] dra7-pcie 51000000.pcie: GPIO lookup for consumer (null)
    [ 0.720411] dra7-pcie 51000000.pcie: using device tree for GPIO lookup
    [ 0.720441] of_get_named_gpiod_flags: parsed 'gpios' property of node '/ocp/axi@0/pcie@51000000[0]' - status (0)
    [ 0.720564] OF: PCI: host bridge /ocp/axi@0/pcie@51000000 ranges:
    [ 0.720576] OF: PCI: No bus range found for /ocp/axi@0/pcie@51000000, using [bus 00-ff]
    [ 1.722016] dra7-pcie 51000000.pcie: phy link never came up
    [ 1.722185] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
    [ 1.722198] pci_bus 0000:00: root bus resource [bus 00-ff]
    [ 1.722209] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
    [ 1.722219] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
    [ 1.722253] pci 0000:00:00.0: [104c:8888] type 01 class 0x060400
    [ 1.722276] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
    [ 1.722290] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
    [ 1.722361] pci 0000:00:00.0: supports D1
    [ 1.722368] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    [ 1.722829] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff]
    [ 1.722844] pci 0000:00:00.0: BAR 1: assigned [mem 0x20020000-0x2002ffff]
    [ 1.722857] pci 0000:00:00.0: PCI bridge to [bus 01]
    [ 1.723077] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
    [ 1.723091] pcie_pme 0000:00:00.0:pcie001: service driver pcie_pme loaded
    [ 1.723218] aer 0000:00:00.0:pcie002: service driver aer loaded
    root@am57xx-evm:~#
    root@am57xx-evm:~# uname -a
    Linux am57xx-evm 4.9.69-g9ce43c71ae #2 SMP PREEMPT Mon Mar 26 11:57:50 EDT 2018 armv7l GNU/Linux
    root@am57xx-evm:~#
    root@am57xx-evm:~# lspci -nn
    00:00.0 PCI bridge [0604]: Texas Instruments Multicore DSP+ARM KeyStone II SOC [104c:8888] (rev 01)
    root@am57xx-evm:~#
  • Hi, Nir,

    Are you able to use the prebuilt images and bring up PCIe on the IDK? I noticed that I was using non-rt linux, so I tried with rt-linux and got the same result.

    root@am57xx-evm:~#
    root@am57xx-evm:~# uname -a
    Linux am57xx-evm 4.9.65-rt23-g7069a470d5 #2 SMP PREEMPT RT Mon Mar 26 12:04:24 EDT 2018 armv7l GNU/Linux
    root@am57xx-evm:~# lspci -nn
    00:00.0 PCI bridge [0604]: Texas Instruments Multicore DSP+ARM KeyStone II SOC [104c:8888] (rev 01)
    root@am57xx-evm:~# lspci -v
    00:00.0 PCI bridge: Texas Instruments Multicore DSP+ARM KeyStone II SOC (rev 01) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 435
    Memory at 20100000 (32-bit, non-prefetchable) [size=1M]
    Memory at 20020000 (32-bit, non-prefetchable) [size=64K]
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [70] Express Root Port (Slot-), MSI 00
    Capabilities: [100] Advanced Error Reporting
    Kernel driver in use: pcieport
  • Hi Rex,

    I tried the pre-built image of SDK 04.03.00.05. The kernel started booting up but then panicked.
    In the boot log I saw good PCI initialization.

    Since I'm only at the the beginning of the development I decided to start from scratch with SDK 05.00.00.15

    Kernel version is 4.14.40

    I'm able to boot up the board and the PCIe is working properly.

    With SDK 04.03.00.05 the jailhouse hypervisor was working properly, but now I can't boot up the board with any dtb
    that allows working with jailhouse.

    I will try a little more and if I can't work it out I will start a new thread.

    Thanks a lot.

    Nir.
  • Hi, Nir,

    Thanks for the update. Yes, please open new thread if you have issues.
  • So, my celebration was a bit premature.

    Reminder,
    I'm running on a AM5728 IDK.
    I built SDK 05.00.00.15 and managed to boot the board with linux kernel version 4.14.40:

    git://git.ti.com/processor-sdk/processor-sdk-linux.git
    branch: processor-sdk-linux-rt-4.14.y
    commit: d5443cbd3b5a79c7b4f817896e12014f2b30e34b

    When I start up with am572x-idk.dtb, PCIe is initialized normally and I'm able to work with a realtek ethernet adapter successfully.

    But I need the jailhouse hypervisor running.
    Following www.ti.com/.../tidudf8a.pdf
    and processors.wiki.ti.com/.../Processor_SDK_Jailhouse_Hypervisor

    I use am572x-idk-jailhouse.dtb. Jailhouse seems to be working fine and I'm able to start up an example on core 1,

    however, PCIe now doesn't initialize properly:

    am57xx-evm login: root
    root@am57xx-evm:~# dmesg | grep -i pci
    [ 0.734275] PCI: CLS 0 bytes, default 64
    [ 0.761739] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.3
    [ 0.761981] dra7-pcie 51000000.pcie: GPIO lookup for consumer (null)
    [ 0.761989] dra7-pcie 51000000.pcie: using device tree for GPIO lookup
    [ 0.762023] dra7-pcie 51000000.pcie: lookup for GPIO (null) failed
    [ 0.762031] dra7-pcie 51000000.pcie: gpio request failed, ret -517
    [ 0.762248] dra7-pcie 51000000.pcie: Dropping the link to phy-4a094000.pciephy.3
    [ 0.762276] dra7-pcie 51000000.pcie: probe deferral not supported
    root@am57xx-evm:~#

    How can I proceed?

    Thanks,

    Nir.
  • Hi, Nir,

    I haven't tried with Jailhouse setup. Let me set it up first and poke around. It may be an issue with jailhouse and need to understand.

    Rex
  • Hi, Nir,

    Sorry for the slow response. It took me a while to get the hypervisor up. I think I see similar logs as yours, but I'll like to check other platform as well. I'll update you later with more info.

    Rex
  • Hi, Nir,

    Jailhouse dtsi file disables gpio3 and gpio5. However, PCIe uses gpio3. I'll need to check development how can we have both.

    Rex
  • Hi, Nir,

    The jailhouse in TI release is just an example on how jailhouse works. Users will need to partition the peripherals based on its usage and configuration. You will need to come up your own jailhouse configuration to indicate what peripherals are for root cell and what for inmate cell.

    Rex
  • 
    root@am57xx-evm:~# cat /proc/ioports
    00000000-0000ffff : I/O
      00001000-00001fff : PCI Bus 0000:01
        00001000-000010ff : 0000:01:00.0
    	
    	
    root@am57xx-evm:~# cat /proc/iomem
    20013000-2fffffff : MEM
      20100000-201fffff : 0000:00:00.0
      20200000-202fffff : PCI Bus 0000:01
        20200000-20203fff : 0000:01:00.0
        20204000-20204fff : 0000:01:00.0
    40300000-4037ffff : 40300000.ocmcram
    40800000-40847fff : l2ram
    40d01000-40d010ff : /ocp/mmu@40d01000
    40d02000-40d020ff : /ocp/mmu@40d02000
    40e00000-40e07fff : l1pram
    40f00000-40f07fff : l1dram
    41000000-41047fff : l2ram
    41501000-415010ff : /ocp/mmu@41501000
    41502000-415020ff : /ocp/mmu@41502000
    41600000-41607fff : l1pram
    41700000-41707fff : l1dram
    43300000-433fffff : edma3_cc
    44000000-44ffffff : /ocp
    45000000-45000fff : /ocp
    48020000-4802001f : serial
    48034000-4803407f : /ocp/timer@48034000
    48036000-4803607f : /ocp/timer@48036000
    4803e000-4803e07f : /ocp/timer@4803e000
    48051000-480511ff : /ocp/gpio@48051000
    48053000-480531ff : /ocp/gpio@48053000
    48055000-480551ff : /ocp/gpio@48055000
    48057000-480571ff : /ocp/gpio@48057000
    48059000-480591ff : /ocp/gpio@48059000
    4805d000-4805d1ff : /ocp/gpio@4805d000
    48070000-480700ff : /ocp/i2c@48070000
    48086000-4808607f : /ocp/timer@48086000
    48088000-4808807f : /ocp/timer@48088000
    48090000-48091fff : /ocp/rng@48090000
    4809c000-4809c3ff : /ocp/mmc@4809c000
    480a5000-480a509f : /ocp/des@480a5000
    480b4000-480b43ff : /ocp/mmc@480b4000
    480b8000-480b81ff : /ocp/spi@480b8000
    4844a000-4844ad1b : /ocp/padconf@4844a000
    48484000-48484fff : /ocp/ethernet@48484000
    48485000-484850ff : /ocp/ethernet@48484000/mdio@48485000
    48485200-48487fff : /ocp/ethernet@48484000
    48820000-4882007f : /ocp/timer@48820000
    48822000-4882207f : /ocp/timer@48822000
    48824000-4882407f : /ocp/timer@48824000
    48828000-4882807f : /ocp/timer@48828000
    4882a000-4882a07f : /ocp/timer@4882a000
    4882c000-4882c07f : /ocp/timer@4882c000
    4882e000-4882e07f : /ocp/timer@4882e000
    48838000-488380ff : /ocp/rtc@48838000
    48840000-488401ff : /ocp/mailbox@48840000
    48842000-488421ff : /ocp/mailbox@48842000
    48880000-4888ffff : /ocp/omap_dwc3_1@48880000
    48890000-48897fff : /ocp/omap_dwc3_1@48880000/usb@48890000
      48890000-48897fff : /ocp/omap_dwc3_1@48880000/usb@48890000
    4889c100-488a6fff : /ocp/omap_dwc3_1@48880000/usb@48890000
    488c0000-488cffff : /ocp/omap_dwc3_2@488c0000
    488dc100-488e6fff : /ocp/omap_dwc3_2@488c0000/usb@488d0000
    48990000-48990113 : vip
    48995500-489955d7 : parser0
    48995700-48995717 : csc0
    48995800-4899587f : sc0
    48995a00-48995ad7 : parser1
    48995c00-48995c17 : csc1
    48995d00-48995d7f : sc1
    489d0700-489d077f : sc
    489d5700-489d5717 : csc
    4a0021e0-4a0021eb : /ocp/bandgap@4a0021e0
    4a00232c-4a002337 : /ocp/bandgap@4a0021e0
    4a002380-4a0023ab : /ocp/bandgap@4a0021e0
    4a0023c0-4a0023fb : /ocp/bandgap@4a0021e0
    4a00246c-4a00246f : ldo-address
    4a002470-4a002473 : ldo-address
    4a002554-4a002557 : gmii-sel
    4a002564-4a00256b : /ocp/bandgap@4a0021e0
    4a002574-4a0025c3 : /ocp/bandgap@4a0021e0
    4a002b78-4a002c73 : /ocp/l4@4a000000/scm@2000/dma-router@b78
    4a002c78-4a002cf3 : /ocp/l4@4a000000/scm@2000/dma-router@c78
    4a003400-4a003867 : pinctrl-single
    4a056000-4a056fff : omap_dma_system.0
      4a056000-4a056fff : /ocp/dma-controller@4a056000
    4a080000-4a08001f : /ocp/ocp2scp@4a080000
    4a084000-4a0843ff : /ocp/ocp2scp@4a080000/phy@4a084000
    4a084c00-4a084c3f : pll_ctrl
    4a085000-4a0853ff : /ocp/ocp2scp@4a080000/phy@4a085000
    4a090000-4a09001f : /ocp/ocp2scp@4a090000
    4a094000-4a09407f : phy_rx
    4a094400-4a094463 : phy_tx
    4a096800-4a09683f : pll_ctrl
    4a140000-4a1410ff : /ocp/sata@4a141100
    4ae07ddc-4ae07ddf : setup-address
    4ae07de0-4ae07de3 : control-address
    4ae07de4-4ae07de7 : setup-address
    4ae07de8-4ae07deb : control-address
    4ae07e20-4ae07e23 : control-address
    4ae07e24-4ae07e27 : control-address
    4ae07e30-4ae07e33 : setup-address
    4ae07e34-4ae07e37 : setup-address
    4ae0c154-4ae0c157 : ldo-address
    4ae0c158-4ae0c15b : ldo-address
    4ae10000-4ae101ff : /ocp/gpio@4ae10000
    4ae14000-4ae1407f : /ocp/wdt@4ae14000
    4ae20000-4ae2007f : /ocp/timer@4ae20000
    4ae3c000-4ae3dfff : /ocp/can@481cc000
    4b101000-4b1012ff : /ocp/sham@53100000
    4b300000-4b3000ff : qspi_base
    4b500000-4b50009f : /ocp/aes@4b500000
    4b700000-4b70009f : /ocp/aes@4b700000
    55020000-5502ffff : l2ram
    55082000-550820ff : /ocp/mmu@55082000
    58000000-5800007f : dss
    58001000-58001fff : /ocp/dss@58000000/dispc@58001000
    58004054-58004057 : pll1_clkctrl
    58004300-5800431f : pll1
    58009054-58009057 : pll2_clkctrl
    58009300-5800931f : pll2
    58040000-580401ff : wp
    58040200-5804027f : pll
    58040300-5804037f : phy
    58060000-58078fff : core
    58820000-5882ffff : l2ram
    58882000-588820ff : /ocp/mmu@58882000
    80000000-9fffffff : System RAM
      80008000-80dfffff : Kernel code
      81000000-810b1643 : Kernel data
    ac000000-dfffffff : System RAM
    ef000000-efffffff : Jailhouse hypervisor
    f0000000-ffcfffff : System RAM
    root@am57xx-evm:~#
    Hi Rex,

    We've made some progress.

    Indeed, after editing am572x-idk-jailhouse.dtsi and commenting out disablement of gpio3, PCI is initialized properly and lspci output is good.

    I want to use PCIe from linux running in the root cell.  In my system the inmate has no need for PCI.

    The current problem:

    After modprobing jailhouse.ko and only enabling jailhouse without creating an inmate, I attempt to modprobe the realtek driver, and I get an error:

    root@am57xx-evm:~# modprobe jailhouse

    root@am57xx-evm:~# jailhouse enable /usr/share/jailhouse/examples/am57xx-evm.cell

    Initializing Jailhouse hypervisor v0.7 (220-g2ad429b) on CPU 0

    Code location: 0xf0000040

    Page pool usage after early setup: mem 30/4072, remap 32/131072

    Initializing processors:

    CPU 0... OK

    CPU 1... OK

    Page pool usage after late setup: mem 40/4072, remap 38/131072

    Activating hypervisor

    [   52.256157] The Jailhouse is opening.

    root@am57xx-evm:~#

    root@am57xx-evm:~#

    root@am57xx-evm:~# modprobe r8169

    Unhandled data read at 0x2000103d(1)

    FATAL: unhandled trap (exception class 0x24)

    pc=0xc05554b8 cpsr=0x600f0093 hsr=0x93010005

    r0=0xe108f03d r1=0x00000001 r2=0xd29afc4c r3=0x00000000

    r4=0xd393e628 r5=0xe108f000 r6=0x01000000 r7=0x0000003d

    r8=0x00000001 r9=0xd393e610 r10=0x00000000 r11=0xd29afbec

    r12=0xd29afbf0 r13=0xd29afbe0 r14=0xc0556254

    Parking CPU 1 (Cell: "AM57XX-EVM")

    At this point linux is frozen.

    In the boot log we can see that

    [    0.761971] OF: PCI: host bridge /ocp/axi@0/pcie@51000000 ranges:

    [    0.762007] OF: PCI:    IO 0x20003000..0x20012fff -> 0x00000000

    [    0.762033] OF: PCI:   MEM 0x20013000..0x2fffffff -> 0x20013000

    I attached /proc/ioports and /proc/iomem

    So for some reason jailhouse forbids the root cell from accessing address 0x2000103d

    I tried editing configs/am57xx-evm.c and add various memory regions to the root cell but no joy.

    Maybe a pci_device should be added? If so, how?

    I didn't understand how to configure it. Is there any documentation?

    Thanks a lot,

    Nir.

  • HI, Nir,

    without jailhouse, are you able to modprobe r8169?

    Rex
  • Sure, without jailhouse, PCI is initialized and I'm able to modprobe r8169 and use the device without any problem.
  • Hi, Nir,

    I am not familiar how jailhouse work. I suspect that you need to do some configuration for the root cell. Looking at the jailhouse example, there is a am57xx-evm.cell which I don't believe you can just take it blindly. It is configured for EtherCat slave demo. From jailhouse dtsi file, you can tell gpio3 was disabled. The demo application requires access to particular pins of the GPIO3 and GPIO5. That means the am57xx-evm.cell isn't configured to run PCIe. Jailhouse is an open source project and you should be able to find more info in the project website on how to configure for your application.

    Rex
  • Hi Rex,

    After being in contact with Jan Kiszka from jailhouse I was able to get PCIe working properly with jailhouse up and running.

    I'm setting up the root cell with configs/am57xx-evm.c, to which I only had to add the following memory region:

    .mem_regions = {
    /* PCI */ {
    .phys_start = 0x20000000,
    .virt_start = 0x20000000,
    .size = 0x10000000,
    .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
    JAILHOUSE_MEM_IO,
    },


    Thanks a lot,

    Nir.
  • Nir,

    Thanks for the info. That's helpful to others.

    Rex