xref: /haiku/src/system/libroot/os/arch/riscv64/cachectl.cpp (revision 408a7e27d991f2cbc3335b8d2a119ad5db7d9a6d)
1ec8a8f1cSX512 /*
2ec8a8f1cSX512  * Copyright 2021, Haiku, Inc.
3ec8a8f1cSX512  * Distributed under the terms of the MIT License.
4ec8a8f1cSX512  */
5ec8a8f1cSX512 
6*408a7e27SX512 #include <image.h>
7*408a7e27SX512 
8ec8a8f1cSX512 
9ec8a8f1cSX512 extern "C" void
__riscv_flush_icache(void * start,void * end,unsigned long int flags)10ec8a8f1cSX512 __riscv_flush_icache(void *start, void *end, unsigned long int flags)
11ec8a8f1cSX512 {
12*408a7e27SX512 	clear_caches(start, (uint8*)end - (uint8*)start, B_INVALIDATE_ICACHE);
13ec8a8f1cSX512 }
14