runtime_init: call cache::init before copying

It is unclear why this reordering is useful--it should be the case
that the previous content of the cache is invalidated on write
regardless of when cache::init is called.
This commit is contained in:
Zack Buhman 2024-04-15 18:17:32 +08:00
parent bd33fbf2e4
commit 5e54666822

View File

@ -46,6 +46,8 @@ void copy(uint32_t * start, const uint32_t * end, uint32_t * load)
extern "C"
void runtime_init()
{
cache::init();
// relocate text (if necessary)
copy(&__text_link_start, &__text_link_end, &__text_load_start);
@ -71,6 +73,4 @@ void runtime_init()
while (start < end) {
((init_t*)(*start++))();
}
cache::init();
}