>-----Original Message----- >From: Lewis Adam-CAL022 [mailto:Adam.Lewis@xxxxxxxxxxxx] >Sent: Wednesday, October 05, 2005 1:08 PM >To: Steve Iribarne >Cc: linux-net@xxxxxxxxxxxxxxx >Subject: RE: Memory BAT and PPC >Hi Steve, >How are you allocating memory now? With kmalloc? Kmalloc best I know >always allows memory optimization (ala caching). I'm assuming you're doing >DMA transfers and finding garbage in the DMA buffer (not what you thought >you put there). In any case, try using consistent_alloc(), I've used this >with success on the PPC405; it allocates memory such that it cannot be >cached which should solve your dilemma. >We are using a PPC 750 with 512m of RAM. 1) When we try to allocate memory using consistent_alloc we get a failure with get_pteptr - there is no pte. 2) When we try using dma_alloc_coherent the system locks up when we try to access that memory. I'm guessing these problems stem from the memory being allocated is from the 384 bytes of RAM that gets handed over to BATs 2 AND 3, not the remaining memory handled by the page table. In the first case, pages are allocated, but since if came from the BAT region, will not have a page table mapping. In the second case, if dma_alloc_init gets memory from the BAT region, then we have the BAT and page management mechanisms both trying to control the memory. Does this sound like a good theory? Has anybody encountered this problem before? - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html