Skip to content
Snippets Groups Projects
Commit 775ca8c9 authored by Adrian Danis's avatar Adrian Danis
Browse files

x86: Fix clflush invocation in flushCacheLine

This fixes flushCacheLine to flush the line pointer to be vaddr,
not the cache line of the stack location holding the vaddr pointer
parent 1ca0fa1f
No related branches found
No related tags found
No related merge requests found
......@@ -86,9 +86,9 @@ uint32_t CONST getCacheLineSize(void);
uint32_t CONST getCacheLineSizeBits(void);
/* Flushes a specific memory range from the CPU cache */
static inline void flushCacheLine(void* vaddr)
static inline void flushCacheLine(volatile void* vaddr)
{
asm volatile("clflush %[vaddr]" :: [vaddr] "m"(vaddr));
asm volatile ("clflush %[vaddr]" : [vaddr] "+m"(*((volatile char *)vaddr)));
}
void flushCacheRange(void* vaddr, uint32_t size_bits);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment