Questions tagged [pci]

Questions in this tag are only for questions related to the PCI Local Bus standard which is a computer bus for attaching hardware devices in a computer.

Questions in this tag are only for questions related to the PCI Local Bus standard which is a computer bus for attaching hardware devices in a computer.

483 questions
5
votes
1 answer

How to access pci express configuration space via MMIO?

I am new to PCI express, I want to read/write into PCI Express configuration space via MMIO addresses. I know how port mapped IO read/write into PCI express config space via 0xCFC and 0xCF8 port addresses(on x86). I also wrote a sample linux kernel…
v123
  • 385
  • 3
  • 10
5
votes
2 answers

Can different CPUs on an x86 machine can have different local APIC register MMIO base addresses?

Intel manual says that local APIC registers are memory mapped to a 4KB region, with the default address being FEE00000H. This address can be modified using IA32_APIC_BASE MSR. Quoting SDM Vol 3, section 10.4.5 The Pentium 4, Intel Xeon, and P6…
joz
  • 319
  • 1
  • 9
5
votes
1 answer

Writing PCI driver for DMA transfer on Qemu

I am writing a PCI device on Qemu and driver(LKM) in the guest OS. While Qemu provides an example PCI device, edu(edu.txt and edu.c) with it's distribution, I am having trouble writing the kernel module to do DMA transfer. A basic driver has been…
Proy
  • 336
  • 2
  • 13
5
votes
3 answers

pci_enable_device() fails after remove/rescan

I have here Linux 4.4 (I used to work on an older kernel which failed in the same way) with a PCIe connected FPGA device and a driver for it which are both of my own design. These have been working well under normal conditions, but now I try to make…
Andreas Bombe
  • 2,450
  • 13
  • 20
5
votes
1 answer

Accessing the PCI config space with Win32 API

Given the address of a PCI device (i.e. bus, device, function), how can one programatically read, using Win32 API calls in userspace, the config space (e.g. vendor ID, device ID) for that device? On Linux, one openes the /sys/bus/pci/devices//config…
Mircea
  • 1,841
  • 15
  • 18
5
votes
3 answers

Address mapping of PCI-memory in Kernel space

I'm trying to read and write to and PCI-device from a loadable kernel module. Therefore I follow this post: pci_enable_device(dev); pci_request_regions(dev, "expdev"); bar1 = pci_iomap(dev, 1, 0); // void iowrite32(u32 val, void __iomem…
Alex44
  • 3,597
  • 7
  • 39
  • 56
5
votes
1 answer

How does PCI/PCIe devices init/register themselves in the Linux kernel?

When the kernel starts up, the PCI subsystem creates a pci_bus for each physical PCI bus, then the pci_bus is added to pci_root_buses(with PCI configuration). But the PCI device driver registers drivers by pci_register_driver, and it adds PCI driver…
hooao
  • 103
  • 1
  • 9
5
votes
1 answer

How can a PCIe card dma data into CPU ram?

This is in reference to this answer given to a similar dma/pci question. I gathered from this answer that the PC does not have a dma capable of transferring data to/from a PCI card, and that the PCI card must provide the dma capabilites. I have…
tomcat
  • 219
  • 3
  • 9
5
votes
1 answer

DMA and I/O memory region under Linux

I'm writing this because I have some doubts about the behaviour of DMA. I'm reading about the PCI layout and how the device drivers interacts with the card, and I read about DMA. Since I understood, PCI cards doesn't have a DMA controller, instead…
leberus
  • 51
  • 1
  • 6
5
votes
2 answers

PCIe JTAG for (re)programming a PCIe board

I noticed that the PCI bus has the JTAG wires (i.e. TCK TDI TDO etc.): is there any way to use that JTAG for re-programming an fpga based PCIe device? (supposing that the fpga's JTAG is connected to the PCI wires). thanks Michele EDIT: since I see…
Michele
  • 131
  • 2
  • 11
5
votes
1 answer

What are the PCIe operations involved in Infiniband verbs?

Here are some specifics. When a process calls ibv_post_send(), what happens at the PCI interface to the HCA? Is the WQE encapsulated inside the PCIe doorbell and written via Programmed IO? Or is the WQE fetched in a separate DMA read by the…
Anuj Kalia
  • 803
  • 8
  • 16
5
votes
2 answers

How does the CPU know the PCI adress-space

I understand that PCI and PCIe devices can be configured by the CPU (via code in the BIOS or OS) to respond to certain physical memory addresses by writing to specific areas of the device's configuration space. In fact the Linux kernel has quite the…
Lifesworder
  • 110
  • 1
  • 5
5
votes
2 answers

Writing a Windows 64-bit device driver for a 32-bit PCI device

I'm evaluating to port a device driver I wrote several years ago from 32 to 64 bits. The physical device is a 32-bit PCI card. That is, the device is 32 bits but I need to access it from Win7x64. The device presents some registers to the Windows…
Mike
  • 161
  • 2
  • 6
4
votes
1 answer

PCI Bios 2.1 Question - How to set device interrupt

I am in hopes someone with PCI programming experience would lend me some advice. I own a piece of test equipment (Logic Analyzer) which uses an old Pentium class (circa '97) motherboard running Win98 This motherboard appears to be 'hard-configured'…
rfdes
  • 69
  • 4
4
votes
0 answers

I run the android11 emulator in arm export a fault:qemu-system-aarch64: PCI bus not available for hda

The following is the details. My environment is the latest android studio, and os is ubuntu 18.04. It exported the fault and do not show anything in screen. $ emulator -avd Nexus_4_API_30< emulator: Android emulator version 30.3.5.0 (build_id…
1 2
3
32 33