Changeset 5265eea4 in mainline for kernel/arch/arm32/src/mm/tlb.c


Ignore:
Timestamp:
2015-10-28T18:17:27Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77a194c, ff381a7
Parents:
0328987 (diff), 5783d10 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge various ARM fixes from lp:~jakub/helenos/arm

Fix GTA02 uspace/kernel memory corruption caused by wrong TLB
invalidation. ARM920T does not have a unified TLB, so it is necessary
to purge the instruction and data TLBs separately.

Fix RaspberryPi support. Make RaspberryPi use non-shared memory
(eliminating thus a weird special case for ARMv6) and invalidate the
entire D-cache before it is re-enabled in the kernel.

Make the CP15 cache-related macros non-ARMv7-centric for ARMv6-. Define
only macros that are supported by the given CPU/architecture (partially).

Be more careful and do not assume ARMv7 features. This relates to
enabling branch predictors, prefetch buffer and various control bits
in some registers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/mm/tlb.c

    r0328987 r5265eea4  
    7979static inline void invalidate_page(uintptr_t page)
    8080{
    81         //TODO: What about TLBIMVAA?
     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)
     89        ITLBIMVA_write(page);
     90        DTLBIMVA_write(page);
     91#elif defined(PROCESSOR_arm926ej_s)
    8292        TLBIMVA_write(page);
     93#else
     94#error Unknown TLB type
     95#endif
     96
    8397        /*
    8498         * "A TLB maintenance operation is only guaranteed to be complete after
Note: See TracChangeset for help on using the changeset viewer.