Re: Improving Performance
Geert,
Sort of - boots with kernel in ST-RAM, but nothing shown on the
screen. SCSI
appears to allocate DMA-able memory though:
Ignoring memory chunk at 0x0:0xe00000 before the first chunk
Haha, you still have it in the bootinfo. Fortunately Linux doesn't use
it ;-)
No idea how to suppress it - that would need changes to the bootstrap.
More debugging of atafb needed - I have a hunch that the ioremapped
kernel
virtual address is being used as physical address for atafb.
Indeed, atafb needs the physical address, so the ioremap() should be
moved
from atari_stram_init() to atafb.
That'll complicate matters (kernel in ST-RAM vs. not), see further
below.
There may be other virt/phys bugs in atafb, as before virt == phys for
ST-RAM,
so conversion didn't matter.
screen_info.screen_base should be the virtual address,
fb_fix_info.smem_start should be the physical address.
OK, I'll go through atafb to check - I remember it uses screen_base and
real_screen_base so we might just need to set them up right.
For comparison, amiga_chip_alloc() always returns virtual addresses.
Conversion is done through ZTWO_VADDR()/ZTWO_PADDR(), which is
just an offset, as we always map the first 16 MiB using transparent
translation.
That's set up in head,S, and not unmapped later, right?
Ah, perhaps you can do something similar? Hence keep the ioremap() in
atari_stram_init(), and provide helpers atari_stram_to_virt() and
atari_stram_to_phys() for phys/virt conversion?
The helpers can be no-ops if ST-RAM is not ioremapped().
That way the drivers don't need to know.
We'll have to do it that way - there's no generic virt_to_phys for
ioremapped memory AFAIR.
One other thing: for bookkeeping, it would be better if the pool is
registered
using the physical addresses, as its resources will show up in
/proc/iomem.
Hence:
stram_pool.start = PAGE_SIZE;
stram_pool.end = stram_pool.start + pool_size - 1;
stram_virt_offset = ioremap(stram_pool.start,
resource_len(stram_pool) - stram_pool.start;
and
void *atari_stram_to_virt(unsigned long phys)
{
return (void *)(phys + stram_virt_offset);
}
That should work. I'll look at that as time permits.
(if the kernel is in ST-RAM, stram_virt_offset should be 0);
and call atari_stram_to_virt() just before returning from
atari_stram_alloc().
Same for the virt to phys conversion in atari_stram_free().
Need to batten down the hatches now - we expect cyclone Lusi to hit
from
tomorrow.
Keep Lusi out. The only cyclones that belong near a hacker's house are
Altera
Cyclones ;-)
These don't come in 130 k gust units, I hope ... Less rain, more wind
seems to be the theme for overnight and tomorrow.
Cheers,
Michael
Reply to: