hw: disable alignment checking at earliest

Fix #3370
This commit is contained in:
Stefan Kalkowski 2019-05-22 12:56:01 +02:00 committed by Christian Helmuth
parent f18285205c
commit 6d8d6b5552
6 changed files with 9 additions and 6 deletions

View File

@ -62,7 +62,6 @@ void Bootstrap::Cpu::enable_mmu_and_caches(Genode::addr_t table)
Sctlr::C::set(sctlr, 1);
Sctlr::I::set(sctlr, 1);
Sctlr::V::set(sctlr, 1);
Sctlr::A::set(sctlr, 0);
Sctlr::M::set(sctlr, 1);
Sctlr::Z::set(sctlr, 1);
Sctlr::write(sctlr);

View File

@ -40,7 +40,6 @@ void Bootstrap::Cpu::enable_mmu_and_caches(Genode::addr_t table)
Sctlr::C::set(sctlr, 1);
Sctlr::I::set(sctlr, 1);
Sctlr::V::set(sctlr, 1);
Sctlr::A::set(sctlr, 0);
Sctlr::M::set(sctlr, 1);
Sctlr::Z::set(sctlr, 1);
Sctlr::write(sctlr);

View File

@ -25,11 +25,9 @@ struct Bootstrap::Cpu : Hw::Arm_cpu
static void init()
{
/*
* disable alignment checks and
* set exception vector to 0xffff0000
*/
access_t v = read();
A::set(v, 0);
V::set(v, 1);
write(v);
}

View File

@ -37,6 +37,15 @@
2:
/******************************
** Disable alignment checks **
******************************/
mrc p15, 0, r0, c1, c0, 0
bic r0, r0, #2 /* clear A bit */
mcr p15, 0, r0, c1, c0, 0
/*****************************************************
** Setup multiprocessor-aware kernel stack-pointer **
*****************************************************/

View File

@ -123,7 +123,6 @@ static inline void prepare_hypervisor(Genode::addr_t table)
Cpu::Sctlr::C::set(sctlr, 1);
Cpu::Sctlr::I::set(sctlr, 1);
Cpu::Sctlr::V::set(sctlr, 1);
Cpu::Sctlr::A::set(sctlr, 0);
Cpu::Sctlr::M::set(sctlr, 1);
Cpu::Sctlr::Z::set(sctlr, 1);
Cpu::Hsctlr::write(sctlr);

View File

@ -256,7 +256,6 @@ static inline void prepare_hypervisor(Genode::addr_t table)
Cpu::Sctlr::C::set(sctlr, 1);
Cpu::Sctlr::I::set(sctlr, 1);
Cpu::Sctlr::V::set(sctlr, 1);
Cpu::Sctlr::A::set(sctlr, 0);
Cpu::Sctlr::M::set(sctlr, 1);
Cpu::Sctlr::Z::set(sctlr, 1);
Cpu::Hsctlr::write(sctlr);