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

Re: [MiNT] Pexec and cache



... and since I enjoy talking to myself, I must call off my previous statement because instruction cache is invalidated only for PE_*GO modes, not for PE_LOAD! And that's very, very, very wrong, isn't it?

On Wed, Jan 23, 2013 at 10:51 PM, Miro Kropáček <miro.kropacek@gmail.com> wrote:
OK, I'll reply to myself, there's cpushi() in exec_region() so it's good. It also explains why it crashes mainly in TOS :) Phew. Hopefully Didier will release a fixed CT60 TOS version.


On Wed, Jan 23, 2013 at 10:36 PM, Miro Kropáček <miro.kropacek@gmail.com> wrote:
Hi,

I'll be extremely happy if someone corrects me but I can't see a cache invalidation code for Pexec anywhere in the kernel. Is that right?

I just discovered a bug in CT60 TOS's Pexec(), Didier only *flushes* the caches but not invalidate them which leads to horrible crashes if you use Pexec( PE_LOAD, ...) very intensively. This was bugging me for weeks, I couldn't understand how it's possible my plugins work perfectly on (cache-less) Aranym and Hatari and crashing from time to time on simplest (plugin) functions. As soon as I added 'cpusha bc' + 'cinva bc' combo after the Pexec() call, it started to work wonderfully.

Therefore I was curious how it's done in the kernel (as the kernel replaces CT60's Pexec) and I see nothing!

--
MiKRO / Mystic Bytes
http://mikro.atari.org



--
MiKRO / Mystic Bytes
http://mikro.atari.org



--
MiKRO / Mystic Bytes
http://mikro.atari.org