mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 08:25:38 +00:00
base-hw: Enable caches on ARM v6
This commit is contained in:
parent
d43d9900ab
commit
65f20262cb
@ -132,14 +132,6 @@ namespace Arm
|
||||
ap_bits[Page_flags::W::get(flags)][Page_flags::K::get(flags)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Wether support for caching is already enabled
|
||||
*
|
||||
* FIXME: Normally all ARM platforms should support caching,
|
||||
* but for some 'base_hw' misses support by now.
|
||||
*/
|
||||
inline bool cache_support();
|
||||
|
||||
/**
|
||||
* Memory region attributes for the translation descriptor 'T'
|
||||
*/
|
||||
|
@ -89,9 +89,6 @@ namespace Arm_v6
|
||||
}
|
||||
|
||||
|
||||
bool Arm::cache_support() { return 0; }
|
||||
|
||||
|
||||
template <typename T>
|
||||
static typename T::access_t
|
||||
Arm::memory_region_attr(Arm::Page_flags::access_t const flags)
|
||||
@ -106,13 +103,10 @@ Arm::memory_region_attr(Arm::Page_flags::access_t const flags)
|
||||
if(Arm::Page_flags::D::get(flags))
|
||||
return 0;
|
||||
|
||||
if(cache_support()) {
|
||||
if(Arm::Page_flags::C::get(flags))
|
||||
return Tex::bits(5) | C::bits(0) | B::bits(1);
|
||||
if(Arm::Page_flags::C::get(flags))
|
||||
return Tex::bits(5) | C::bits(0) | B::bits(1);
|
||||
|
||||
return Tex::bits(6) | C::bits(1) | B::bits(0);
|
||||
}
|
||||
return Tex::bits(4) | C::bits(0) | B::bits(0);
|
||||
return Tex::bits(6) | C::bits(1) | B::bits(0);
|
||||
}
|
||||
|
||||
#endif /* _TLB__ARM_V6_H_ */
|
||||
|
@ -126,19 +126,11 @@ Arm::memory_region_attr(Arm::Page_flags::access_t const flags)
|
||||
if(Arm::Page_flags::D::get(flags))
|
||||
return Tex::bits(2) | C::bits(0) | B::bits(0);
|
||||
|
||||
if(cache_support()) {
|
||||
if(Arm::Page_flags::C::get(flags))
|
||||
return Tex::bits(5) | C::bits(0) | B::bits(1);
|
||||
if(Arm::Page_flags::C::get(flags))
|
||||
return Tex::bits(5) | C::bits(0) | B::bits(1);
|
||||
|
||||
return Tex::bits(6) | C::bits(1) | B::bits(0);
|
||||
}
|
||||
return Tex::bits(4) | C::bits(0) | B::bits(0);
|
||||
return Tex::bits(6) | C::bits(1) | B::bits(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Arm::cache_support() { return 1; }
|
||||
|
||||
|
||||
#endif /* _TLB__ARM_V7_H_ */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user