Changeset 6412909 in mainline


Ignore:
Timestamp:
2012-09-19T10:30:46Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a57b751
Parents:
3a73bc6a
Message:

arm32: Implement ICache invalidation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/barrier.h

    r3a73bc6a r6412909  
    4747#define write_barrier()   asm volatile ("" ::: "memory")
    4848
    49 #define smc_coherence(a)
    50 #define smc_coherence_block(a, l)
     49/*
     50 * There are multiple ways ICache can be implemented on ARM machines. Namely
     51 * PIPT, VIPT, and ASID and VMID tagged VIVT (see ARM Architecture Reference
     52 * Manual B3.11.2 (p. 1383).  However, CortexA8 Manual states: "For maximum
     53 * compatibility across processors, ARM recommends that operating systems target
     54 * the ARMv7 base architecture that uses ASID-tagged VIVT instruction caches,
     55 * and do not assume the presence of the IVIPT extension. Software that relies
     56 * on the IVIPT extension might fail in an unpredictable way on an ARMv7
     57 * implementation that does not include the IVIPT extension." (7.2.6 p. 245).
     58 * Only PIPT invalidates cache for all VA aliases if one block is invalidated.
     59 *
     60 * @note: Supporting ASID and VMID tagged VIVT may need to add ICache
     61 * maintenance to other places than just smc.
     62 */
     63
     64/* Available on both all supported arms,
     65 * invalidates entire ICache so the written value does not matter. */
     66#define smc_coherence(a) asm volatile ( "mcr p15, 0, r0, c7, c5, 0")
     67#define smc_coherence_block(a, l) smc_coherence(a)
     68
    5169
    5270#endif
Note: See TracChangeset for help on using the changeset viewer.