[PATCH] [POWERPC] Reintroduce O_SYNC flag to make DRAM non-cached.

Nick Spence nick.spence at freescale.com
Thu May 8 17:17:04 EST 2008


Benjamin Herrenschmidt wrote:
> On Wed, 2008-05-07 at 23:31 -0700, Spence Nick wrote:
> 
> Then you should completely carve it out of the LMB's which will ensure
> it's not seen as RAM by /dev/mem and not mapped by the linear mapping
> (well, the later depends ... if it's carved out of the top of RAM it
> should work fine, if it's a hole, I'm not sure we handle holes in the
> linear mapping on 32 bits).
> 

Unfortunately the memory window is 4 MBytes into the DDR and not at the 
end. It would be hard to put it at the end because the contents are 
location dependent and we can change the memory size.

The region is reserved with an lmb_reserve().

/* Set the location and size of the shared DDR memory region */
void* shared_mem_base = (void *)0x400000;
long  shared_mem_size = 0x100000;

....
lmb_reserve((unsigned long)shared_mem_base, shared_mem_size);



The page protection seemed to be allocated on a per pte basis, where 
each PTE is a small fixed size. I will need to check the TLB setup further.

Nick



More information about the Linuxppc-dev mailing list