kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* dma_alloc for pcie_device, how can I allocate from the pci device memory?
@ 2023-08-21 14:11 Chan Kim
  0 siblings, 0 replies; only message in thread
From: Chan Kim @ 2023-08-21 14:11 UTC (permalink / raw)
  To: kernelnewbies

Hello all,

If you do dma_alloc_xxx for a pci_device, we normally allocate memory in
host memory and the IOMMU for the device is setup so that the bus address is
converted to host physical memory (or cpu memory). Isn't this right?
But how do we allocate memory in the PCI device itself, I mean from the BAR
memory address of the pci_device?
How do we control from which memory (host memory or PCIe device memory) to
allocate memory? Is BAR memory only for explicit allocation by the driver
only?

Thank you.
Chan Kim




_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-21 14:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21 14:11 dma_alloc for pcie_device, how can I allocate from the pci device memory? Chan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).