📄 flushdclines.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: OALFlushDCacheLines(VOID *pAddress, UINT32 size)
//
// Write back and invalidate range of addresses in DCache. This routine
// uses cache operations based on virtual addresses, so TLB misses may
// occur while this routine is running.
//
LEAF_ENTRY(OALFlushDCacheLines)
.set noreorder
// Get cache info address
la t7, g_oalCacheInfo
// Get cache size
lw t0, L1DLineSize(t7)
// Get the last address in range
addu t1, a0, a1
// loop through the cache
10: cache HIT_WRITEBACK_INVALIDATE_D, 0(a0)
addu a0, t0
bltu a0, t1, 10b
nop
// return to the caller
j ra
nop
.end OALFlushDCacheLines
//------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -