2014-05-20 20:52:56 +00:00
|
|
|
/*
|
|
|
|
* \brief Cache operations
|
|
|
|
* \author Christian Prochaska
|
2021-06-24 12:27:37 +00:00
|
|
|
* \author Stefan Kalkowski
|
2014-05-20 20:52:56 +00:00
|
|
|
* \date 2014-05-13
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2014-2017 Genode Labs GmbH
|
2014-05-20 20:52:56 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2014-05-20 20:52:56 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__CPU__CACHE_H_
|
|
|
|
#define _INCLUDE__CPU__CACHE_H_
|
|
|
|
|
|
|
|
#include <base/stdint.h>
|
|
|
|
|
|
|
|
namespace Genode {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Make D-Cache and I-Cache coherent
|
2021-06-24 12:27:37 +00:00
|
|
|
*
|
|
|
|
* That means write back the D-Cache lines, and invalidate the I-Cache lines
|
2014-05-20 20:52:56 +00:00
|
|
|
*/
|
|
|
|
void cache_coherent(Genode::addr_t addr, Genode::size_t size);
|
2021-06-24 12:27:37 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Write back and delete D-Cache (commonly known as flush)
|
|
|
|
*/
|
|
|
|
void cache_clean_invalidate_data(Genode::addr_t addr, Genode::size_t size);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Delete D-Cache lines only
|
|
|
|
*/
|
|
|
|
void cache_invalidate_data(Genode::addr_t addr, Genode::size_t size);
|
2014-05-20 20:52:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__CPU__CACHE_H_ */
|