littlekernel / lk

LK embedded kernel
MIT License
3.12k stars 613 forks source link

[arch][arm] Fix execution of TLBIALL instructions #235

Closed ghost closed 5 years ago

ghost commented 5 years ago

After a TLBI instruction the right thing to do is to execute DSB followed by ISB. DSB ensures that the TLBI is seen by all observers of the system and ISB ensures that the DSB has finished before continuing.

Also, the value in <Rt> is ignored for a TLBIALL. It isn't needed to load 0 to r12 and then use r12 in the instruction. In order not to cause confusion it is better to not load anything to r12.

ghost commented 5 years ago

This is the counterpart of https://github.com/littlekernel/lk/pull/234 for arm32.

travisg commented 5 years ago

looks good, thanks!