⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flushiclines.s

📁 Windows CE 6.0 BSP for VOIPAC Board (PXA270) Version 2b.
💻 S
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//

#include <kxmips.h>
#define __MIPS_ASSEMBLER
#include <oal_cache.h>

//------------------------------------------------------------------------------
//
//  Function:  OALFlushICacheLines(VOID *pAddress, UINT32 size)
//
//  Invalidate range of addresses in instruction cache.  This routine
//  uses cache operations based on virtual addresses, so TLB misses may
//  occur while this routine is running.
//

LEAF_ENTRY(OALFlushICacheLines)
        .set noreorder

        // Get cache info address
        la      t7, g_oalCacheInfo

        // Get cache size
        lw      t0, L1ILineSize(t7)
        
        // Get the last address in range
        addu    t1, a0, a1

        // loop through the cache
10:     cache   HIT_INVALIDATE_I, 0(a0)
        addu    a0, t0
        bltu    a0, t1, 10b
        nop

        // sync & return to the caller
        j       ra
        sync

        .end OALFlushICacheLines

//------------------------------------------------------------------------------

⌨️ 快捷键说明

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