67 lines
1.3 KiB
C++
67 lines
1.3 KiB
C++
/*
|
|
* \brief ARM Cortex A8 CPU driver for core
|
|
* \author Martin stein
|
|
* \author Stefan Kalkowski
|
|
* \date 2011-11-03
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2011-2016 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _CPU_H_
|
|
#define _CPU_H_
|
|
|
|
/* core includes */
|
|
#include <spec/arm_v7/cpu_support.h>
|
|
|
|
namespace Genode
|
|
{
|
|
/**
|
|
* Part of CPU state that is not switched on every mode transition
|
|
*/
|
|
class Cpu_lazy_state { };
|
|
|
|
/**
|
|
* CPU driver for core
|
|
*/
|
|
class Cpu;
|
|
}
|
|
|
|
namespace Kernel { using Genode::Cpu_lazy_state; }
|
|
|
|
class Genode::Cpu : public Arm_v7
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* Write back dirty cache lines and invalidate the whole cache
|
|
*/
|
|
void clean_invalidate_data_cache() {
|
|
clean_invalidate_inner_data_cache(); }
|
|
|
|
/**
|
|
* Invalidate all cache lines
|
|
*/
|
|
void invalidate_data_cache() {
|
|
invalidate_inner_data_cache(); }
|
|
|
|
/**
|
|
* Ensure that TLB insertions get applied
|
|
*/
|
|
void translation_table_insertions();
|
|
|
|
/**
|
|
* Post processing after a translation was added to a translation table
|
|
*
|
|
* \param addr virtual address of the translation
|
|
* \param size size of the translation
|
|
*/
|
|
static void translation_added(addr_t const addr, size_t const size);
|
|
};
|
|
|
|
#endif /* _CPU_H_ */
|