1 /*---------------------------------------------------------------------------* 2 Project: OS - Low Level Locked Cache Operations Library 3 File: OSLC.h 4 5 Copyright 1998, 1999 Nintendo. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Log: OSLC.h,v $ 14 Revision 1.2 2006/02/04 11:56:47 hashida 15 (none) 16 17 Revision 1.1.1.1 2005/12/29 06:53:28 hiratsu 18 Initial import. 19 20 Revision 1.1.1.1 2005/05/12 02:41:07 yasuh-to 21 Ported from dolphin source tree. 22 23 24 4 1999/12/22 5:16p Tian 25 Cleanup 26 27 3 1999/12/07 5:54p Tian 28 Changed LCAlloc* to invalidate instead of flush 29 30 2 1999/12/02 12:04p Tian 31 Added defines for max DMA transaction sizes 32 33 4 1999/07/27 5:31p Shiki 34 Cleanup. 35 36 3 1999/05/11 4:43p Shiki 37 Refreshed include tree. 38 39 1 1999/4/30 12:49p Tianli01 40 41 1 1999/03/04 2:23p Tianli01 42 Initial check-in to new tree 43 44 1 1999/02/04 6:02p Tianli01 45 Initial check-in. 46 47 $NoKeywords: $ 48 *---------------------------------------------------------------------------*/ 49 50 /* 51 This header file defines the low level locked cache operations. 52 Most should be macros to the underlying assembly routines, but 53 others will manipulate hardware setup registers. 54 55 Note that there are some restrictions on arguments that must 56 be adhered to. Read implementation notes (OSCache.c) or 57 man pages for details. 58 */ 59 60 #ifndef __OSLC_H__ 61 #define __OSLC_H__ 62 63 #include <revolution/types.h> 64 65 #ifdef __cplusplus 66 extern "C" { 67 #endif 68 69 // maximum size of a single DMA transaction 70 #define LC_MAX_DMA_BLOCKS (128) 71 #define LC_MAX_DMA_BYTES (LC_MAX_DMA_BLOCKS * 32) 72 73 void LCAlloc ( void* addr, u32 nBytes ); 74 void LCAllocNoInvalidate( void* addr, u32 nBytes ); 75 void LCAllocOneTag ( BOOL invalidate, void* tag ); 76 void LCAllocTags ( BOOL invalidate, void* startTag, u32 numBlocks ); 77 u32 LCQueueLength ( void ); 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif // __OSLC_H__ 84