tlb.s

来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· S 代码 · 共 91 行

S
91
字号
/*++
Copyright (c) 1997  Microsoft Corporation

Module Name:

        vector.s

Abstract:

        This module contains the exception handling vectors.

Author:

        Jun Liu 01-Aug-96

--*/

#include "kxmips.h"
#include "romdef.h"


/////////////////////////////////////////////////////////////////
//
// Tlb probe routine
//
// Return contents of TLB entries
// a0 - supplies TLB index
// a1 - returns EntryHi value
// a2 - returns EntryLo0 value
// a3 - returns pagemask value
//

LEAF_ENTRY(TlbProbe)

    .set    noreorder

    mtc0    a0,index
    nop
    nop

    tlbr
    nop
    nop

    mfc0    t0,entryhi
    sw      t0,0(a1)
    mfc0    t0,entrylo0
    sw      t0,0(a2)
    mfc0    t0,pagemask
    sw      t0,0(a3)

    j       ra
    nop

    .end    TlbProbe


/////////////////////////////////////////////////////////////////
//
// Tlb write routine
//
// Writes next wired entry
// a0 - supplies index value
// a1 - supplies EntryHi value
// a2 - supplies EntryLo0 value
// a3 - supplies pagemask value
//

LEAF_ENTRY(TlbWrite)

    .set    noreorder

    mtc0    a0,index
    mtc0    a1,entryhi
    mtc0    a2,entrylo0
    mtc0    a3,pagemask
    li      t0,(1 << ENTRYLO_G)
    mtc0    t0,entrylo1
    nop
    nop

    tlbwi
    nop
    nop

    j       ra
    nop

    .end    TlbWrite

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?