*CACHE OFF on Pi3
Jon Abbott (1421) 2651 posts |
This command causes the Pi3 to crash horribly (tested on 24-Aug-16 build). Does it actually attempt to turn the cache off? I thought it was ignored on the Pi build. |
Jeffrey Lee (213) 6048 posts |
It does attempt to turn the cache off, and it does succeed, but things will then fail pretty rapidly due to the Cortex-A53 raising an exception if you try and use LDREX/STREX with non-cacheable areas (or when the cache is disabled). Deciding exactly what to do with *cache off on the Pi 3 (and potentially other modern machines) is one of the things I haven’t decided on yet. Potentially we could make it so that *cache off simply makes application space for the current task non-cacheable – that would be enough to allow for compatibility with a fair amount of self-modifying code, without adversely affecting the rest of the system. Or maybe the amount of code that relies on *cache off is so small that we can just disable the command altogether on the Pi 3. |
Rick Murray (539) 13840 posts |
This gets my vote. Wasn’t the Ah, yes, the PRM’s application note for the command says: “Games writers may wish to disable the ARM3 cache so that ARM3 based machines run at a similar speed to older ARM2 based machines.” With this in mind, and the fact that modern caches are rather different things (and rather necessary), the command should have been marked deprecated a decade ago – so, yes, it really ought to have no effect now. |
Jon Abbott (1421) 2651 posts |
I’d disable it if it’s going to break the system. I honestly thought it had aleady been disabled on everything past StrongARM and could swear I read somewhere that it was deprecated. |
Chris Evans (457) 1614 posts |
My vote is disable now and add to the long term, to do list “make application space for the current task non-cacheable” with a low priority. |
Chris Hall (132) 3554 posts |
Cache off is one way to get PhotoDesk running correctly (I think) but just whilst it loads. |
Jon Abbott (1421) 2651 posts |
I don’t believe this will work on Pi3 and possibly other recent CPU’s, going by the what Jeffery has said above. A Pi3 will either crash or hang immediately you turn the cache off. |
Chris Hall (132) 3554 posts |
PhotoDesk ony works on IGEPv5 using Aemulor (but still gets red and blue swapped). |
Rick Murray (539) 13840 posts |
Are you not confusing alignment exceptions with cache? |