Changeset 4512d7e in mainline for arch/sparc64


Ignore:
Timestamp:
2006-01-19T22:17:47Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6461d67c
Parents:
64c44e8
Message:

New ASID management subsystem (initial work, more is required).
Some TLB invalidation changes.

Location:
arch/sparc64
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/Makefile.inc

    r64c44e8 r4512d7e  
    5252CONFIG_PAGE_HT = y
    5353
     54## Compile with support for address space identifiers.
     55#
     56
     57CONFIG_ASID = y
     58
     59
    5460ARCH_SOURCES = \
    5561        arch/$(ARCH)/src/cpu/cpu.c \
  • arch/sparc64/include/mm/asid.h

    r64c44e8 r4512d7e  
    3737typedef __u16 asid_t;
    3838
    39 #define asid_get()      0
     39#define ASID_MAX_ARCH   0x4095  /* 2^12 - 1 */
    4040
    4141#endif
  • arch/sparc64/src/mm/tlb.c

    r64c44e8 r4512d7e  
    166166}
    167167
    168 /** Invalidate all ITLB and DLTB entries for specified page in specified address space.
     168/** Invalidate all ITLB and DTLB entries for specified page range in specified address space.
    169169 *
    170170 * @param asid Address Space ID.
    171  * @param page Page which to sweep out from ITLB and DTLB.
     171 * @param page First page which to sweep out from ITLB and DTLB.
     172 * @param cnt Number of ITLB and DTLB entries to invalidate.
    172173 */
    173 void tlb_invalidate_page(asid_t asid, __address page)
     174void tlb_invalidate_pages(asid_t asid, __address page, count_t cnt)
    174175{
    175         /* TODO: write asid to some Context register and encode the register in second parameter below. */
    176         itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, page);
    177         dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, page);
     176        int i;
     177       
     178        for (i = 0; i < cnt; i++) {
     179                /* TODO: write asid to some Context register and encode the register in second parameter below. */
     180                itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, page + i * PAGE_SIZE);
     181                dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, page + i * PAGE_SIZE);
     182        }
    178183}
Note: See TracChangeset for help on using the changeset viewer.