mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-11 21:32:57 +00:00
hw: enable branch predictor on rpi
* Z-bit was never enabled for rpi1 * Write buffer, and TCM bits are deprecated in this processor generation so do not use them Ref #3247
This commit is contained in:
parent
b11da67679
commit
04d8c859d8
@ -39,23 +39,7 @@ unsigned Bootstrap::Platform::enable_mmu()
|
||||
{
|
||||
using ::Board::Cpu;
|
||||
|
||||
struct Sctlr : Cpu::Sctlr
|
||||
{
|
||||
struct W : Bitfield<3,1> { }; /* enable write buffer */
|
||||
struct Dt : Bitfield<16,1> { }; /* global data TCM enable */
|
||||
struct It : Bitfield<18,1> { }; /* global instruction TCM enable */
|
||||
struct U : Bitfield<22,1> { }; /* enable unaligned data access */
|
||||
struct Xp : Bitfield<23,1> { }; /* disable subpage AP bits */
|
||||
};
|
||||
|
||||
Cpu::Sctlr::init();
|
||||
Cpu::Sctlr::access_t sctlr = Cpu::Sctlr::read();
|
||||
Sctlr::W::set(sctlr, 1);
|
||||
Sctlr::Dt::set(sctlr, 1);
|
||||
Sctlr::It::set(sctlr, 1);
|
||||
Sctlr::U::set(sctlr, 1);
|
||||
Sctlr::Xp::set(sctlr, 1);
|
||||
Cpu::Sctlr::write(sctlr);
|
||||
|
||||
Cpu::Cpsr::init();
|
||||
|
||||
@ -82,9 +66,18 @@ unsigned Bootstrap::Platform::enable_mmu()
|
||||
Cpu::Ttbr0::write(ttbr);
|
||||
Cpu::Ttbr1::write(ttbr);
|
||||
|
||||
sctlr = Cpu::Sctlr::read();
|
||||
struct Sctlr : Cpu::Sctlr
|
||||
{
|
||||
struct U : Bitfield<22,1> { }; /* enable unaligned data access */
|
||||
struct Xp : Bitfield<23,1> { }; /* disable subpage AP bits */
|
||||
};
|
||||
|
||||
Cpu::Sctlr::access_t sctlr = Cpu::Sctlr::read();
|
||||
Cpu::Sctlr::C::set(sctlr, 1);
|
||||
Cpu::Sctlr::I::set(sctlr, 1);
|
||||
Sctlr::U::set(sctlr, 1);
|
||||
Sctlr::Xp::set(sctlr, 1);
|
||||
Cpu::Sctlr::Z::set(sctlr, 1);
|
||||
Cpu::Sctlr::M::set(sctlr, 1);
|
||||
Cpu::Sctlr::write(sctlr);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user