Help on Linux for MPC860

Jim Chapman jim.chapman at iname.com
Fri Nov 19 01:22:43 EST 1999


Shuangjun Zhu wrote:

> Hello,
>
> How to disable the I-Cache and D-Cache in the kernel for MPC860?
>
> Thanks!
> Shuangjun Zhu

I added a new config option in arch/ppc/config.in called CONFIG_NO_CACHE
and added conditional compilation to arch/ppc/mbxboot/head.S and
arch/ppc/kernel/head.S as follows

In arch/ppc/mbxboot/head.S...

/* Most 8xx boards don't boot up with the I-cache enabled.  Do that
 * now because the decompress runs much faster that way.
 */
        lis     r3, IDC_INVALL at h
        mtspr   IC_CST, r3
#ifndef CONFIG_NO_CACHE
        lis     r3, IDC_ENABLE at h
        mtspr   IC_CST, r3
#endif /* CONFIG_NO_CACHE */

and in arch/ppc/kernel/head.S....

        /* Since the cache is enabled according to the information we
         * just loaded into the TLB, invalidate and enable the caches
here.
         * We should probably check/set other modes....later.
         */
        lis     r8, IDC_INVALL at h
        mtspr   IC_CST, r8
        mtspr   DC_CST, r8
        lis     r8, IDC_ENABLE at h
#ifndef CONFIG_NO_CACHE
        mtspr   IC_CST, r8
#if 0
        mtspr   DC_CST, r8
#else
        /* For a debug option, I left this here to easily enable
         * the write through cache mode
         */
        lis     r8, DC_SFWT at h
        mtspr   DC_CST, r8
        lis     r8, IDC_ENABLE at h
        mtspr   DC_CST, r8
#endif
#endif /* CONFIG_NO_CACHE */


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list