mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
hw: cortex a9 diagnostic register initialization
We cannot count on the correct initialization of the diagnostic register of the secondary cores. But the boot core gets initialized by the bootchain, so we can copy over those values. Fix #3639
This commit is contained in:
parent
2ce0395fd8
commit
202333c881
@ -109,13 +109,18 @@ unsigned Bootstrap::Platform::enable_mmu()
|
||||
static Cpu_counter data_cache_invalidated;
|
||||
static Cpu_counter data_cache_enabled;
|
||||
static Cpu_counter smp_coherency_enabled;
|
||||
static unsigned long diag_reg = 0;
|
||||
|
||||
bool primary = primary_cpu;
|
||||
if (primary) primary_cpu = false;
|
||||
if (primary) {
|
||||
primary_cpu = false;
|
||||
diag_reg = Cpu::Diag::read();
|
||||
}
|
||||
|
||||
Cpu::Sctlr::init();
|
||||
Cpu::Cpsr::init();
|
||||
Actlr::disable_smp();
|
||||
Cpu::Diag::write(diag_reg);
|
||||
|
||||
/* locally initialize interrupt controller */
|
||||
::Board::Pic pic { };
|
||||
|
@ -249,6 +249,9 @@ struct Hw::Arm_cpu
|
||||
/* Physical Count register */
|
||||
ARM_CP15_REGISTER_64BIT(Cntpct, c14, 0);
|
||||
|
||||
/* Diagnostic register */
|
||||
ARM_CP15_REGISTER_32BIT(Diag, c15, c0, 0, 1);
|
||||
|
||||
/******************************
|
||||
** Program status registers **
|
||||
******************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user