Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4884

Device Tree • BAR of PCIe devices seems incorrect

$
0
0
I am developing a device driver for my PCIe device connected to Raspberry Pi 5 thru the M.2 HAT.
When the driver is installed, "pci_resource_start" gets a 40-bit address (0x1b00000000) although the BAR of my PCIe device is 32-bit memory. Then "ioremap" converts the 40-bit address to a virtual address, but the accessible value seems incorrect (0xff).

Questions are:
Is the way as above all right, even though a 32-bit BAR of PCIe device is converted to a 40-bit address?
lspci also shows that the BAR is 0x1b00000000. So I tried /dev/mem open and mmap, but 0xff is still read. Why?

Environment:
Raspberry Pi 5, Ubuntu 24.04, (uname -r) = 6.8.0-1005-raspi

Statistics: Posted by mrtmm — Tue Jun 11, 2024 5:41 am



Viewing all articles
Browse latest Browse all 4884

Trending Articles