Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 3da11f37 in mainline


Ignore:
Timestamp:
2009-11-28T20:19:29Z (12 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master
Children:
3f35634c
Parents:
18baf9c0
Message:

Merged changes essential for the code to reach 'uinit'.

Location:
kernel
Files:
4 edited

Legend:

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

    r18baf9c0 r3da11f37  
    11/*
    22 * Copyright (c) 2005 Jakub Jermar
     3 * Copyright (c) 2008 Pavel Rimsky
    34 * All rights reserved.
    45 *
     
    5253#include <panic.h>
    5354#include <arch/asm.h>
     55#include <arch/cpu.h>
     56#include <arch/mm/pagesize.h>
    5457
    5558#ifdef CONFIG_TSB
     
    518521void tlb_invalidate_asid(asid_t asid)
    519522{
    520         tlb_context_reg_t pc_save, ctx;
    521        
    522523        /* switch to nucleus because we are mapped by the primary context */
    523524        nucleus_enter();
    524        
    525         ctx.v = pc_save.v = mmu_primary_context_read();
    526         ctx.context = asid;
    527         mmu_primary_context_write(ctx.v);
    528        
    529         itlb_demap(TLB_DEMAP_CONTEXT, TLB_DEMAP_PRIMARY, 0);
    530         dtlb_demap(TLB_DEMAP_CONTEXT, TLB_DEMAP_PRIMARY, 0);
    531        
    532         mmu_primary_context_write(pc_save.v);
    533        
     525        __hypercall_fast4(MMU_DEMAP_CTX, 0, 0, asid,
     526                MMU_FLAG_ITLB | MMU_FLAG_DTLB);
     527
    534528        nucleus_leave();
    535529}
     
    545539{
    546540        unsigned int i;
    547         tlb_context_reg_t pc_save, ctx;
    548541       
    549542        /* switch to nucleus because we are mapped by the primary context */
    550543        nucleus_enter();
    551        
    552         ctx.v = pc_save.v = mmu_primary_context_read();
    553         ctx.context = asid;
    554         mmu_primary_context_write(ctx.v);
    555        
    556         for (i = 0; i < cnt * MMU_PAGES_PER_PAGE; i++) {
    557                 itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY,
    558                     page + i * MMU_PAGE_SIZE);
    559                 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY,
    560                     page + i * MMU_PAGE_SIZE);
    561         }
    562        
    563         mmu_primary_context_write(pc_save.v);
    564        
     544
     545        for (i = 0; i < cnt; i++) {
     546                __hypercall_fast5(MMU_DEMAP_PAGE, 0, 0, page, asid,
     547                        MMU_FLAG_DTLB | MMU_FLAG_ITLB);
     548        }
     549
    565550        nucleus_leave();
    566551}
  • kernel/arch/sparc64/src/sun4v/asm.S

    r18baf9c0 r3da11f37  
    7575         */
    7676        wrpr %g0, WSTATE_OTHER(0) | WSTATE_NORMAL(1), %wstate
    77 
    7877        done                            ! jump to userspace
  • kernel/arch/sparc64/src/trap/sun4v/trap_table.S

    r18baf9c0 r3da11f37  
    281281.global fast_instruction_access_mmu_miss_handler_tl0
    282282fast_instruction_access_mmu_miss_handler_tl0:
    283         /*FAST_INSTRUCTION_ACCESS_MMU_MISS_HANDLER*/
     283        FAST_INSTRUCTION_ACCESS_MMU_MISS_HANDLER
    284284
    285285/* TT = 0x68, TL = 0, fast_data_access_MMU_miss */
     
    390390.global data_access_exception_tl1
    391391data_access_exception_tl1:
    392         /*wrpr %g0, 1, %tl
     392        wrpr %g0, 1, %tl
    393393        wrpr %g0, PSTATE_AG_BIT | PSTATE_PRIV_BIT, %pstate
    394         PREEMPTIBLE_HANDLER data_access_exception*/
     394        PREEMPTIBLE_HANDLER data_access_exception
    395395
    396396/* TT = 0x32, TL > 0, data_access_error */
  • kernel/generic/src/main/kinit.c

    r18baf9c0 r3da11f37  
    165165        interrupts_enable();
    166166       
    167 //MH
    168 #if defined (SUN4U)
    169167        /*
    170168         * Create user tasks, load RAM disk images.
     
    218216                }
    219217        }
    220        
     218
    221219        /*
    222220         * Run user tasks.
     
    226224                        program_ready(&programs[i]);
    227225        }
    228        
    229 #endif
     226
    230227#ifdef CONFIG_KCONSOLE
    231228        if (!stdin) {
Note: See TracChangeset for help on using the changeset viewer.