?? cachesync.c
字號:
//
// Copyright (c) Centralty Communications 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.
//
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Module Name: CacheSync.c
Abstract:
-----------------------------------------------------------------------------*/
#include "cachesync.h"
#include "at4x0f.h"
DWORD dwCacheInfo;
// drain the post-write FIFO of the RISK interface
__inline void DrainPostWriteFIFO(void)
{
int t;
// drain the 1st post-write FIFO
RISCINT_FIFO_FLUSH = 3; // flush & auto-flush enable
// drain the 2nd post-write FIFO, move pointer to the 1st FIFO
RISCINT_FIFO_FLUSH = 3; // flush & auto-flush enable
// wait
for (t = 10000; t && !(RISCINT_FIFO_FLUSH & 0x04); t--);
if (t == 0)
{
//NandDbgPutString("flush post-write fifo timeout!\r\n");
}
}
void CacheRangeFlush(PVOID pAddr, DWORD dwLen, DWORD dwFlag)
{
DWORD dwNormalizedAddress;
DWORD dwNormalizedLength;
dwNormalizedAddress = (DWORD) pAddr & ~(DCACHE_LINE_SIZE - 1);
dwNormalizedLength = dwLen + ((DWORD) pAddr - dwNormalizedAddress);
ARMFlushDCacheLines((void*) dwNormalizedAddress, dwNormalizedLength, DCACHE_LINE_SIZE);
DrainPostWriteFIFO(); // drain post-write buffer
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -