Re: kernel memory allocation - please help me

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

 



On Sat, 2006-05-27 at 17:13 +0530, Muneeswaran P - TLS, Chennai wrote:
> Hi,
> 
> Pls help me.
> 
> 	I am writing device driver (kernel 2.6 ) for PCI-X card.
> 
> 	Pls clarify the following doubts:
> 	1. DPRAM is memory mapped to PCI-X card. BAR-0 is mapped to DPRAM.
> 	2. I have to transfer data from main memory to DPRAM using bus
> master concept.
> 
> 	3. I have allocated main memory using kmalloc() call. How to make
> this main memory area as non-cacheable one ? 

why would it have to be uncachable?

> 
> 	4. Whether DMA mapping (pci_map_single() call ) should be done for
> both DPRAM and main memory ?

for main memory only; you would need ioremap for the BAR memory *IF* you
want the cpu to access it

> 
>	   4.a) I will get the physical address of DPRAM memory (memory
> mapped to PCI-X card) from BAR-0 register. Can i use this   physical addres
> directly for data transer using bus master (without pci_map_single() call.)

that is device memory and up to your device; more than likely the bus
master function of your device just starts at offset 0 of the dpram and
doesn't care at all about the bar address



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