RE: DMA zone

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

 



>I got through the mails in the list and I came to know that every
>architcture is having DMA zone. Am I correct. If so How to find it.

	Generally, there are 3 zones, ZONE_DMA, ZONE_NORMAL and
ZONE_HIGHMEM.

In x86 platforms, normally ZONE_DMA will be 0-16 MB (actually 
depends on how much total memory you have, but mostly this is
the figure), ZONE_NORMAL which is from 16-896 MB and any thing above that
is in ZONE_HIGHMEM.

The reason that ZONE_DMA being in 0-16 MB is that, some the legacy ISA
devices
had only about 24 address lines and hence can address only up to 16 MB of
memory, so for these devies to do DMA, the memory region from where data
is to be DMAed should fall withing 16 MB. So when you do a 'kmalloc' or 
et_free_pages' in this case, u need to specify the GFP_DMA flag.



>I have one requirement like , I have one card(AGENT) which is DMA
>capable.And this card is inserted in the pci slot of another board. Now
>I want to transfer the data from Agent memory to Host memory in linux.

>when I put the card(AGENT) in the HOST's PCI slot, and display the pci
>header information ,and the BAR0 is configured at 0xe0000000 and all
>remaining BAR's are zeroes. Could u please let me know how to proceed
>further for data transfer.

	Your device's specification will tell you which register to 
program and whether your device is capable of scatter gather and
all that stuff

--
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