2012-10-23 17:12:09 +02:00
|
|
|
/*
|
2014-07-15 14:51:27 +02:00
|
|
|
* \brief CPU driver for core
|
2012-10-23 17:12:09 +02:00
|
|
|
* \author Martin stein
|
2016-01-11 11:02:52 +01:00
|
|
|
* \author Stefan Kalkowski
|
2012-10-23 17:12:09 +02:00
|
|
|
* \date 2011-11-03
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2011-2017 Genode Labs GmbH
|
2012-10-23 17:12:09 +02:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2012-10-23 17:12:09 +02:00
|
|
|
*/
|
|
|
|
|
2017-04-12 10:06:29 +02:00
|
|
|
#ifndef _CORE__SPEC__CORTEX_A9__CPU_H_
|
|
|
|
#define _CORE__SPEC__CORTEX_A9__CPU_H_
|
2012-10-23 17:12:09 +02:00
|
|
|
|
|
|
|
/* core includes */
|
2014-07-15 14:51:27 +02:00
|
|
|
#include <spec/arm_v7/cpu_support.h>
|
2012-12-10 13:55:19 +01:00
|
|
|
#include <board.h>
|
2012-10-23 17:12:09 +02:00
|
|
|
|
2018-05-14 11:30:24 +02:00
|
|
|
namespace Genode { struct Cpu; }
|
2014-04-09 12:14:38 +02:00
|
|
|
|
2018-05-14 11:30:24 +02:00
|
|
|
struct Genode::Cpu : Arm_v7_cpu
|
2014-07-15 14:51:27 +02:00
|
|
|
{
|
2018-05-14 11:30:24 +02:00
|
|
|
/**
|
|
|
|
* Clean and invalidate data-cache for virtual region
|
|
|
|
* 'base' - 'base + size'
|
|
|
|
*/
|
2020-03-03 15:56:50 +01:00
|
|
|
static void clean_invalidate_data_cache_by_virt_region(addr_t const base,
|
|
|
|
size_t const size)
|
2018-05-14 11:30:24 +02:00
|
|
|
{
|
|
|
|
Arm_cpu::clean_invalidate_data_cache_by_virt_region(base, size);
|
|
|
|
Board::l2_cache().clean_invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
static unsigned executing_id() { return Mpidr::Aff_0::get(Mpidr::read()); }
|
2014-07-15 14:51:27 +02:00
|
|
|
};
|
2012-10-23 17:12:09 +02:00
|
|
|
|
2017-04-12 10:06:29 +02:00
|
|
|
#endif /* _CORE__SPEC__CORTEX_A9__CPU_H_ */
|