Ignore:
Timestamp:
2015-10-26T21:12:57Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5783d10
Parents:
1a2a6e7
Message:

ARM cache handling fixes

  • boot: Use the normal outer and inner WBWA attribute also for ARMv6
  • kernel: Fix comment in page_armv6.h:set_pt_level0_flags(). TEX=5, C=0, B=1 encodes outer and inner WBWA normal memory.
  • Treat all normal memory as non shareable also on ARMv6.
  • Make sure D$ is invalidated in cpu_arch_init() before it is enabled.
  • For non-cacheable ARMv6+ memory, use device memory type instead of strongly-ordered.
  • For ARMv5-, use either cached/buffered (CB=0b11) or uncached/unbuffered (CB=0b00).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/arch/mm/page_armv6.h

    r1a2a6e7 r93d8022  
    257257        if (flags & PAGE_CACHEABLE) {
    258258                /*
    259                  * Write-through, write-allocate memory, see ch. B3.8.2
    260                  * (p. B3-1358) of ARM Architecture reference manual.
     259                 * Outer and inner write-back, write-allocate memory,
     260                 * see ch. B3.8.2 (p. B3-1358) of ARM Architecture reference
     261                 * manual.
     262                 *
    261263                 * Make sure the memory type is correct, and in sync with:
    262264                 * init_boot_pt (boot/arch/arm32/src/mm.c)
     
    277279        }
    278280       
    279 #if defined(PROCESSOR_ARCH_armv6)
    280         /* FIXME: this disables caches */
    281         p->shareable = 1;
    282 #else
    283281        /* Shareable is ignored for devices (non-cacheable),
    284282         * turn it off for normal memory. */
    285283        p->shareable = 0;
    286 #endif
    287284       
    288285        p->non_global = !(flags & PAGE_GLOBAL);
Note: See TracChangeset for help on using the changeset viewer.