littlekernel / lk

LK embedded kernel
MIT License
3.17k stars 621 forks source link

armv7: you must invalidate the caches before using them #228

Open yifanlu opened 6 years ago

yifanlu commented 6 years ago

Specified here: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/I998929.html

Not sure if it's CA9 specific or applicable to other armv7 systems as well but we ran into issues there.

It's actually done correctly here https://github.com/littlekernel/lk/blob/master/arch/arm/arm/cache-ops.S#L175

but this change https://github.com/littlekernel/lk/commit/1e912a133c36abe79c9e37d6b9221c91216c77f4 causes caches to be enable way earlier than that code and it's not being invalidated there