Changeset bfb6576 in mainline for boot/arch/arm32/src/asm.S


Ignore:
Timestamp:
2013-01-23T00:12:15Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b80d132
Parents:
c19808fd
Message:

arm32, boot: Rework boot time cache handling. Enable Icache early.

Dcache still hangs after jumping to kernel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/src/asm.S

    rc19808fd rbfb6576  
    6666        # r2 is a kernel text end
    6767
    68         # make sure kernel is flushed and available in memory
    69         # Disable I-cache and D-cache before the kernel is started.
    70         # TODO disabling DCache should not be necessary...
    71 #define CP15_C1_IC              12
    72 #define CP15_C1_DC              2
    73         mrc     p15, 0, r4, c1, c0, 0
    74         bic     r4, r4, #(1 << CP15_C1_DC)
    75         bic     r4, r4, #(1 << CP15_C1_IC)
    76         mcr     p15, 0, r4, c1, c0, 0
    77 
    78         # use r4 as a moving pointer
    79         mov r4, r0
    80 3:
    81         # DCCMVAC (flush by virt address, to the point of coherence)
    82         mcr p15, 0, r4, c7, c10, 1
    83         # TODO: it would be better to use cacheline size
    84         add r4, r4, #4
    85         # are we there yet?
    86         cmp r4, r2
    87         blt 3b
    88         nop
    89         mov r4, #0
    9068       
    9169        #Wait for the operations to complete
     
    9977        # Clean ICache and BPredictors, r4 ignored (SBZ)
    10078        mcr p15, 0, r4, c7, c5, 0
     79        nop
    10180
    10281        #Wait for the operations to complete
    10382#ifdef PROCESSOR_ARCH_armv7_a
    10483        isb
     84        nop
    10585#else
    10686        # cp15 isb
    10787        mcr p15, 0, r4, c7, c5, 4
     88        nop
    10889#endif
    10990       
Note: See TracChangeset for help on using the changeset viewer.