Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 4 years ago

Closed 4 years ago

#633 closed defect (fixed)

Do not attempt to disable branch predictors on ARM920T

Reported by: Jakub Jermář Owned by: Jiri Svoboda
Priority: major Milestone: 0.7.0
Component: helenos/boot/arm32 Version: mainline
Keywords: ARM920T, ARMv4, gta02 Cc:
Blocker for: Depends on:
See also:

Description

The ARM920T does not have the branch predictors, yet the initialization code in loader/arch/arm32/src/asm.S contains code which attempts to disable them:

jump_to_kernel:
...
#define CP15_C1_BP              11


#ifndef PROCESSOR_ARCH_armv7_a
        mrc     p15, 0, r4, c1, c0, 0
...        
        # Disable I-cache and Branche predictors.
...
        bic     r4, r4, #(1 << CP15_C1_BP)
        
        mcr     p15, 0, r4, c1, c0, 0
#endif

ARMv4 leaves this bit (bit Z) as implementation defined. On ARM920T, bit 11 of cp15's register c1 is reserved and reads and writes as 0. The above snippet, which is executed when we have something else than ARMv7, is therefore wrong for ARMv4 and even more so for ARM920T.

Change History (3)

comment:1 Changed 4 years ago by Jakub Jermář

Milestone: 0.7.0

comment:2 Changed 4 years ago by Jakub Jermář

Keywords: gta02 added

comment:3 Changed 4 years ago by Jakub Jermář

Resolution: fixed
Status: newclosed

Fix merged in mainline,2399.

Note: See TracTickets for help on using tickets.