[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: aranym vs atafb



Hi,

> > > So the question is how the atafb decides where to put the videoram and
> > > why is it related to FastRAM size...

Because __get_free_pages and friends allocate memory off the top of RAM?
Would that explain the behavior?

> >
> > I have just 2.6.22 source and there the screen_base is set as follows:
> >
> > screen_base = atari_stram_alloc(mem_req, "atafb");
> >
> > so if this is in 2.6.18-m68k then it looks like a bug in the
> > atari_stram_alloc() to me.
>
> atari_stram_alloc() allocates GFP_DMA'ble memory using __get_dma_pages(), as atafb is initialized after memory initialization.

Indeed. The only clean way out is to guarantee that __get_dma_pages() only
returns memory below the ST-RAM limit. max_dma_addr used tio reflect that
in the early days, but recent kernels treat the whole of RAM as DMA
memory. ISTR there was a reason for this ...

> If Fast RAM doesn't support DMA, it should be added as non-DMA'ble
> memory.

I'll try and see if that does work, now. Might have been changed as a
result of discontig memory support been broken in early 2.6.

The other way out is to allocate ST-RAM for atafb early (i.e. in setup.c)
and use that. Tried it, it does work. I can send a patch for Stephen to
get ahead with d-i testing if I cannot get the distinction between DMA
memory and FastRAM to work out.

	Michael



Reply to: