Changeset 8dbc18c in mainline


Ignore:
Timestamp:
2007-01-21T16:46:46Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f429331
Parents:
718d600
Message:

When invalidating entire TLBs on sparc64, make sure to also invalidate any (locked) global entries.
This fixes Ticket #21.
Fix a comment in start.S stating that the kernel installs a global entry for itself. All entries installed by the kernel
are local to some memory context.

Location:
kernel/arch/sparc64/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/mm/tlb.c

    r718d600 r8dbc18c  
    328328                d.value = itlb_data_access_read(i);
    329329                t.value = itlb_tag_read_read(i);
    330                
     330
    331331                printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, "
    332332                        "ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, "
     
    409409        tlb_tag_read_reg_t t;
    410410
     411        /*
     412         * Walk all ITLB and DTLB entries and remove all unlocked mappings.
     413         *
     414         * The kernel doesn't use global mappings so any locked global mappings
     415         * found  must have been created by someone else. Their only purpose now
     416         * is to collide with proper mappings. Invalidate immediately. It should
     417         * be safe to invalidate them as late as now.
     418         */
     419
    411420        for (i = 0; i < ITLB_ENTRY_COUNT; i++) {
    412421                d.value = itlb_data_access_read(i);
    413                 if (!d.l) {
     422                if (!d.l || d.g) {
    414423                        t.value = itlb_tag_read_read(i);
    415424                        d.v = false;
     
    421430        for (i = 0; i < DTLB_ENTRY_COUNT; i++) {
    422431                d.value = dtlb_data_access_read(i);
    423                 if (!d.l) {
     432                if (!d.l || d.g) {
    424433                        t.value = dtlb_tag_read_read(i);
    425434                        d.v = false;
  • kernel/arch/sparc64/src/start.S

    r718d600 r8dbc18c  
    100100
    101101        /*
    102          * Take over the DMMU by installing global locked TTE entry identically
     102         * Take over the DMMU by installing locked TTE entry identically
    103103         * mapping the first 4M of memory.
    104104         *
Note: See TracChangeset for help on using the changeset viewer.