Ignore:
Timestamp:
2007-03-27T23:40:25Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
399ece9
Parents:
8d37a06
Message:

The Ultimate Solution To Illegal Virtual Aliases.
It is better to avoid them completely than to fight them.
Switch the sparc64 port to 16K pages. The TLBs and TSBs
continue to operate with 8K pages only. Page tables and
other generic parts operate with 16K pages.

Because the MMU doesn't support 16K directly, each 16K
page is emulated by a pair of 8K pages. With 16K pages,
illegal aliases cannot be created in 16K D-cache.

File:
1 edited

Legend:

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

    r8d37a06 r2057572  
    3838#include <arch/mm/frame.h>
    3939
     40/*
     41 * On the TLB and TSB level, we still use 8K pages, which are supported by the
     42 * MMU.
     43 */
     44#define MMU_PAGE_WIDTH  MMU_FRAME_WIDTH
     45#define MMU_PAGE_SIZE   MMU_FRAME_SIZE
     46
     47/*
     48 * On the page table level, we use 16K pages. 16K pages are not supported by
     49 * the MMU but we emulate them with pairs of 8K pages.
     50 */
    4051#define PAGE_WIDTH      FRAME_WIDTH
    4152#define PAGE_SIZE       FRAME_SIZE
    4253
    43 #define PAGE_COLOR_BITS 1       /**< 14 - 13; 2^14 == 16K == alias boundary. */
     54#define MMU_PAGES_PER_PAGE      (1 << (PAGE_WIDTH - MMU_PAGE_WIDTH))
     55
     56/*
     57 * With 16K pages, there is only one page color.
     58 */
     59#define PAGE_COLOR_BITS 0       /**< 14 - 14; 2^14 == 16K == alias boundary. */
    4460
    4561#ifdef KERNEL
Note: See TracChangeset for help on using the changeset viewer.