hw: add Pl310::Debug register definitions

Ref #1312
This commit is contained in:
Martin Stein 2015-08-18 15:38:33 +02:00 committed by Christian Helmuth
parent c58de0d80e
commit 2b2007bc3f
2 changed files with 11 additions and 2 deletions

View File

@ -53,6 +53,12 @@ struct Arm::Pl310 : Genode::Mmio
struct Invalidate_by_way : Register <0x77c, 32> { };
struct Clean_invalidate_by_way : Register <0x7fc, 32> { };
struct Debug : Register<0xf40, 32>
{
struct Dcl : Bitfield<0,1> { };
struct Dwb : Bitfield<1,1> { };
};
Pl310(Genode::addr_t const base) : Mmio(base) { }
inline void sync() { while (read<Cache_sync>()) ; }

View File

@ -77,9 +77,12 @@ class Genode::L2_cache
void flush()
{
_secure_monitor.call(Secure_monitor::L2_CACHE_SET_DEBUG_REG, 0x3);
Arm::Pl310::Debug::access_t v = 0;
Arm::Pl310::Debug::Dwb::set(v, 1);
Arm::Pl310::Debug::Dcl::set(v, 1);
_secure_monitor.call(Secure_monitor::L2_CACHE_SET_DEBUG_REG, v);
_pl310.flush();
_secure_monitor.call(Secure_monitor::L2_CACHE_SET_DEBUG_REG, 0x0);
_secure_monitor.call(Secure_monitor::L2_CACHE_SET_DEBUG_REG, 0);
}
void invalidate() { _pl310.invalidate(); }