Re: ARM linux DMA alloc question





David M wrote:
On Wed, 25 Jul 2007 21:04:06 -0700, jz rearranged some electrons to form:


Hi,

I am using Linux kernel 2.6.12.6 for my ARM project.
I use dma_alloc_writecombine() to allocate DMA uncached
memory. The default consistent memory is define in
CONSISTENT_BASE and CONSISTENT_END as 0xffc00000 and
0xffe00000 which is 2MB. Since I need about 4MB of
DMA memory, so I changed CONSISTENT_BASE to 0xffa00000,
but I got kernel OOPS:

kernel BUG at arch/arm/mm/consistent.c:218!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 67f28000
[00000000] *pgd=07ef2031, *pte=00000000, *ppte=00000000
Internel error: Oops: 817 [#1]


Can anyone shed some light on me regarding this problem?
Thanks.


Looks like you have an uninitialized (zero-value) pointer that you are
trying to use. That's what "null pointer" means.


Hi,

This would happen only when DMA malloc have grown over 2 MB.

Thanks.
.



Relevant Pages

  • Re: Huge pages and small pages. . .
    ... Since the CPU uses virtual memory always, ... The actual allocation only occurs when an access happens. ... the kernel just marks a promised ... DMA operation occurs that crosses page boundaries. ...
    (Linux-Kernel)
  • Re: about CeSafeCopyMemory in CE 6
    ... It does not do memory marshalling. ... If you'll be accessing the pointer asynchronously then ... The kernel operates in the upper 2G of address space. ... can't access the kernel mode space even though it is mapped in. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to get a 32-bit buffer-pointer in the driver and how to pass this to the PCI-board (no dma)
    ... Memory which needs to be exported from kernel to user-space, ... There's no VDMA or DMA initiated from the driver side. ...
    (comp.unix.solaris)
  • Re: PCIe device driver question
    ... I was thinking that the MMIO and reserve memory ... pages, allocated several additional memaligned pages in user space, used ... kernel using an ioctlcall, ... The DMA was just NOT happening on ...
    (Linux-Kernel)
  • Re: using DMA ..
    ... > has a DMA addressing limitation like say capable of driving only 24 ... The "PCI controller" is simply the bridge devicebetween the bus your ... allocations are from the first 16MB of memory. ... To actually look at the DMA pages from your (kernel) driver, ...
    (comp.os.linux.development.system)