Changeset f834cc32 in mainline


Ignore:
Timestamp:
2015-09-23T19:59:06Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8ca6f08
Parents:
a1d636e
Message:

More generic detection of TLB type.

Location:
kernel/arch/arm32
Files:
2 edited

Legend:

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

    ra1d636e rf834cc32  
    118118};
    119119CONTROL_REG_GEN_READ(CTR, c0, 0, c0, 1);
     120
     121#if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a)
    120122CONTROL_REG_GEN_READ(TCMR, c0, 0, c0, 2);
     123
     124enum {
     125        TLBTR_SEP_FLAG = 1,
     126};
     127
    121128CONTROL_REG_GEN_READ(TLBTR, c0, 0, c0, 3);
     129#endif
     130
     131#if defined(PROCESSOR_ARCH_armv7_a)
    122132CONTROL_REG_GEN_READ(MPIDR, c0, 0, c0, 5);
    123133CONTROL_REG_GEN_READ(REVIDR, c0, 0, c0, 6);
     134#endif
    124135
    125136enum {
     
    442453
    443454CONTROL_REG_GEN_WRITE(TLBIALL, c8, 0, c7, 0);
    444 #if !defined(PROCESSOR_arm920t)
    445455CONTROL_REG_GEN_WRITE(TLBIMVA, c8, 0, c7, 1);
    446 #endif
    447456#if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a)
    448457CONTROL_REG_GEN_WRITE(TLBIASID, c8, 0, c7, 2);
  • kernel/arch/arm32/src/mm/tlb.c

    ra1d636e rf834cc32  
    7979static inline void invalidate_page(uintptr_t page)
    8080{
    81 #if defined(PROCESSOR_arm920t)
     81#if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a)
     82        if (TLBTR_read() & TLBTR_SEP_FLAG) {
     83                ITLBIMVA_write(page);
     84                DTLBIMVA_write(page);
     85        } else {
     86                TLBIMVA_write(page);
     87        }
     88#elif defined(PROCESSOR_arm920t)
    8289        ITLBIMVA_write(page);
    8390        DTLBIMVA_write(page);
     91#elif defined(PROCESSOR_arm926ej_s)
     92        TLBIMVA_write(page);
    8493#else
    85         //TODO: What about TLBIMVAA?
    86         TLBIMVA_write(page);
     94#error Unknown TLB type
    8795#endif
     96
    8897        /*
    8998         * "A TLB maintenance operation is only guaranteed to be complete after
Note: See TracChangeset for help on using the changeset viewer.