why need disable icache
Hi, all
I have been confused by cache recently.
1. why need we disable icache and dcache at the beginning of the u-boot code?
2. when can we enable them ?
Thank you for the help.
Best regards
Jackson
Quoted 4 lines · Jackson
Hi, all
I have been confused by cache recently.
1. why need we disable icache and dcache at the beginning of the u-boot code?
In case the system does a soft reset: a soft reset generally leaves caches enabled.
Quoted 1 line
2. when can we enable them ?
Simple question, complex answer. The simple answer is after the CPU and your hardware are initialized properly such that enabling caches doesn't cause it to crash. The details is where it gets complex because it depends on the processor you are using, the hardware you have, and how you are using both the processor and the hardware. IOW, only you can answer the question.
Quoted 4 lines
Thank you for the help.
Best regards
Jackson
gvb