1 /*---------------------------------------------------------------------------* 2 Project: Dolphin OS Error Messages 3 File: OSAssert.h 4 5 Copyright 1998-2001 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: OSAssert.h,v $ 14 Revision 1.2 2008/09/01 00:39:44 nakano_yoshinobu 15 Changed OS_ERR_CANCELALARMS_INVTAG message. 16 17 Revision 1.1.1.1 2005/12/29 06:53:27 hiratsu 18 Initial import. 19 20 Revision 1.1.1.1 2005/05/12 02:15:49 yasuh-to 21 Ported from dolphin source tree. 22 23 24 14 2002/08/26 11:58 Shiki 25 Added OS_ERR_CANCELALARMS_INVTAG. 26 27 13 2001/10/02 9:17 Shiki 28 Fixed SI_ERR_SETXY_INVX message. 29 30 12 2001/04/06 16:41 Shiki 31 Fixed SI_ERR_SETXY_INVX message. 32 33 11 2001/03/22 9:18 Shiki 34 Added SI_ERR_GETCOMMAND_INVCHAN. 35 36 10 2001/03/08 15:14 Shiki 37 Removed OS_ERR_INITAUDIOSYSTEM_CHKSUMERR. 38 39 9 2001/03/02 14:36 Shiki 40 Added OSAudioSystem messages. 41 42 8 2001/01/30 10:14 Shiki 43 Added OS_ERR_SETABSALARM_HANDLER. 44 45 7 2000/05/17 5:35p Shiki 46 Added more error messages for OSMutex.c 47 48 6 2000/03/21 5:01p Shiki 49 Added two more SI error messages. 50 51 5 2000/03/16 4:31p Shiki 52 Added mutex API assert messages. 53 54 4 2000/03/15 6:26p Shiki 55 Added thread assert messages. 56 57 3 1/21/00 11:04a Shiki 58 Fixed OS_ERR_GETARENAHI_INVALID message. 59 60 2 12/02/99 7:53p Tian 61 Locked cache asserts added 62 63 12 1999/09/15 4:56p Shiki 64 Added OSSerial.c assert messages. 65 66 11 8/02/99 2:35p Shiki 67 Added more OSException.c assert messages. 68 69 10 1999/08/02 2:17p Shiki 70 Added more OSInterrupt.c assert messages. 71 72 9 8/02/99 2:10p Shiki 73 Added OSInterrupt.c assert messages. 74 75 8 1999/07/28 9:21p Shiki 76 Added OSSetPeriodicAlarm() assert messages. 77 78 7 1999/07/28 5:56p Shiki 79 Added OSAlarm.c assert messages. 80 81 6 1999/07/27 4:46p Shiki 82 Added OSAddress.c assert messages. 83 84 5 1999/07/22 7:31p Shiki 85 Added OSArena.c assert messages. 86 87 4 1999/07/21 2:54p Shiki 88 Added OS.c assert messages. 89 90 3 1999/07/16 4:29p Shiki 91 Added OSTimer.c assert messages. 92 93 2 1999/07/12 9:04p Shiki 94 Added OS_ERR_SETERRORHANDLER_INVERR. 95 96 1 6/03/99 6:36p Shiki 97 98 2 5/11/99 10:18a Shiki 99 Refreshed include tree. 100 101 1 1999/04/30 12:47p Tianli01 102 103 1 1999/04/12 7:47p Tianli01 104 Changed from OSInit.h, added some private utility functions. 105 106 1 4/06/99 3:07p Tianli01 107 Initial check-in. Private header file with init routines for OS 108 modules. 109 $NoKeywords: $ 110 *---------------------------------------------------------------------------*/ 111 112 #ifndef __OSASSERT_H__ 113 #define __OSASSERT_H__ 114 115 #ifdef __cplusplus 116 extern "C" { 117 #endif 118 119 /*---------------------------------------------------------------------------* 120 Error messages of OS.c 121 *---------------------------------------------------------------------------*/ 122 #define OS_ERR_EXCEPTIONINIT_TOOBIG "OSExceptionInit(): too big exception vector code." 123 #define OS_ERR_SETEXCEPTIONHANDLER_UNKNOWN "__OSSetExceptionHandler(): unknown exception." 124 #define OS_ERR_GETEXCEPTIONHANDLER_UNKNOWN "__OSGetExceptionHandler(): unknown exception." 125 126 /*---------------------------------------------------------------------------* 127 Error messages of OSAddress.c 128 *---------------------------------------------------------------------------*/ 129 #define OS_ERR_PHYSICALTOCACHED_INVADDR "OSPhysicalToCached(): illegal address." 130 #define OS_ERR_PHYSICALTOUNCACHED_INVADDR "OSPhysicalToUncached(): illegal address." 131 #define OS_ERR_CACHEDTOPHYSICAL_INVADDR "OSCachedToPhysical(): illegal address." 132 #define OS_ERR_UNCACHEDTOPHYSICAL_INVADDR "OSUncachedToPhysical(): illegal address." 133 #define OS_ERR_CACHEDTOUNCACHED_INVADDR "OSCachedToUncached(): illegal address." 134 #define OS_ERR_UNCACHEDTOCACHED_INVADDR "OSUncachedToCached(): illegal address." 135 136 /*---------------------------------------------------------------------------* 137 Error messages of OSAlarm.c 138 *---------------------------------------------------------------------------*/ 139 #define OS_ERR_SETALARM_TICK "OSSetAlarm(): tick was less than zero." 140 #define OS_ERR_SETALARM_HANDLER "OSSetAlarm(): null handler was specified." 141 #define OS_ERR_SETABSALARM_HANDLER "OSSetAbsAlarm(): null handler was specified." 142 #define OS_ERR_SETPERIODICALARM_PERIOD "OSSetPeriodicAlarm(): period was less than zero." 143 #define OS_ERR_SETPERIODICALARM_HANDLER "OSSetPeriodicAlarm(): null handler was specified." 144 #define OS_ERR_CANCELALARMS_INVTAG "OSCancelAlarms(): invalid tag. (this tag is used by the operating system.)" 145 146 /*---------------------------------------------------------------------------* 147 Error messages of OSAlloc.c 148 *---------------------------------------------------------------------------*/ 149 #define OS_ERR_ALLOCFROMHEAP_NOHEAP "OSAllocFromHeap(): heap is not initialized." 150 #define OS_ERR_ALLOCFROMHEAP_INVSIZE "OSAllocFromHeap(): invalid size." 151 #define OS_ERR_ALLOCFROMHEAP_INVHEAP "OSAllocFromHeap(): invalid heap handle." 152 #define OS_ERR_ALLOCFROMHEAP_BROKENHEAP "OSAllocFromHeap(): heap is broken." 153 #define OS_ERR_ALLOCFIXED_NOHEAP "OSAllocFixed(): heap is not initialized." 154 #define OS_ERR_ALLOCFIXED_INVRANGE "OSAllocFixed(): invalid range." 155 #define OS_ERR_FREETOHEAP_NOHEAP "OSFreeToHeap(): heap is not initialized." 156 #define OS_ERR_FREETOHEAP_INVPTR "OSFreeToHeap(): invalid pointer." 157 #define OS_ERR_FREETOHEAP_INVHEAP "OSFreeToHeap(): invalid heap handle." 158 #define OS_ERR_SETCURRENTHEAP_NOHEAP "OSSetCurrentHeap(): heap is not initialized." 159 #define OS_ERR_SETCURRENTHEAP_INVHEAP "OSSetCurrentHeap(): invalid heap handle." 160 #define OS_ERR_INITALLOC_INVNUMHEAPS "OSInitAlloc(): invalid number of heaps." 161 #define OS_ERR_INITALLOC_INVRANGE "OSInitAlloc(): invalid range." 162 #define OS_ERR_INITALLOC_INSRANGE "OSInitAlloc(): too small range." 163 #define OS_ERR_CREATEHEAP_NOHEAP "OSCreateHeap(): heap is not initialized." 164 #define OS_ERR_CREATEHEAP_INVRANGE "OSCreateHeap(): invalid range." 165 #define OS_ERR_CREATEHEAP_INSRANGE "OSCreateHeap(): too small range." 166 #define OS_ERR_DESTROYHEAP_NOHEAP "OSDestroyHeap(): heap is not initialized." 167 #define OS_ERR_DESTROYHEAP_INVHEAP "OSDestroyHeap(): invalid heap handle." 168 #define OS_ERR_ADDTOHEAP_NOHEAP "OSAddToHeap(): heap is not initialized." 169 #define OS_ERR_ADDTOHEAP_INVHEAP "OSAddToHeap(): invalid heap handle." 170 #define OS_ERR_ADDTOHEAP_INVRANGE "OSAddToHeap(): invalid range." 171 #define OS_ERR_ADDTOHEAP_INSRANGE "OSAddToHeap(): too small range." 172 #define OS_ERR_REFERENT_NOHEAP "OSReferentSize(): heap is not initialized." 173 #define OS_ERR_REFERENT_INVPTR "OSReferentSize(): invalid pointer." 174 #define OS_ERR_DUMPHEAP_NOHEAP "OSDumpHeap(): heap is not initialized." 175 #define OS_ERR_DUMPHEAP_INVHEAP "OSDumpHeap(): invalid heap handle." 176 #define OS_ERR_DUMPHEAP_BROKENHEAP "OSDumpHeap(): heap is broken." 177 178 /*---------------------------------------------------------------------------* 179 Error messages of OSArena.c 180 *---------------------------------------------------------------------------*/ 181 #define OS_ERR_GETARENAHI_INIT "OSGetArenaHi(): OSInit() must be called in advance." 182 #define OS_ERR_GETARENAHI_INVALID "OSGetArenaHi(): invalid arena (hi < lo)." 183 #define OS_ERR_GETARENALO_INIT "OSGetArenaLo(): OSInit() must be called in advance." 184 #define OS_ERR_GETARENALO_INVALID "OSGetArenaLo(): invalid arena (hi < lo)." 185 186 /*---------------------------------------------------------------------------* 187 Error messages of OSAudioSystem.c 188 *---------------------------------------------------------------------------*/ 189 #define OS_ERR_INITAUDIOSYSTEM_ARAMDMAPROGRESS "__OSInitAudioSystem(): ARAM DMA already in progress" 190 #define OS_ERR_INITAUDIOSYSTEM_DSPDMAPROGRESS "__OSInitAudioSystem(): DSP DMA already in progress" 191 #define OS_ERR_INITAUDIOSYSTEM_DSPWORKING "__OSInitAudioSystem(): DSP already working" 192 #define OS_ERR_INITAUDIOSYSTEM_INVALIDMSG "__OSInitAudioSystem(): DSP returns invalid message" 193 194 /*---------------------------------------------------------------------------* 195 Error messages of OSError.c 196 *---------------------------------------------------------------------------*/ 197 #define OS_ERR_SETERRORHANDLER_INVERR "OSSetErrorHandler(): unknown error." 198 199 /*---------------------------------------------------------------------------* 200 Error messages of OSInterrupt.c 201 *---------------------------------------------------------------------------*/ 202 #define OS_ERR_SETINTERRUPTHANDLER_INIT "__OSSetInterruptHandler(): OSInit() must be called in advance." 203 #define OS_ERR_SETINTERRUPTHANDLER_UNKNOWN "__OSSetInterruptHandler(): unknown interrupt." 204 #define OS_ERR_GETINTERRUPTHANDLER_INIT "__OSGetInterruptHandler(): OSInit() must be called in advance." 205 #define OS_ERR_GETINTERRUPTHANDLER_UNKNOWN "__OSGetInterruptHandler(): unknown interrupt." 206 207 /*---------------------------------------------------------------------------* 208 Error messages of OSSerial.c 209 *---------------------------------------------------------------------------*/ 210 #define SI_ERR_TRANSFER_INVCHAN "SITransfer(): invalid channel." 211 #define SI_ERR_TRANSFER_INVOUTBYTES "SITransfer(): output size is out of range (must be 1 to 128)." 212 #define SI_ERR_TRANSFER_INVINBYTES "SITransfer(): input size is out of range (must be 1 to 128)." 213 #define SI_ERR_SYNC_CALLBACK "SISync(): asynchronous SITransfer() is in progress." 214 #define SI_ERR_SYNC_NOTRANSFER "SISync(): no SITransfer() is in progress." 215 #define SI_ERR_SETCOMMAND_INVCHAN "SISetCommand(): invalid channel." 216 #define SI_ERR_GETCOMMAND_INVCHAN "SIGetCommand(): invalid channel." 217 #define SI_ERR_SETXY_INVX "SISetXY(): x is out of range (8 <= x <= 1023)." 218 #define SI_ERR_SETXY_INVY "SISetXY(): y is out of range (0 <= y <= 255)." 219 #define SI_ERR_GETRESPONSE_INVCHAN "SIGetResponse(): invalid channel." 220 #define SI_ERR_ENABLEPOLLING_INVCHAN "SIEnablePolling(): invalid chan bit(s)." 221 #define SI_ERR_DISABLEPOLLING_INVCHAN "SIDisablePolling(): invalid chan bit(s)." 222 223 /*---------------------------------------------------------------------------* 224 Error messages of OSThread.c 225 *---------------------------------------------------------------------------*/ 226 #define OS_ERR_CREATETHREAD_BADPRIO "OSCreateThread(): priority out of range (0 <= priority <= 31)." 227 #define OS_ERR_CREATETHREAD_STILLACTIVE "OSCreateThread(): thread %p is still active." 228 #define OS_ERR_EXITTHREAD_NOCURRENT "OSExitThread(): current thread does not exist." 229 #define OS_ERR_EXITTHREAD_NOTRUNNING "OSExitThread(): current thread is not running." 230 #define OS_ERR_EXITTHREAD_NOTACTIVE "OSExitThread(): current thread is not active." 231 #define OS_ERR_CANCELTHREAD_NOTACTIVE "OSExitThread(): thread %p is not active." 232 #define OS_ERR_JOINTHREAD_NOTACTIVE "OSJoinThread(): thread %p is not active." 233 #define OS_ERR_DETACHTHREAD_NOTACTIVE "OSDetachThread(): thread %p is not active." 234 #define OS_ERR_RESUMETHREAD_NOTACTIVE "OSResumeThread(): thread %p is not active." 235 #define OS_ERR_RESUMETHREAD_MORIBUND "OSResumeThread(): thread %p is terminated." 236 #define OS_ERR_SUSPENDTHREAD_NOTACTIVE "OSSuspendThread(): thread %p is not active." 237 #define OS_ERR_SUSPENDTHREAD_MORIBUND "OSSuspendThread(): thread %p is terminated." 238 #define OS_ERR_SLEEPTHREAD_NOCURRENT "OSSleepThread(): current thread does not exist." 239 #define OS_ERR_SLEEPTHREAD_NOTACTIVE "OSSleepThread(): current thread %p is not active." 240 #define OS_ERR_SLEEPTHREAD_NOTRUNNING "OSSleepThread(): current thread %p is not running." 241 #define OS_ERR_SLEEPTHREAD_SUSPENDED "OSSleepThread(): current thread %p is suspended." 242 #define OS_ERR_SETTHREADPRIORITY_BADPRIO "OSSetThreadPriority(): priority out of range (0 <= priority <= 31)." 243 #define OS_ERR_SETTHREADPRIORITY_NOTACTIVE "OSSetThreadPriority(): thread %p is not active." 244 #define OS_ERR_SETTHREADPRIORITY_MORIBUND "OSSetThreadPriority(): thread %p is terminated." 245 246 /*---------------------------------------------------------------------------* 247 Error messages of OSTimer.c 248 *---------------------------------------------------------------------------*/ 249 #define OS_ERR_SETTIMERCALLBACK_INIT "OSSetTimerCallback(): timer is not initialized." 250 #define OS_ERR_INITTIMER_INVTIME "OSInitTimer(): time param must be less than 0x80000000." 251 #define OS_ERR_STARTTIMER_INIT "OSStartTimer(): timer is not initialized." 252 #define OS_ERR_STOPTIMER_INIT "OSStopTimer(): timer is not initialized." 253 254 /*---------------------------------------------------------------------------* 255 Error messages of OSMutex.c 256 *---------------------------------------------------------------------------*/ 257 #define OS_ERR_LOCKMUTEX_NOCURRENT "OSLockMutex(): current thread does not exist." 258 #define OS_ERR_LOCKMUTEX_NOTRUNNING "OSLockMutex(): current thread is not running." 259 #define OS_ERR_LOCKMUTEX_DEADLOCK "OSLockMutex(): detected deadlock: current thread %p, mutex %p." 260 #define OS_ERR_UNLOCKMUTEX_NOCURRENT "OSUnlockMutex(): current thread does not exist." 261 #define OS_ERR_UNLOCKMUTEX_NOTRUNNING "OSUnlockMutex(): current thread is not running." 262 #define OS_ERR_UNLOCKMUTEX_NOTOWNER "OSUnlockMutex(): current thread %p is not the owner of mutex %p." 263 #define OS_ERR_TRYLOCKMUTEX_NOCURRENT "OSTryLockMutex(): current thread does not exist." 264 #define OS_ERR_TRYLOCKMUTEX_NOTRUNNING "OSTryLockMutex(): current thread is not running." 265 #define OS_ERR_WAITCOND_NOCURRENT "OSWaitCond(): current thread does not exist." 266 #define OS_ERR_WAITCOND_NOTRUNNING "OSWaitCond(): current thread is not running." 267 #define OS_ERR_WAITCOND_NOTOWNER "OSWaitCond(): current thread %p is not the owner of mutex %p." 268 269 /*---------------------------------------------------------------------------* 270 Locked cache error messages 271 *---------------------------------------------------------------------------*/ 272 #define LC_ERR_ALLOC_ADDR "LCAlloc(): addr must be 32 byte aligned" 273 #define LC_ERR_ALLOC_NBYTES "LCAlloc(): nBytes must be 32 byte aligned" 274 #define LC_ERR_ALLOCNF_ADDR "LCAllocNoFlush(): addr must be 32 byte aligned" 275 #define LC_ERR_ALLOCNF_NBYTES "LCAllocNoFlush(): nBytes must be 32 byte aligned" 276 277 #define LC_ERR_FREE_ADDR "LCFree(): addr must be 32 byte aligned" 278 #define LC_ERR_FREE_NBYTES "LCFree(): nBytes must be 32 byte aligned" 279 280 #define LC_ERR_LOAD_SRCADDR "LCLoadData(): srcAddr not 32 byte aligned" 281 #define LC_ERR_LOAD_DESTADDR "LCLoadData(): destAddr not 32 byte aligned" 282 #define LC_ERR_LOAD_NBYTES "LCLoadData(): nBytes not 32 byte aligned" 283 284 #define LC_ERR_STORE_SRCADDR "LCStoreData(): srcAddr not 32 byte aligned" 285 #define LC_ERR_STORE_DESTADDR "LCStoreData(): destAddr not 32 byte aligned" 286 #define LC_ERR_STORE_NBYTES "LCStoreData(): nBytes not 32 byte aligned" 287 288 289 #ifdef __cplusplus 290 } 291 #endif 292 293 #endif // __OSPRIVATE_H__ 294