RTEMS | aarch64/xilinx-zynqmp: Use FDT to define PCIe memory mappings (!1116)

SHIVAM DEOLANKAR (@D3athSkulll) gitlab at rtems.org
Thu Mar 12 02:24:33 UTC 2026




SHIVAM DEOLANKAR commented on a discussion on bsps/aarch64/xilinx-zynqmp/start/bspstart.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1116#note_145111

 > +  if (ranges == NULL) {
 > +    return;
 > +  }
 > +
 > +  uint64_t addr;
 > +  uint64_t size;
 > +
 > +  /* Extract PCIe address and size from the ranges property */
 > +  addr = fdt64_to_cpu(*(uint64_t *)&ranges[1]);
 > +  size = fdt64_to_cpu(*(uint64_t *)&ranges[3]);
 > +
 > +  aarch64_mmu_map(
 > +    addr,
 > +    addr + size,
 > +    AARCH64_MMU_DEVICE
 > +  );

The PCIe initialization code has been moved into a static function `zynqmp_pcie_init()` which is called from `bsp_start()`. The formatting has been adjusted to follow the existing BSP style. A NULL check for the pointer returned by `bsp_fdt_get()` has been added to avoid a potential crash if the FDT is missing. Additionally, an example PCIe node from the device tree has been included as a comment to document the expected `ranges` property format.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1116#note_145111
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260312/ed0b6f01/attachment-0001.htm>


More information about the bugs mailing list