Hello,

This may be the first of many questions regarding the caches on the
SA-1110, so I beg the indulgence of the reader.

Section 6.2.3 of the SA-1110 manual describes the procedure for
software-flushing the dcache, as follows:

        mov     r0, #0xe0000000
        add     r1, r0, #8192
1:      ldr     r2, [r0], #32
        teq     r1, r0
        bne     1b

        mcr     p15, 0, r0, c7, c6, 0   @ invalidate D cache
        mov     pc, lr

I'm calling this from C, and as soon as I try to return from the calling
routine, I get a data abort. Examination of the stack frame reveals that
memory corruption has occurred.

(This is in a boot loader. Nicolas pointed out that this procedure is
used in the kernel decompressor prior to entering the kernel, but it
appears that no memory accesses take place between the invalidate and
the kernel jump.)

Eventually, the goal here is to debug the bootldr features which allow
interactive enabling and disabling of the i/dcaches, as well as to shut
down the caches before entering the kernel decompressor.

What am I missing?

Thanks,
-jd

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to