inst cache invalidate

This commit is contained in:
Polprzewodnikowy 2022-09-11 21:22:36 +02:00
parent 72fe795e56
commit 4e18dffaa0
3 changed files with 10 additions and 2 deletions

View File

@ -65,9 +65,13 @@ static void cache_operation (uint8_t operation, uint8_t line_size, void *address
}
void cache_data_hit_invalidate (void *address, size_t length) {
cache_operation (0x11, 16, address, length);
cache_operation(0x11, 16, address, length);
}
void cache_data_hit_writeback (void *address, size_t length) {
cache_operation (0x19, 16, address, length);
cache_operation(0x19, 16, address, length);
}
void cache_inst_hit_invalidate (void *address, size_t length) {
cache_operation(0x10, 32, address, length);
}

View File

@ -288,6 +288,7 @@ uint32_t si_io_read (io32_t *address);
void si_io_write (io32_t *address, uint32_t value);
void cache_data_hit_invalidate (void *address, size_t length);
void cache_data_hit_writeback (void *address, size_t length);
void cache_inst_hit_invalidate (void *address, size_t length);
#endif

View File

@ -1,6 +1,7 @@
#include "error.h"
#include "fatfs/ff.h"
#include "init.h"
#include "io.h"
#include "menu.h"
@ -66,6 +67,8 @@ void menu_load_and_run (void) {
FF_CHECK(f_close(&fil), "Couldn't close menu file");
FF_CHECK(f_unmount(""), "Couldn't unmount drive");
cache_inst_hit_invalidate(menu, size);
deinit();
menu();