Have you invalidated the cache before enabling it? The contents of the cache are undefined at power-on, and must be invalidated before they are enabled, otherwise you risk picking up random data as code / data. Other possible thoughts - are you just enabling the cache, or are you also enabling the MMU in the same operation? If you are enabling the MMU then there is a chance that the translation tables are not correctly configured and you are getting stuck in fault loop because you do not hav permissions to access the page which you are executing.