Re: what is the diff between PCI I/O & memory space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mandeep Singh Sandhu wrote:

hi all,
few basic PCI doubts :-

1) What is difference between PCI I/O & Memory regions??

In a PCI setup the I/O address space and memory are separate, but share a common bus. In memory mapped I/O the address space is kept in memory. In IA32 archictectures there is a PIO (programmed I/O) that the cpu uses to get access to the address space in memory. I believe PCI I/O is an older and faster method than memory mapped I/O.

2) What r these 2 regions required for??

Some devices use PCI I/O, some use memory mapped I/O. This can be configured in the kernel.

Bill

3) Linux's PCI subsystem provides some functions like
  "pci_resource_start" to get resource info.
  There's an arg passed to it - "int bar"(base adr. reg.).
  In one of the driver files i've seen for getting the I/O
  and Memory start addresses "bar" was passed as 0 & 1
  respectively. In rubini's book it says these values can
  vary from 0 to 5 (for the 6 base addr. regs i guess!).
  what does these values signify. Does it mean BAR0 holds
  the start address of PCI I/O space etc.???

TIA
- /dev/mandeep


-----Original Message----- From: Krishnakumar. R [mailto:krishnakumar@naturesoft.net] Sent: Friday, March 05, 2004 6:30 PM To: Mandeep Singh Sandhu; kernelnewbies@nl.linux.org Subject: Re: PCI DMA info require


Hi,




hi all,
i need some info as to how DMA is used by
PCI devices ex. an ethernet card, how DMA
fits in the whole picture.



I think that the DMA is performed by the network card dma
controller (pci dma controller).


In case of RTL network cards: 1. Set the card to be dma bus master
2. we will give first allocate dma-able area using the "pci_alloc_consistent".
3. Inform the network card about this area (feed in the physical addresses to
the network card registers)
4. While reception, the network would automatically perform
DMA from the local buffer (of the network card) to the location which we had specified in step 1. So we need to only take the packets directly
from that place (no headache of thinking about the DMA, network card will
do it for us.)


(This is similar in case of transmission also)



also there is a
field in the net_device struct "dma" which
holds the "DMA channel allocated by the device",
what does this mean, is a seperate DMA controller
used by each PCI device???



Hmm... looks like this member of the structure is not used in most drivers (8139too.c, ne2k-pci.c etc.)

Hope that helps,
Regards,
KK.





-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux