Changeset e386cbf in mainline for kernel/arch/sparc64/include/mm/tlb.h


Ignore:
Timestamp:
2006-08-01T15:58:32Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e12ccc5
Parents:
b3e8c90
Message:

sparc64 work.
Dump take_over_tlb_and_tt() and add its assembly language replacement.

File:
1 edited

Legend:

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

    rb3e8c90 re386cbf  
    3636#define __sparc64_TLB_H__
    3737
     38
     39#define ITLB_ENTRY_COUNT                64
     40#define DTLB_ENTRY_COUNT                64
     41
     42#define MEM_CONTEXT_KERNEL              0
     43#define MEM_CONTEXT_TEMP                1
     44
     45/** Page sizes. */
     46#define PAGESIZE_8K     0
     47#define PAGESIZE_64K    1
     48#define PAGESIZE_512K   2
     49#define PAGESIZE_4M     3
     50
     51/** Bit width of the TLB-locked portion of kernel address space. */
     52#define KERNEL_PAGE_WIDTH       22      /* 4M */
     53
     54/* TLB Demap Operation types. */
     55#define TLB_DEMAP_PAGE          0
     56#define TLB_DEMAP_CONTEXT       1
     57
     58#define TLB_DEMAP_TYPE_SHIFT    6
     59
     60/* TLB Demap Operation Context register encodings. */
     61#define TLB_DEMAP_PRIMARY       0
     62#define TLB_DEMAP_SECONDARY     1
     63#define TLB_DEMAP_NUCLEUS       2
     64
     65#define TLB_DEMAP_CONTEXT_SHIFT 4
     66
     67/* TLB Tag Access shifts */
     68#define TLB_TAG_ACCESS_CONTEXT_SHIFT    0
     69#define TLB_TAG_ACCESS_VPN_SHIFT        13
     70
     71#ifndef __ASM__
     72
    3873#include <arch/mm/tte.h>
    3974#include <arch/mm/mmu.h>
     
    4378#include <arch/types.h>
    4479#include <typedefs.h>
    45 
    46 #define ITLB_ENTRY_COUNT                64
    47 #define DTLB_ENTRY_COUNT                64
    48 
    49 /** Page sizes. */
    50 #define PAGESIZE_8K     0
    51 #define PAGESIZE_64K    1
    52 #define PAGESIZE_512K   2
    53 #define PAGESIZE_4M     3
    54 
    55 /** Bit width of the TLB-locked portion of kernel address space. */
    56 #define KERNEL_PAGE_WIDTH       22      /* 4M */
    5780
    5881union tlb_context_reg {
     
    91114typedef union tlb_tag_read_reg tlb_tag_access_reg_t;
    92115
    93 /** TLB Demap Operation types. */
    94 #define TLB_DEMAP_PAGE          0
    95 #define TLB_DEMAP_CONTEXT       1
    96 
    97 /** TLB Demap Operation Context register encodings. */
    98 #define TLB_DEMAP_PRIMARY       0
    99 #define TLB_DEMAP_SECONDARY     1
    100 #define TLB_DEMAP_NUCLEUS       2
    101116
    102117/** TLB Demap Operation Address. */
     
    385400        da.vpn = pg.vpn;
    386401       
    387         asi_u64_write(ASI_IMMU_DEMAP, da.value, 0);
     402        asi_u64_write(ASI_IMMU_DEMAP, da.value, 0);     /* da.value is the address within the ASI */
    388403        flush();
    389404}
     
    407422        da.vpn = pg.vpn;
    408423       
    409         asi_u64_write(ASI_DMMU_DEMAP, da.value, 0);
     424        asi_u64_write(ASI_DMMU_DEMAP, da.value, 0); /* da.value is the address within the ASI */
    410425        membar();
    411426}
     
    417432extern void dtlb_insert_mapping(uintptr_t page, uintptr_t frame, int pagesize, bool locked, bool cacheable);
    418433
     434#endif /* !def __ASM__ */
     435
    419436#endif
    420437
Note: See TracChangeset for help on using the changeset viewer.