Ignore:
Timestamp:
2013-08-07T18:38:44Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ae5fb7c8
Parents:
8ff767b
Message:

arm32: Fix pagetables in cacheable memory.

Set memory attributes in TTBR0/1

File:
1 edited

Legend:

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

    r8ff767b r0c40fd5  
    145145 * @param pt Pointer to the page table to set.
    146146 *
     147 * Page tables are always in cacheable memory.
     148 * Make sure the memory type is correct.
    147149 */
    148150NO_TRACE static inline void set_ptl0_addr(pte_t *pt)
    149151{
    150         TTBR0_write((uint32_t)pt);
     152        uint32_t val = (uint32_t)pt & TTBR_ADDR_MASK;
     153        val |= TTBR_RGN_WT_CACHE | TTBR_C_FLAG;
     154        TTBR0_write(val);
    151155}
    152156
Note: See TracChangeset for help on using the changeset viewer.