Changeset afe5e09 in mainline


Ignore:
Timestamp:
2015-10-06T20:20:50Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
15fbe6a
Parents:
d5610b9
Message:

Define CP15_C7_MVA_ALIGN for all supported ARM processors.

  • Use CP15_C7_MVA_ALIGN in smc_coherence() and smc_coherence_block().
Location:
kernel/arch/arm32/include/arch
Files:
2 edited

Legend:

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

    rd5610b9 rafe5e09  
    4040#include <arch/cache.h>
    4141#include <arch/cp15.h>
     42#include <align.h>
    4243#else
    4344#include <libarch/cp15.h>
     
    115116#define smc_coherence(a) \
    116117do { \
    117         dcache_clean_mva_pou((uintptr_t) a);\
     118        dcache_clean_mva_pou(ALIGN_DOWN((uintptr_t) a, CP15_C7_MVA_ALIGN)); \
    118119        write_barrier();               /* Wait for completion */\
    119120        icache_invalidate();\
     
    124125#define smc_coherence_block(a, l) \
    125126do { \
    126         for (uintptr_t addr = (uintptr_t)a; addr < (uintptr_t)a + l; addr += 4)\
     127        for (uintptr_t addr = (uintptr_t) a; addr < (uintptr_t) a + l; \
     128            addr += CP15_C7_MVA_ALIGN) \
    127129                smc_coherence(addr); \
    128130} while (0)
  • kernel/arch/arm32/include/arch/cp15.h

    rd5610b9 rafe5e09  
    395395 */
    396396
     397#if defined(PROCESSOR_cortex_a8)
     398#define CP15_C7_MVA_ALIGN       64
     399#elif defined(PROCESSOR_arm1176)
     400#define CP15_C7_MVA_ALIGN       32
     401#elif defined(PROCESSOR_arm926ej_s)
     402#define CP15_C7_MVA_ALIGN       32
     403#elif defined(PROCESSOR_arm920t)
     404#define CP15_C7_MVA_ALIGN       32
     405#else
     406#error Unknow MVA alignment
     407#endif
     408
    397409#if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a)
    398410CONTROL_REG_GEN_WRITE(CP15ISB, c7, 0, c5, 4);
Note: See TracChangeset for help on using the changeset viewer.