Changeset 38a1a84 in mainline for arch/mips32/include/mm/page.h


Ignore:
Timestamp:
2005-10-05T21:29:16Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bca1b47
Parents:
49c1f93
Message:

MIPS32 memory management work.
Fix some bugs introduced yesterday (PTL3 index is indeed calculated by >> 14).
Introduce two new bits in pte_t (i.e. 'a' and 'w').
Implement TLB Invalid Exception and TLB Modified Exception. (Needs review and testing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/include/mm/page.h

    r49c1f93 r38a1a84  
    4747 * - 32-bit virtual addresses
    4848 * - Offset is 14 bits => pages are 16K long
    49  * - PTE's use the same format as CP0 EntryLo[01] registers => PTE is therefore 4 bytes long
     49 * - PTE's use similar format as CP0 EntryLo[01] registers => PTE is therefore 4 bytes long
     50 * - PTE's make use of CP0 EntryLo's two-bit reserved field for bit W (writable) and bit A (accessed)
    5051 * - PTL0 has 64 entries (6 bits)
    5152 * - PTL1 is not used
     
    5758#define PTL1_INDEX_ARCH(vaddr)  0
    5859#define PTL2_INDEX_ARCH(vaddr)  0
    59 #define PTL3_INDEX_ARCH(vaddr)  (((vaddr)>>12)&0xfff)
     60#define PTL3_INDEX_ARCH(vaddr)  (((vaddr)>>14)&0x3fff)
    6061
    6162#define GET_PTL0_ADDRESS_ARCH()                 (PTL0)
     
    9899                (1<<PAGE_USER_SHIFT) |
    99100                (1<<PAGE_READ_SHIFT) |
    100                 ((p->d)<<PAGE_WRITE_SHIFT) |
     101                ((p->w)<<PAGE_WRITE_SHIFT) |
    101102                (1<<PAGE_EXEC_SHIFT)
    102103        );
     
    110111        p->c = (flags & PAGE_CACHEABLE) != 0 ? PAGE_CACHEABLE_EXC_WRITE : PAGE_UNCACHED;
    111112        p->v = !(flags & PAGE_NOT_PRESENT);
    112         p->d = (flags & PAGE_WRITE) != 0;
     113        p->w = (flags & PAGE_WRITE) != 0;
    113114}
    114115
Note: See TracChangeset for help on using the changeset viewer.