2014-06-04 15:35:54 +02:00
|
|
|
/*
|
|
|
|
* \brief Board driver for core on pandaboard
|
|
|
|
* \author Stefan Kalkowski
|
2015-09-02 13:59:31 +02:00
|
|
|
* \author Martin Stein
|
2014-06-04 15:35:54 +02:00
|
|
|
* \date 2014-06-02
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2014-2017 Genode Labs GmbH
|
2014-06-04 15:35:54 +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.
|
2014-06-04 15:35:54 +02:00
|
|
|
*/
|
|
|
|
|
2017-04-12 10:06:29 +02:00
|
|
|
#ifndef _CORE__SPEC__PANDA__BOARD_H_
|
|
|
|
#define _CORE__SPEC__PANDA__BOARD_H_
|
2014-06-04 15:35:54 +02:00
|
|
|
|
2019-07-10 13:30:54 +02:00
|
|
|
#include <hw/spec/arm/gicv2.h>
|
2019-05-16 13:42:46 +02:00
|
|
|
#include <hw/spec/arm/panda_board.h>
|
2019-07-10 16:12:21 +02:00
|
|
|
#include <spec/arm/cortex_a9_private_timer.h>
|
2016-01-11 11:02:52 +01:00
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
namespace Board {
|
2019-05-16 13:42:46 +02:00
|
|
|
using namespace Hw::Panda_board;
|
|
|
|
|
2019-07-10 13:30:54 +02:00
|
|
|
using Pic = Hw::Gicv2;
|
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
class L2_cache : public Hw::Pl310
|
|
|
|
{
|
|
|
|
private:
|
2016-01-11 11:02:52 +01:00
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
unsigned long _debug_value()
|
|
|
|
{
|
|
|
|
Debug::access_t v = 0;
|
|
|
|
Debug::Dwb::set(v, 1);
|
|
|
|
Debug::Dcl::set(v, 1);
|
|
|
|
return v;
|
|
|
|
}
|
2016-01-11 11:02:52 +01:00
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
public:
|
2016-01-11 11:02:52 +01:00
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
L2_cache(Genode::addr_t mmio) : Hw::Pl310(mmio) { }
|
2015-09-02 13:59:31 +02:00
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
void clean_invalidate()
|
|
|
|
{
|
|
|
|
using namespace Hw;
|
|
|
|
call_panda_firmware(L2_CACHE_SET_DEBUG_REG, _debug_value());
|
|
|
|
Pl310::clean_invalidate();
|
|
|
|
call_panda_firmware(L2_CACHE_SET_DEBUG_REG, 0);
|
|
|
|
}
|
|
|
|
};
|
2016-01-11 11:02:52 +01:00
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
L2_cache & l2_cache();
|
|
|
|
}
|
2014-06-04 15:35:54 +02:00
|
|
|
|
2017-04-12 10:06:29 +02:00
|
|
|
#endif /* _CORE__SPEC__PANDA__BOARD_H_ */
|