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