(+86) 15013630202 sales@pcie.com

Shared RAM on PCIe Endpoint Device: 'devmem: mmap:' error

Mar 04, 2024

Hello, I’ve flashed my AGX Orin Dev kit in PCIe endpoint mode using these instructions.


My root complex device is a Jetson Xavier NX.

Both devices use Jetpack 5.1.1, r35.3.1.


Steps I have done for Endpoint setup, in the following order:



  • Recompile kernel with the necessary change to arch/arm64/configs/tegra_defconfig

  • Make the necessary change to p3701.conf.common to enable EP mode.

  • Successfully flash the AGX Orin with the above changes. (sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1 command)

  • Connect the devices with my custom PCIe cable (designed using PCIe Endpoint Design Guidelines).

  • Bootup the Endpoint (AGX Orin).

  • Run the following commands on Endpoint:


    cd /sys/kernel/config/pci_ep/
mkdir functions/pci_epf_nv_test/func1
echo 0x10de > functions/pci_epf_nv_test/func1/vendorid
echo 0x0001 > functions/pci_epf_nv_test/func1/deviceid
ln -s functions/pci_epf_nv_test/func1 controllers/141a0000.pcie_ep/
echo 1 > controllers/141a0000.pcie_ep/start


  • Bootup the Root port (Xavier NX).

  • Determine Endpoint BAR address:



nvidia@nvidia-agx-orin:/sys/kernel/config/pci_ep$ sudo dmesg | grep pci_epf_nv_test

[ 168.885340] pci_epf_nv_test pci_epf_nv_test.0: BAR0 RAM phys: 0x17082e000

[ 168.885360] pci_epf_nv_test pci_epf_nv_test.0: BAR0 RAM IOVA: 0xffff0000

[ 168.885405] pci_epf_nv_test pci_epf_nv_test.0: BAR0 RAM virt: 0x00000000c2c53987




  • Access the Endpoint RAM - THIS STEP FAILS:



nvidia@nvidia-agx-orin:/sys/kernel/config/pci_ep$ sudo busybox devmem 0x17082e000

devmem: mmap: Operation not permitted



Besides the recompiled kernel step, which I did, is there anything else I may have done wrong?