sl@0: // Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\include\e32kpan.h sl@0: // Kernel-generated panic codes sl@0: // sl@0: // sl@0: sl@0: #ifndef __E32KPAN_H__ sl@0: #define __E32KPAN_H__ sl@0: #include sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: These panics represent program errors detected by the Kernel. sl@0: Typically, they are caused by passing bad or contradictory parameters sl@0: to functions. Threads that cause exceptions also raise a KERN-EXEC type panic. sl@0: */ sl@0: enum TKernelPanic sl@0: { sl@0: sl@0: /** sl@0: This panic is raised when the Kernel cannot find an object in sl@0: the object index for the current process, or current thread, using sl@0: a specified object index number (the raw handle number). sl@0: */ sl@0: EBadHandle=0, sl@0: sl@0: /** sl@0: This is a general panic raised as a result of attempting sl@0: some unauthorised activity such as trying to suspend a thread, sl@0: or trying to set the priority of a thread, when not authorised to do so. sl@0: */ sl@0: EAccessDenied=1, sl@0: sl@0: /** sl@0: This panic is raised by the kernel when opening a kernel side object, sl@0: a DObject type, and the fullname is invalid. sl@0: */ sl@0: EBadName=2, sl@0: sl@0: /** sl@0: This panic is raised when an unhandled exception occurs. sl@0: Exceptions have many causes, but the most common are access violations sl@0: caused, for example, by dreferencing NULL. sl@0: sl@0: Among other possible causes are: sl@0: general protection faults, executing an invalid instruction, sl@0: alignment checks, etc. sl@0: */ sl@0: ECausedException=3, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: ECompletion=4, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: ELeaveWithoutTrap=5, sl@0: sl@0: /** sl@0: This panic is raised by the kernel when a handle to a code segment sl@0: is invalid. sl@0: */ sl@0: EBadCodeSegHandle=6, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: ESegmentWriteOutOfRange=7, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: EChunkSizeTooBig=8, sl@0: sl@0: /** sl@0: This is a general panic raised by the kernel when an attempt sl@0: is made to issue a request when one is already outstanding, and only one sl@0: outstanding request is permitted at any one time. sl@0: */ sl@0: ERequestAlreadyPending=9, sl@0: sl@0: /** sl@0: This panic is raised by the Request() member function of sl@0: the DLogicalChannel() kernel object when the request number passed sl@0: to the function is smaller than the permitted minimum. sl@0: sl@0: @see DLogicalChannel::EMinRequestId sl@0: */ sl@0: ERequestNoInvalid=10, sl@0: sl@0: /** sl@0: This panic is raised when creating a logical channel, and the unit number sl@0: is outside the permitted range. sl@0: sl@0: If unit numbers are not permmitted, the unit number value sl@0: must be KNullUnit. sl@0: If unit numbers are permitted, the unit number value must sl@0: be less than KMaxUnits. sl@0: */ sl@0: EBadUnitNumber=11, sl@0: sl@0: /** sl@0: This panic is raised by the kernel if an event capture sl@0: hook has already been designated. sl@0: */ sl@0: EEventAlreadyCaptured=12, sl@0: sl@0: /** sl@0: This panic is raised by the kernel if the current thread is not sl@0: the designated event capture hook. sl@0: */ sl@0: EEventNotCaptured=13, sl@0: sl@0: /** sl@0: This panic is raised when an attempt is made to set the priority of sl@0: a thread or process to an illegal value. sl@0: */ sl@0: EBadPriority=14, sl@0: sl@0: /** sl@0: This panic is raised when a timer event is requested from an asynchronous sl@0: timer service, an RTimer, and a timer event is already outstanding. sl@0: It is caused by calling either the At(), After() or Lock() member functions sl@0: after a previous call to any of these functions but before the timer event sl@0: requested by those functions has completed. sl@0: */ sl@0: ETimerAlreadyPending=15, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: EAlreadyLoggedOn=16, sl@0: sl@0: /** sl@0: The panic is raised if kernel heap checking has failed. sl@0: */ sl@0: EFailedKernelHeapCheck=17, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: ERequestFromWrongThread=18, sl@0: sl@0: /** sl@0: This panic is raised by the Kernel when a server program issues a request sl@0: to receive a message, i.e. when it calls the Receive() member function sl@0: of RServer, the handle to the Kernel side server object. sl@0: sl@0: The panic occurs when a receive message request has previously been made sl@0: and is still outstanding. sl@0: */ sl@0: EMesAlreadyPending=19, sl@0: sl@0: /** sl@0: This panic is raised by the Kernel when a request for an event sl@0: (as originated by a call to UserSvr::RequestEvent()) is made while sl@0: a previously made request is still outstanding. sl@0: */ sl@0: EEventRequestPending=20, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: EIllegalWsProcess=21, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: EHardwareNotAvailable=22, sl@0: sl@0: /** sl@0: This panic is raised when attempting to create a session with a server, sl@0: and access is been denied. sl@0: */ sl@0: EUnsharableSession=23, sl@0: sl@0: /** sl@0: This panic is raised when writing global DLL data, and the length of sl@0: data to be written is greater than the space available. sl@0: */ sl@0: EDesOverflow=24, sl@0: sl@0: /** sl@0: This panic is raised when searching for objects, using the internal sl@0: function TFindHandleBase::NextObject(), and an invalid object type sl@0: is specified. sl@0: */ sl@0: EBadObjectType=25, sl@0: sl@0: /** sl@0: This panic is raised by kernel side code that implements heap debugging sl@0: behaviour, when a specific debug request is not recognised. sl@0: */ sl@0: EBadKernelHeapDebugFunction=26, sl@0: sl@0: /** sl@0: This panic is raised when an executive call is made with an invalid call sl@0: number. sl@0: */ sl@0: EInvalidSystemCall=27, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: ESetSessionPtrInvalidMessage=28, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: ECompleteDisconnectInvalidMessage=29, sl@0: sl@0: /** sl@0: This panic is raised when an attempt is being made to send sl@0: a synchronous message to a server more than once, using sl@0: the current thread's dedicated synchronous message. sl@0: */ sl@0: ESyncMsgSentTwice=30, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: EAutoAttachFailed=31, sl@0: sl@0: /** sl@0: This panic is called by DProcess::Resume() when trying to resume sl@0: a process that is still being loaded. sl@0: */ sl@0: EProcessNotLoaded=32, sl@0: sl@0: /** sl@0: This panic is raised in a call to Kern::KUDesInfo(), Kern::KUDesPut() etc sl@0: when an invalid descriptor is passed. sl@0: */ sl@0: EKUDesInfoInvalidType=33, sl@0: sl@0: /** sl@0: This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut() sl@0: when the descriptor passed to it is not a modifiable type. sl@0: */ sl@0: EKUDesSetLengthInvalidType=34, sl@0: sl@0: /** sl@0: This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut() sl@0: when the length of the source descriptor is longer than the length of sl@0: the target descriptor. sl@0: */ sl@0: EKUDesSetLengthOverflow=35, sl@0: sl@0: /** sl@0: This panic is raised by the kernel side code that implements the setting sl@0: of the currency symbol when the length of the currency symbol is sl@0: greater than KMaxCurrencySymbol. sl@0: */ sl@0: EBadParameter=36, sl@0: sl@0: /** sl@0: This panic is raised by kernel code when it tries to acquire the process sl@0: DLL lock just before a load, and the wait DLL lock is invalid. sl@0: */ sl@0: EWaitDllLockInvalid=37, sl@0: sl@0: /** sl@0: This panic is raised by internal kernel code when an illegal attempt sl@0: is made to attatch to a library. sl@0: */ sl@0: ELibraryAttachInvalid=38, sl@0: sl@0: /** sl@0: This panic is raised when extracting a list of DLL entry points sl@0: and the number exceeds the maximum permitted. sl@0: */ sl@0: ETooManyEntryPoints=39, sl@0: sl@0: /** sl@0: This panic is raised by internal kernel code when an illegal attempt sl@0: is made to detach a library. sl@0: */ sl@0: ELibraryDetachInvalid=40, sl@0: sl@0: /** sl@0: This panic is raised by internal kernel code when an illegal attempt sl@0: is made to attach to a library. sl@0: */ sl@0: ELibraryAttachedInvalid=41, sl@0: sl@0: /** sl@0: This panic is raised by internal kernel code when an illegal attempt sl@0: is made to detach a library. sl@0: */ sl@0: ELibraryDetachedInvalid=42, sl@0: sl@0: /** sl@0: This panic is raised by kernel code when it tries to release the process DLL lock sl@0: when a load fails, and the release DLL lock is invalid. sl@0: */ sl@0: EReleaseDllLockInvalid=43, sl@0: sl@0: /** sl@0: This panic is raised when a bad message handle is passed to the kernel. sl@0: This usually occurs when using methods on the RMessagePtr2 or RMessage2 classes sl@0: after the message has been completed; or when the iHandle data member has become sl@0: corrupted. sl@0: */ sl@0: EBadMessageHandle=44, sl@0: sl@0: /** sl@0: Not used. sl@0: */ sl@0: EInvalidMessageParameter=45, sl@0: sl@0: /** sl@0: This panic can be raised as a result of a call to one of a large sl@0: number of functions. In general, the panic indicates an attempt to perform an sl@0: operation on a thread or process by code running in another process - violating sl@0: the security principle of process isolation. sl@0: sl@0: There are exceptions to this general rule, for example, where the sl@0: panic is raised because the calling process has insufficient capability. The sl@0: precise reason is stated with the function(s). sl@0: sl@0: -# The panic is raised on a call to the following function if the sl@0: process owning the thread performing the call is not the creator of the target sl@0: process or, if a handle is specified, the handle is not local. sl@0: - RProcess::SetParameter() sl@0: . sl@0: -# The panic is raised on a call to the following functions if the sl@0: process owning the thread performing the call is not the same as the target sl@0: process.\n sl@0: - RProcess::Kill() sl@0: - RProcess::Terminate() sl@0: - RProcess::Panic() sl@0: - RProcess::SetJustInTime() sl@0: - RProcess::Resume() sl@0: - RThread::Kill() sl@0: - RThread::Terminate() sl@0: - RThread::Panic() sl@0: - RThread::Suspend() sl@0: - RThread::Resume() sl@0: - RThread::SetPriority() sl@0: - RThread::RequestComplete() sl@0: - RThread::RequestSignal() sl@0: . sl@0: NOTE: the creator of a new process can kill or panic the new sl@0: process, change the new process priority and set the new process startup sl@0: parameters until the process is resumed (which the creator can also do). After sl@0: the new process has been resumed, then it becomes totally independent of its sl@0: creator, and any attempt to panic it, kill it etc will raise the KERN-EXEC 46 sl@0: panic. sl@0: -# The panic is raised on call to the following (Symbian partner sl@0: only) functions if the calling process does not have the PowerMgmt sl@0: capability (TCapability::ECapabilityPowerMgmt): sl@0: - Power::PowerDown() sl@0: - Power::EnableWakeupEvents() sl@0: - Power::DisableWakeupEvents() sl@0: - Power::RequestWakeupEventNotification() sl@0: - Power::CancelWakeupEventNotification() sl@0: . sl@0: -# The panic is raised on call to the following functions if the sl@0: calling process does not have the WriteDeviceData capability sl@0: (TCapability::ECapabilityWriteDeviceData): sl@0: - User::SetMachineConfiguration() sl@0: - User::SetHomeTime() sl@0: - User::SetUTCTime() sl@0: - User::SetUTCOffset() sl@0: - User::SetUTCTimeAndOffset() sl@0: . sl@0: -# The panic is raised on call to the following function if the sl@0: calling process does not have the ReadDeviceData capability sl@0: (TCapability::ECapabilityReadDeviceData): sl@0: - User::MachineConfiguration() sl@0: . sl@0: */ sl@0: EPlatformSecurityTrap=46, sl@0: sl@0: /** sl@0: This panic is raised when the user issues a request to be notified of sl@0: messages or the availability of space, when a request has already been sl@0: issued and is still outstanding. sl@0: sl@0: @see RMsgQueue sl@0: */ sl@0: EMsgQueueRequestPending=47, sl@0: sl@0: /** sl@0: This panic is raised when creating a message queue and the size of sl@0: the template parameter is invalid. sl@0: sl@0: @see RMsgQueue sl@0: */ sl@0: EMsgQueueInvalidLength=48, sl@0: sl@0: /** sl@0: This panic is raised when creating a message queue and the specified number sl@0: of slots is not positive. sl@0: sl@0: @see RMsgQueue sl@0: */ sl@0: EMsgQueueInvalidSlots=49, sl@0: sl@0: /** sl@0: This panic is raised if an attempt is made to cancel an outstanding request sl@0: to be notified of messages or the availability of space, and the cancel is sl@0: being made by a thread in a different process. sl@0: */ sl@0: EMsgQueueIllegalCancel=50, sl@0: sl@0: /** sl@0: This panic is raised by RProcess::Setparameter() sl@0: if a slot value is invalid. sl@0: */ sl@0: EParameterSlotRange=51, sl@0: sl@0: /** sl@0: This panic is raised by RProcess::Setparameter() sl@0: if a slot is in use. sl@0: */ sl@0: EParameterSlotInUse=52, sl@0: sl@0: /** sl@0: This panic is raised by RProcess::Setparameter() sl@0: if the length of the data passed is negative. sl@0: */ sl@0: EParameterSlotDataLength=53, sl@0: sl@0: /** sl@0: This panic is raised by RCondVar::Wait() when the current thread does sl@0: not hold the specified mutex. sl@0: */ sl@0: ECondVarWaitMutexNotLocked=54, sl@0: sl@0: /** sl@0: This panic is raised when a call is made to RThread::GetDesMaxLength(), sl@0: which is obsolete. sl@0: */ sl@0: EObsoleteFunctionality=55, sl@0: sl@0: /** sl@0: This panic is raised on a process which has not yet been resumed and whoes sl@0: creator has died. sl@0: */ sl@0: EZombieProcessKilled=56, sl@0: sl@0: /** sl@0: A connect message was sent to a session that has already been successfully sl@0: connected to the server (cookie is non-NULL). sl@0: */ sl@0: ESessionAlreadyConnected=57, sl@0: sl@0: /** sl@0: A session tried to set the kernel session cookie to a null value sl@0: */ sl@0: ESessionNullCookie=58, sl@0: sl@0: /** sl@0: A session tried to set the kernel session cookie twice sl@0: */ sl@0: ESessionCookieAlreadySet=59, sl@0: sl@0: /** sl@0: A session tried to set the kernel session cookie with a message sl@0: that wasn't the connect message sl@0: */ sl@0: ESessionInvalidCookieMsg=60, sl@0: sl@0: /** sl@0: A realtime thread executed a non-realtime function. sl@0: */ sl@0: EIllegalFunctionForRealtimeThread=61, sl@0: sl@0: /** sl@0: This panic is raised by Kern::SetThreadRealtimeState when the state argument is invalid. sl@0: */ sl@0: EInvalidRealtimeState=62, sl@0: sl@0: /** sl@0: A bad descriptor was passed to a server over IPC, causing an exception when the kernel tried to sl@0: update its length field. sl@0: */ sl@0: EBadIpcDescriptor=63, sl@0: sl@0: /** sl@0: An invalid notification type was passed to a shared buffers exec call handler. sl@0: */ sl@0: EShBufExecBadNotification=64, sl@0: sl@0: /** sl@0: An invalid parameter was passed to a shared buffers exec call handler. sl@0: */ sl@0: EShBufExecBadParameter=65, sl@0: }; sl@0: sl@0: #endif