* memory allocation over 4gb under x86_64
@ 2009-03-03 11:22 protagora27 protagora27
2009-03-04 1:44 ` KAMEZAWA Hiroyuki
0 siblings, 1 reply; 2+ messages in thread
From: protagora27 protagora27 @ 2009-03-03 11:22 UTC (permalink / raw)
To: linux-kernel
Hello folks,
I have a 64 bit dma that I have to program with 64 bit physical
address
beyond 4 gb because I have to test dma with memory allocation beyond
4 gb.
I 'm using linux x86_64 2.6.24 and I have 8 gb ram.
How can I allocate physical dma memory beyond 4gb ? In x86_64
can I use __pa to have physical address ?
I have used kmalloc giving virtual address : ffff810225d10340
and using __pa i have: 225d10340 that is over 8 gb .
Does it mean that kmalloc return address is not linear mapped with phys ram ?
I would like to find a function that returns a physical adddres beyond
4gb
and then i write phys address in dma register .
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: memory allocation over 4gb under x86_64
2009-03-03 11:22 memory allocation over 4gb under x86_64 protagora27 protagora27
@ 2009-03-04 1:44 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 2+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-04 1:44 UTC (permalink / raw)
To: protagora27 protagora27; +Cc: linux-kernel
On Tue, 3 Mar 2009 12:22:18 +0100
protagora27 protagora27 <protagora27@gmail.com> wrote:
> Hello folks,
>
> I have a 64 bit dma that I have to program with 64 bit physical
> address
> beyond 4 gb because I have to test dma with memory allocation beyond
> 4 gb.
> I 'm using linux x86_64 2.6.24 and I have 8 gb ram.
> How can I allocate physical dma memory beyond 4gb ? In x86_64
> can I use __pa to have physical address ?
> I have used kmalloc giving virtual address : ffff810225d10340
> and using __pa i have: 225d10340 that is over 8 gb .
> Does it mean that kmalloc return address is not linear mapped with phys ram ?
>
IIUC, you can think that kmalloc() always retrun memory where __pa() works well.
Please check memory map of the host. It seems to have memory hole.
Thanks,
-Kame
> I would like to find a function that returns a physical adddres beyond
> 4gb
> and then i write phys address in dma register .
>
> Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-04 1:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-03 11:22 memory allocation over 4gb under x86_64 protagora27 protagora27
2009-03-04 1:44 ` KAMEZAWA Hiroyuki
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).