From: Paul M. <le...@Ch...> - 2001-08-11 07:51:27
|
On Sat, Aug 11, 2001 at 01:58:17AM -0400, David T Eger wrote: > I'm developing a framebuffer driver for embedded PowerPC where the > framebuffer resides in system RAM. I'd like to follow what the arm branch > does in their sa1100fb.c driver and do the following: > > (1) call alloc_pages(GFP_KERNEL|GFP_DMA, order) to get a chunk of ram > (2) call free_page() repeatedly on the extra that I won't use > (3) call mem_map_reserve() on all of the pages I am using > (4) call memremap() to remap this to a high virtual address that is marked > non-cacheable > (5) poke around at this remapped area in my graphics code. > > I tried this, but am getting data TLB misses. Am I missing > something? I'm running on a 2.4.2 derived kernel that's been patched by > Montavista. > Which embedded PowerPC is this? For MPC823 (RPXLite and LinuxPlanet) the base address is also retrieved from a chunk of memory, but it's done a little differently then how SA-1100 FB and what you're describing do it. The size is the line length * width, rounded to the nearest full page, and then handed off to alloc_bootmem_pages(). The result from that becomes the base address of the frame buffer. (Calling virt_to_phys() and such where necessary). The only catch is is that allocation should happen relatively early. In the case of the MPC823, page allocation was done in m8xx_setup_arch(). Regards, -- Paul Mundt <le...@ch...> |