hw: cortex a9 diagnostic register fixup
This is a follow-up fix for commit 202333c881
.
It checks for the diagnostic registers being already setup correctly.
Otherwise on platforms with secure firmware, like Pandaboard it will stuck.
Ref #3639
This commit is contained in:
parent
d8bcaa4fa4
commit
256b2fa3e1
|
@ -120,7 +120,14 @@ unsigned Bootstrap::Platform::enable_mmu()
|
||||||
Cpu::Sctlr::init();
|
Cpu::Sctlr::init();
|
||||||
Cpu::Cpsr::init();
|
Cpu::Cpsr::init();
|
||||||
Actlr::disable_smp();
|
Actlr::disable_smp();
|
||||||
Cpu::Diag::write(diag_reg);
|
|
||||||
|
/**
|
||||||
|
* this is a workaround for platforms with secure firmware
|
||||||
|
* where it is not allowed to access the diagnostic register from
|
||||||
|
* the non-secure-world, but we expect that the firmware already
|
||||||
|
* set it accordingly
|
||||||
|
*/
|
||||||
|
if (Cpu::Diag::read() != diag_reg) Cpu::Diag::write(diag_reg);
|
||||||
|
|
||||||
/* locally initialize interrupt controller */
|
/* locally initialize interrupt controller */
|
||||||
::Board::Pic pic { };
|
::Board::Pic pic { };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user