Sakura-IT / PowerPCAmiga

Next generation PowerPC library for classic AmigaOS (work in progress)
12 stars 0 forks source link

Improve the way data from FAST RAM is accessed by the PPC #10

Open DvdBoon opened 4 years ago

DvdBoon commented 4 years ago

Currently, the PPC asks the 68K to fetch it data 1-4 bytes at the time when this data is in FAST RAM. This is a context switch every time this happens:

I am thinking of moving a 4096 bytes block of FAST RAM in which the data is contained to PPC RAM and point the 68K MMU to it. The PPC MMU also has to be updated accordingly.

E.g. access by the PPC to 0x08100000 (FAST RAM) with PPC base at 0x6c000000 as seen from 68K:

1) Send request to 68K 2) 68K moves 0x08100000 - 0x08101000 (an MMU page) to 0x6c3d0000 3) 68K MMU is updated to point to 0x6c3d0000 when 0x08100000 is addressed. 4) 68K tells PPC it is done 5) PPC MMU is updated to point to 0x003d0000 when 0x08100000 is addressed.

Every access within this page now does not trigger a context switch.

Maybe have 2 of those pages active. copy back the oldest one when a new one is needed.

DvdBoon commented 4 years ago

There is plenty of room within the first 4.5 MB of the PPC cards. This is only used for the kernel (50k) and messages (2MB).