mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-06 01:11:46 +00:00
base-hw: disable L2 cache on Pandaboard (fix #797)
* Fix bitfield typo in TTBR0 register for ARMv7
This commit is contained in:
parent
731493641b
commit
ba273fb6fb
@ -122,7 +122,7 @@ namespace Arm_v7
|
|||||||
*/
|
*/
|
||||||
struct Ttbr0 : Arm::Cpu::Ttbr0
|
struct Ttbr0 : Arm::Cpu::Ttbr0
|
||||||
{
|
{
|
||||||
struct Nos : Bitfield<6,1> { }; /* not outer shareable */
|
struct Nos : Bitfield<5,1> { }; /* not outer shareable */
|
||||||
|
|
||||||
struct Irgn_1 : Bitfield<0,1> { }; /* inner cachable mode */
|
struct Irgn_1 : Bitfield<0,1> { }; /* inner cachable mode */
|
||||||
struct Irgn_0 : Bitfield<6,1> { }; /* inner cachable mode */
|
struct Irgn_0 : Bitfield<6,1> { }; /* inner cachable mode */
|
||||||
|
@ -29,6 +29,23 @@ namespace Genode
|
|||||||
*/
|
*/
|
||||||
class Core_tlb : public Tlb
|
class Core_tlb : public Tlb
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On Pandaboard the L2 cache needs to be disabled by a
|
||||||
|
* TrustZone hypervisor call
|
||||||
|
*/
|
||||||
|
void _disable_outer_l2_cache()
|
||||||
|
{
|
||||||
|
asm volatile (
|
||||||
|
"stmfd sp!, {r0-r12} \n"
|
||||||
|
"mov r0, #0 \n"
|
||||||
|
"ldr r12, =0x102 \n"
|
||||||
|
"dsb \n"
|
||||||
|
"smc #0 \n"
|
||||||
|
"ldmfd sp!, {r0-r12}");
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,6 +54,13 @@ namespace Genode
|
|||||||
Core_tlb()
|
Core_tlb()
|
||||||
{
|
{
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable L2-cache by now, or we get into deep trouble with the MMU
|
||||||
|
* not using the L2 cache
|
||||||
|
*/
|
||||||
|
_disable_outer_l2_cache();
|
||||||
|
|
||||||
map_core_area(Board::RAM_0_BASE, Board::RAM_0_SIZE, 0);
|
map_core_area(Board::RAM_0_BASE, Board::RAM_0_SIZE, 0);
|
||||||
map_core_area(Board::MMIO_0_BASE, Board::MMIO_0_SIZE, 1);
|
map_core_area(Board::MMIO_0_BASE, Board::MMIO_0_SIZE, 1);
|
||||||
map_core_area(Board::MMIO_1_BASE, Board::MMIO_1_SIZE, 1);
|
map_core_area(Board::MMIO_1_BASE, Board::MMIO_1_SIZE, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user