RobinMueller[m]: ```-.type _invalidate_dcache, %function -invalidate_dcache: - mrc p15, 1, r0, c0, c0, 1 /* read CLIDR */ - ands r3, r0, #0x7000000 - mov r3, r3, lsr #23 /* cache level value (naturally aligned) */ - beq finished - mov r10, #0 /* start with level 0 */ -loop1: - add r2, r10, r10, lsr #1 /* work out 3xcachelevel */ - mov r1, r0, lsr r2 /* bottom 3 bits are the Cache type for this level */ - and r1, r1, #7 /* get those 3 bits alone */ - cmp r1, #2 - blt skip /* no cache or only instruction cache at this level */ - mcr p15, 2, r10, c0, c0, 0 /* write the Cache Size selection register */ - isb /* isb to sync the change to the CacheSizeID reg */ - mrc p15, 1, r1, c0, c0, 0 /* reads current Cache Size ID register */ - and r2, r1, #7 /* extract the line length field */ - add r2, r2, #4 /* add 4 for the line length offset (log2 16 bytes) */ - ldr r4, =0x3ff - ands r4, r4, r1, lsr #3 /* r4 is the max number on the way size (right aligned) */ - clz r5, r4 /* r5 is the bit position of the way size increment */ - ldr r7, =0x7fff - ands r7, r7, r1, lsr #13 /* r7 is the max number of the index size (right aligned) */ -loop2: - mov r9, r4 /* r9 working copy of the max way size (right aligned) */```