Hello!
I'm trying to test an FPGA with memory mapped registers which is installed on a PCIE
card in a PC with Fedora 32 installed on it.
After some googling I saw that I'll need something like "busybox"
and will probably need to recompile the kernel to disable the "CONFIG_STRICT_DEVMEM"
or add a boot switch "iomem=relaxed" but before all this I need to know
what is the absolute address at which the FPGA is seen by the PCIE.
I don't even know if it's mapped throught the IO address space of memory
address space.
I tried using "lspci" and saw that the card (Xilinx) is seen:
Code:
<leonb-lap>[root].../root>lspci
00:00.0 Host bridge: Intel Corporation 82946GZ/PL/GL Memory Controller Hub (rev 02)
00:01.0 PCI bridge: Intel Corporation 82946GZ/PL/GL PCI Express Root Port (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82946GZ/GL Integrated Graphics Controller (rev 02)
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 01)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 01)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 01)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 01)
01:00.0 Memory controller: Xilinx Corporation Device 8038
04:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetLink BCM5786 Gigabit Ethernet PCI Express (rev 02)
and some more info specifically about it:
Code:
<leonb-lap>[root].../root>lspci -s 01:00.0 -v
01:00.0 Memory controller: Xilinx Corporation Device 8038
Subsystem: Xilinx Corporation Device 0007
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at d0200000 (32-bit, non-prefetchable) [size=1M]
Memory at d0100000 (32-bit, non-prefetchable) [size=1M]
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [c0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [300] Secondary PCI Express
The FPGA registers address space is 64K, does the two shown memories
0xd0200000, 0xd0100000 one of them is the FPGA base? Or they're just
internal PCIE address spaces?
Can it be the access to FPGA is through a series of writes/reads to some
specific PCIE registers?
So far I haven't yet recompipled the kernel nor did I add "iomem=relaxed"
boot kernel argument so running absolute address reads like:
busybox devmem <address>
is limited to the lowest 1MB which leaves values like
0xd0200000, 0xd0100000 outside the permitted range.
I'm mostly seeking feedback that I'm generally going in the right
direction (or totaly wrong one?).
TIA,
kaza.