2023-09-21 11:04:39 +00:00
|
|
|
/*
|
2024-04-15 12:41:29 +00:00
|
|
|
* \brief Helper for flushing cache lines
|
2023-09-21 11:04:39 +00:00
|
|
|
* \author Johannes Schlatow
|
|
|
|
* \date 2023-09-20
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2023 Genode Labs GmbH
|
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
|
|
*/
|
|
|
|
|
2024-04-15 12:41:29 +00:00
|
|
|
#ifndef _INCLUDE__SPEC__X86_64__CLFLUSH_H_
|
|
|
|
#define _INCLUDE__SPEC__X86_64__CLFLUSH_H_
|
2023-09-21 11:04:39 +00:00
|
|
|
|
2024-04-15 12:41:29 +00:00
|
|
|
namespace Genode {
|
2023-09-21 11:04:39 +00:00
|
|
|
inline void clflush(volatile void *addr)
|
|
|
|
{
|
|
|
|
asm volatile("clflush %0" : "+m" (*(volatile char *)addr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-15 12:41:29 +00:00
|
|
|
#endif /* _INCLUDE__SPEC__X86_64__CLFLUSH_H_ */
|