All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: PCI Memory mapping
@ 2011-04-15  5:44 koteswararaom
  2011-04-15  6:32 ` David Hawkins
  2011-04-15  6:48 ` Michael Neuling
  0 siblings, 2 replies; 29+ messages in thread
From: koteswararaom @ 2011-04-15  5:44 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

Hi, 

 

I have come across this forum, and I have a question. I am working on PCI
device driver, I am trying to insert the  pci card in to the pci slot of the
main computer, I am finding a problem here, when I insert the card in to the
pci slot, my pci device ID and vendor Id are not getting displayed. I am
using windows xp o/s.

 

I am trying to map pci memory. Can you suggest me how can we map the pci
memory. What steps should I take in order to make my Device Id and Vendor Id
displayed when I insert the card in to the pci slot.

 

With Kind regards,

Ajith.

 


[-- Attachment #2: Type: text/html, Size: 2426 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread
* PCI memory mapping
@ 2025-04-07 14:55 Renaud Barbier
  2025-04-08  9:54 ` Lucas Stach
  0 siblings, 1 reply; 29+ messages in thread
From: Renaud Barbier @ 2025-04-07 14:55 UTC (permalink / raw)
  To: Barebox List

Hello,
Barebox version: 2024-09

I am porting the Linux PCIE driver for Broadcom Cortex-A9 (ARMv7) chip.
So far I am able to detect the bridge and NVME device attach to it:

pci: pci_scan_bus for bus 0
pci:  last_io = 0x00000000, last_mem = 0x20000000, last_mem_pref = 0x00000000
pci: class = 00000604, hdr_type = 00000001
pci: 00:00 [14e4:b170]

pci: pci_scan_bus for bus 1
pci:  last_io = 0x00000000, last_mem = 0x20000000, last_mem_pref = 0x00000000
pci: class = 00000108, hdr_type = 00000000
pci: 01:00 [126f:2263]
ERROR: pci: last_mem = 0x20000000, 16384
pci: pbar0: mask=ffffc004 NP-MEM 16384 bytes
...
pci: class = 00000108, hdr_type = 00000000
pci: 01:f8 [126f:2263]
ERROR: pci: last_mem = 0x2007c000, 16384
pci: pbar0: mask=ffffc004 NP-MEM 16384 bytes
pci: pci_scan_bus returning with max=02
pci: bridge NP limit at 0x20100000

The PCI memory address is assigned to the device and map (pci_iomap from nvme_dev_map)  but access to this PCI space crashes the system:

pci: pci_scan_bus returning with max=02
ERROR: nvme_dev_map: bar = 0x20000000
nvme pci-126f:2263.0: enabling bus mastering
ERROR: pci:  __pci_set_master
ERROR: nvme_pci_enable: address: 0x2000001c
unable to handle paging request at address 0x2000001c
pc : [<9fe3d6e4>]    lr : [<9fe3d6d8>]
sp : 9fff7f38  ip : 00000002  fp : 00000000
r10: 0006b52c  r9 : 40000000  r8 : 9fea9b88
r7 : 7fe18500  r6 : 7fe295a8  r5 : 9fe8e5b8  r4 : 7fe29538
r3 : 20000000  r2 : 00000000  r1 : 0000000a  r0 : 00000027
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
[<9fe3d6e4>] (nvme_probe+0xd8/0x4c4) from [<9fe14650>] (device_probe+0x64/0x15c)
[<9fe14650>] (device_probe+0x64/0x15c) from [<9fe14778>] (match+0x30/0x68)

Tracing the problem, I found that if I limit the scanning in pci_scan_bus to 1 device/function
-       for (devfn = 0; devfn < 0xff; ++devfn) {
+       for (devfn = 0; devfn < 0x8; ++devfn) { ==> At 0x10 I see the crash.

Then, the NVME device is detected:
nvme pci-126f:2263.0: serial: A012410180620000000
nvme pci-126f:2263.0: model: SM681GEF AGS
nvme pci-126f:2263.0: firmware: TFX7GB

Has anybody seen this problem before (I havenoyt seen that on the LS1046A)?
I am not seeing much diff with the master branch in /drivers/pci and drivers/nvme

Cheers,
Renaud









^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: PCI Memory mapping
@ 2004-04-07  7:15 Marc Leeman
  0 siblings, 0 replies; 29+ messages in thread
From: Marc Leeman @ 2004-04-07  7:15 UTC (permalink / raw)
  To: linuxppc-dev


I now realise I sent to the wrong mailing list :-/
(thread was on linuxppc-dev instead of linuxppc-embedded).

Hi,

I know I've been flooding the mailing list with this particular little
topic and thanks to some valuable comments [1], we were able to
pinpoint our problem fairly quickly.

Partly based on a number of related known silicon bugs, I have drafted
the following description (and work-around) that explains our data
corruption.

http://scorpius.homelinux.org/~marc/masterwrite/

[1] There is still one comment which is in the queue to be investigated.

 marc.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 29+ messages in thread
* PCI Memory mapping
@ 2004-03-16 11:40 Marc Leeman
  2004-03-16 16:39 ` Jeff Angielski
  0 siblings, 1 reply; 29+ messages in thread
From: Marc Leeman @ 2004-03-16 11:40 UTC (permalink / raw)
  To: linuxppc-dev


I am currently trying the following

 +-----+        +-----+
 | mem |        | mem |
 +-----+        +-----+
    |              |
 +-----+        +-----+
 | ppc |        | dsp |
 +-----+        +-----+
    |     pci      |
    +--------------+

For a number of reasons (load on ppc, dsp silicon bug), we are trying to
transform the ppc dma transfers (ppc master write) to transfers
initiated by the dsp; where the memory block that is the result of
processing by the ppc is fetched by the dsp (ppc slave read).

Mapping pci devices registers and memory  into ppc kernel memory is well
documented, but I seem to be missing information about the other way
around: I (ppc) want to signal the dsp that data is ready at address
0xXXXXXXXX, come and get it (virt_to_bus(0xXXXXXXXX)?).

Most likely I have been searching archives with the wrong keywords since
I haven't found a good reference next to some notes in IO-mapping.txt
which seem to indicate that this is possible.

Any pointers about making cpu memory visible on the pci bus would greatly
be appreciated.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2025-04-09 11:13 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15  5:44 PCI Memory mapping koteswararaom
2011-04-15  6:32 ` David Hawkins
2011-04-15  6:48 ` Michael Neuling
  -- strict thread matches above, loose matches on Subject: below --
2025-04-07 14:55 PCI memory mapping Renaud Barbier
2025-04-08  9:54 ` Lucas Stach
2025-04-09 10:00   ` Renaud Barbier
2004-04-07  7:15 PCI Memory mapping Marc Leeman
2004-03-16 11:40 Marc Leeman
2004-03-16 16:39 ` Jeff Angielski
2004-03-22  7:48   ` Marc Leeman
2004-03-22 11:02     ` Marc Leeman
2004-03-23 11:17     ` Marc Leeman
2004-03-23 16:01       ` Marc Leeman
2004-03-24  2:04         ` Michael R. Zucca
2004-03-24  0:04       ` Benjamin Herrenschmidt
2004-03-24 12:26         ` Marc Leeman
2004-03-24 14:25           ` Marc Leeman
2004-03-24 17:08             ` linas
2004-03-25 15:48               ` Marc Leeman
2004-03-25 16:34                 ` linas
2004-03-25 16:45                   ` linas
2004-03-26  8:00                     ` Marc Leeman
2004-03-30 19:49                       ` Jeff Angielski
2004-03-31 15:56                         ` Marc Leeman
2004-03-31 16:02                           ` Marc Leeman
2004-04-01 12:33                           ` Marc Leeman
2004-04-04 22:53                             ` Benjamin Herrenschmidt
2004-04-05  8:46                             ` Adrian Cox
     [not found]                             ` <20040402140130.GG22365@smtp.barco.com>
     [not found]                               ` <1081175362.20952.30.camel@localhost.localdomain>
2004-04-06  6:21                                 ` Marc Leeman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.