Skip to contentSkip to conversation

why need disable icache

U-Boot-Users Jackson 2 participants 2 messages Nov 8, 2006

lore
Share & tools
lore

Jackson

author
#0 lore raw

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

#1 lore raw
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