1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/include/e32kpan.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,508 @@
1.4 +// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32\include\e32kpan.h
1.18 +// Kernel-generated panic codes
1.19 +//
1.20 +//
1.21 +
1.22 +#ifndef __E32KPAN_H__
1.23 +#define __E32KPAN_H__
1.24 +#include <e32def.h>
1.25 +
1.26 +/**
1.27 +@publishedAll
1.28 +@released
1.29 +
1.30 +These panics represent program errors detected by the Kernel.
1.31 +Typically, they are caused by passing bad or contradictory parameters
1.32 +to functions. Threads that cause exceptions also raise a KERN-EXEC type panic.
1.33 +*/
1.34 +enum TKernelPanic
1.35 + {
1.36 +
1.37 + /**
1.38 + This panic is raised when the Kernel cannot find an object in
1.39 + the object index for the current process, or current thread, using
1.40 + a specified object index number (the raw handle number).
1.41 + */
1.42 + EBadHandle=0,
1.43 +
1.44 + /**
1.45 + This is a general panic raised as a result of attempting
1.46 + some unauthorised activity such as trying to suspend a thread,
1.47 + or trying to set the priority of a thread, when not authorised to do so.
1.48 + */
1.49 + EAccessDenied=1,
1.50 +
1.51 + /**
1.52 + This panic is raised by the kernel when opening a kernel side object,
1.53 + a DObject type, and the fullname is invalid.
1.54 + */
1.55 + EBadName=2,
1.56 +
1.57 + /**
1.58 + This panic is raised when an unhandled exception occurs.
1.59 + Exceptions have many causes, but the most common are access violations
1.60 + caused, for example, by dreferencing NULL.
1.61 +
1.62 + Among other possible causes are:
1.63 + general protection faults, executing an invalid instruction,
1.64 + alignment checks, etc.
1.65 + */
1.66 + ECausedException=3,
1.67 +
1.68 + /**
1.69 + Not used.
1.70 + */
1.71 + ECompletion=4,
1.72 +
1.73 + /**
1.74 + Not used.
1.75 + */
1.76 + ELeaveWithoutTrap=5,
1.77 +
1.78 + /**
1.79 + This panic is raised by the kernel when a handle to a code segment
1.80 + is invalid.
1.81 + */
1.82 + EBadCodeSegHandle=6,
1.83 +
1.84 + /**
1.85 + Not used.
1.86 + */
1.87 + ESegmentWriteOutOfRange=7,
1.88 +
1.89 + /**
1.90 + Not used.
1.91 + */
1.92 + EChunkSizeTooBig=8,
1.93 +
1.94 + /**
1.95 + This is a general panic raised by the kernel when an attempt
1.96 + is made to issue a request when one is already outstanding, and only one
1.97 + outstanding request is permitted at any one time.
1.98 + */
1.99 + ERequestAlreadyPending=9,
1.100 +
1.101 + /**
1.102 + This panic is raised by the Request() member function of
1.103 + the DLogicalChannel() kernel object when the request number passed
1.104 + to the function is smaller than the permitted minimum.
1.105 +
1.106 + @see DLogicalChannel::EMinRequestId
1.107 + */
1.108 + ERequestNoInvalid=10,
1.109 +
1.110 + /**
1.111 + This panic is raised when creating a logical channel, and the unit number
1.112 + is outside the permitted range.
1.113 +
1.114 + If unit numbers are not permmitted, the unit number value
1.115 + must be KNullUnit.
1.116 + If unit numbers are permitted, the unit number value must
1.117 + be less than KMaxUnits.
1.118 + */
1.119 + EBadUnitNumber=11,
1.120 +
1.121 + /**
1.122 + This panic is raised by the kernel if an event capture
1.123 + hook has already been designated.
1.124 + */
1.125 + EEventAlreadyCaptured=12,
1.126 +
1.127 + /**
1.128 + This panic is raised by the kernel if the current thread is not
1.129 + the designated event capture hook.
1.130 + */
1.131 + EEventNotCaptured=13,
1.132 +
1.133 + /**
1.134 + This panic is raised when an attempt is made to set the priority of
1.135 + a thread or process to an illegal value.
1.136 + */
1.137 + EBadPriority=14,
1.138 +
1.139 + /**
1.140 + This panic is raised when a timer event is requested from an asynchronous
1.141 + timer service, an RTimer, and a timer event is already outstanding.
1.142 + It is caused by calling either the At(), After() or Lock() member functions
1.143 + after a previous call to any of these functions but before the timer event
1.144 + requested by those functions has completed.
1.145 + */
1.146 + ETimerAlreadyPending=15,
1.147 +
1.148 + /**
1.149 + Not used.
1.150 + */
1.151 + EAlreadyLoggedOn=16,
1.152 +
1.153 + /**
1.154 + The panic is raised if kernel heap checking has failed.
1.155 + */
1.156 + EFailedKernelHeapCheck=17,
1.157 +
1.158 + /**
1.159 + Not used.
1.160 + */
1.161 + ERequestFromWrongThread=18,
1.162 +
1.163 + /**
1.164 + This panic is raised by the Kernel when a server program issues a request
1.165 + to receive a message, i.e. when it calls the Receive() member function
1.166 + of RServer, the handle to the Kernel side server object.
1.167 +
1.168 + The panic occurs when a receive message request has previously been made
1.169 + and is still outstanding.
1.170 + */
1.171 + EMesAlreadyPending=19,
1.172 +
1.173 + /**
1.174 + This panic is raised by the Kernel when a request for an event
1.175 + (as originated by a call to UserSvr::RequestEvent()) is made while
1.176 + a previously made request is still outstanding.
1.177 + */
1.178 + EEventRequestPending=20,
1.179 +
1.180 + /**
1.181 + Not used.
1.182 + */
1.183 + EIllegalWsProcess=21,
1.184 +
1.185 + /**
1.186 + Not used.
1.187 + */
1.188 + EHardwareNotAvailable=22,
1.189 +
1.190 + /**
1.191 + This panic is raised when attempting to create a session with a server,
1.192 + and access is been denied.
1.193 + */
1.194 + EUnsharableSession=23,
1.195 +
1.196 + /**
1.197 + This panic is raised when writing global DLL data, and the length of
1.198 + data to be written is greater than the space available.
1.199 + */
1.200 + EDesOverflow=24,
1.201 +
1.202 + /**
1.203 + This panic is raised when searching for objects, using the internal
1.204 + function TFindHandleBase::NextObject(), and an invalid object type
1.205 + is specified.
1.206 + */
1.207 + EBadObjectType=25,
1.208 +
1.209 + /**
1.210 + This panic is raised by kernel side code that implements heap debugging
1.211 + behaviour, when a specific debug request is not recognised.
1.212 + */
1.213 + EBadKernelHeapDebugFunction=26,
1.214 +
1.215 + /**
1.216 + This panic is raised when an executive call is made with an invalid call
1.217 + number.
1.218 + */
1.219 + EInvalidSystemCall=27,
1.220 +
1.221 + /**
1.222 + Not used.
1.223 + */
1.224 + ESetSessionPtrInvalidMessage=28,
1.225 +
1.226 + /**
1.227 + Not used.
1.228 + */
1.229 + ECompleteDisconnectInvalidMessage=29,
1.230 +
1.231 + /**
1.232 + This panic is raised when an attempt is being made to send
1.233 + a synchronous message to a server more than once, using
1.234 + the current thread's dedicated synchronous message.
1.235 + */
1.236 + ESyncMsgSentTwice=30,
1.237 +
1.238 + /**
1.239 + Not used.
1.240 + */
1.241 + EAutoAttachFailed=31,
1.242 +
1.243 + /**
1.244 + This panic is called by DProcess::Resume() when trying to resume
1.245 + a process that is still being loaded.
1.246 + */
1.247 + EProcessNotLoaded=32,
1.248 +
1.249 + /**
1.250 + This panic is raised in a call to Kern::KUDesInfo(), Kern::KUDesPut() etc
1.251 + when an invalid descriptor is passed.
1.252 + */
1.253 + EKUDesInfoInvalidType=33,
1.254 +
1.255 + /**
1.256 + This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut()
1.257 + when the descriptor passed to it is not a modifiable type.
1.258 + */
1.259 + EKUDesSetLengthInvalidType=34,
1.260 +
1.261 + /**
1.262 + This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut()
1.263 + when the length of the source descriptor is longer than the length of
1.264 + the target descriptor.
1.265 + */
1.266 + EKUDesSetLengthOverflow=35,
1.267 +
1.268 + /**
1.269 + This panic is raised by the kernel side code that implements the setting
1.270 + of the currency symbol when the length of the currency symbol is
1.271 + greater than KMaxCurrencySymbol.
1.272 + */
1.273 + EBadParameter=36,
1.274 +
1.275 + /**
1.276 + This panic is raised by kernel code when it tries to acquire the process
1.277 + DLL lock just before a load, and the wait DLL lock is invalid.
1.278 + */
1.279 + EWaitDllLockInvalid=37,
1.280 +
1.281 + /**
1.282 + This panic is raised by internal kernel code when an illegal attempt
1.283 + is made to attatch to a library.
1.284 + */
1.285 + ELibraryAttachInvalid=38,
1.286 +
1.287 + /**
1.288 + This panic is raised when extracting a list of DLL entry points
1.289 + and the number exceeds the maximum permitted.
1.290 + */
1.291 + ETooManyEntryPoints=39,
1.292 +
1.293 + /**
1.294 + This panic is raised by internal kernel code when an illegal attempt
1.295 + is made to detach a library.
1.296 + */
1.297 + ELibraryDetachInvalid=40,
1.298 +
1.299 + /**
1.300 + This panic is raised by internal kernel code when an illegal attempt
1.301 + is made to attach to a library.
1.302 + */
1.303 + ELibraryAttachedInvalid=41,
1.304 +
1.305 + /**
1.306 + This panic is raised by internal kernel code when an illegal attempt
1.307 + is made to detach a library.
1.308 + */
1.309 + ELibraryDetachedInvalid=42,
1.310 +
1.311 + /**
1.312 + This panic is raised by kernel code when it tries to release the process DLL lock
1.313 + when a load fails, and the release DLL lock is invalid.
1.314 + */
1.315 + EReleaseDllLockInvalid=43,
1.316 +
1.317 + /**
1.318 + This panic is raised when a bad message handle is passed to the kernel.
1.319 + This usually occurs when using methods on the RMessagePtr2 or RMessage2 classes
1.320 + after the message has been completed; or when the iHandle data member has become
1.321 + corrupted.
1.322 + */
1.323 + EBadMessageHandle=44,
1.324 +
1.325 + /**
1.326 + Not used.
1.327 + */
1.328 + EInvalidMessageParameter=45,
1.329 +
1.330 + /**
1.331 + This panic can be raised as a result of a call to one of a large
1.332 + number of functions. In general, the panic indicates an attempt to perform an
1.333 + operation on a thread or process by code running in another process - violating
1.334 + the security principle of process isolation.
1.335 +
1.336 + There are exceptions to this general rule, for example, where the
1.337 + panic is raised because the calling process has insufficient capability. The
1.338 + precise reason is stated with the function(s).
1.339 +
1.340 + -# The panic is raised on a call to the following function if the
1.341 + process owning the thread performing the call is not the creator of the target
1.342 + process or, if a handle is specified, the handle is not local.
1.343 + - RProcess::SetParameter()
1.344 + .
1.345 + -# The panic is raised on a call to the following functions if the
1.346 + process owning the thread performing the call is not the same as the target
1.347 + process.\n
1.348 + - RProcess::Kill()
1.349 + - RProcess::Terminate()
1.350 + - RProcess::Panic()
1.351 + - RProcess::SetJustInTime()
1.352 + - RProcess::Resume()
1.353 + - RThread::Kill()
1.354 + - RThread::Terminate()
1.355 + - RThread::Panic()
1.356 + - RThread::Suspend()
1.357 + - RThread::Resume()
1.358 + - RThread::SetPriority()
1.359 + - RThread::RequestComplete()
1.360 + - RThread::RequestSignal()
1.361 + .
1.362 + NOTE: the creator of a new process can kill or panic the new
1.363 + process, change the new process priority and set the new process startup
1.364 + parameters until the process is resumed (which the creator can also do). After
1.365 + the new process has been resumed, then it becomes totally independent of its
1.366 + creator, and any attempt to panic it, kill it etc will raise the KERN-EXEC 46
1.367 + panic.
1.368 + -# The panic is raised on call to the following (Symbian partner
1.369 + only) functions if the calling process does not have the PowerMgmt
1.370 + capability (TCapability::ECapabilityPowerMgmt):
1.371 + - Power::PowerDown()
1.372 + - Power::EnableWakeupEvents()
1.373 + - Power::DisableWakeupEvents()
1.374 + - Power::RequestWakeupEventNotification()
1.375 + - Power::CancelWakeupEventNotification()
1.376 + .
1.377 + -# The panic is raised on call to the following functions if the
1.378 + calling process does not have the WriteDeviceData capability
1.379 + (TCapability::ECapabilityWriteDeviceData):
1.380 + - User::SetMachineConfiguration()
1.381 + - User::SetHomeTime()
1.382 + - User::SetUTCTime()
1.383 + - User::SetUTCOffset()
1.384 + - User::SetUTCTimeAndOffset()
1.385 + .
1.386 + -# The panic is raised on call to the following function if the
1.387 + calling process does not have the ReadDeviceData capability
1.388 + (TCapability::ECapabilityReadDeviceData):
1.389 + - User::MachineConfiguration()
1.390 + .
1.391 + */
1.392 + EPlatformSecurityTrap=46,
1.393 +
1.394 + /**
1.395 + This panic is raised when the user issues a request to be notified of
1.396 + messages or the availability of space, when a request has already been
1.397 + issued and is still outstanding.
1.398 +
1.399 + @see RMsgQueue
1.400 + */
1.401 + EMsgQueueRequestPending=47,
1.402 +
1.403 + /**
1.404 + This panic is raised when creating a message queue and the size of
1.405 + the template parameter is invalid.
1.406 +
1.407 + @see RMsgQueue
1.408 + */
1.409 + EMsgQueueInvalidLength=48,
1.410 +
1.411 + /**
1.412 + This panic is raised when creating a message queue and the specified number
1.413 + of slots is not positive.
1.414 +
1.415 + @see RMsgQueue
1.416 + */
1.417 + EMsgQueueInvalidSlots=49,
1.418 +
1.419 + /**
1.420 + This panic is raised if an attempt is made to cancel an outstanding request
1.421 + to be notified of messages or the availability of space, and the cancel is
1.422 + being made by a thread in a different process.
1.423 + */
1.424 + EMsgQueueIllegalCancel=50,
1.425 +
1.426 + /**
1.427 + This panic is raised by RProcess::Setparameter()
1.428 + if a slot value is invalid.
1.429 + */
1.430 + EParameterSlotRange=51,
1.431 +
1.432 + /**
1.433 + This panic is raised by RProcess::Setparameter()
1.434 + if a slot is in use.
1.435 + */
1.436 + EParameterSlotInUse=52,
1.437 +
1.438 + /**
1.439 + This panic is raised by RProcess::Setparameter()
1.440 + if the length of the data passed is negative.
1.441 + */
1.442 + EParameterSlotDataLength=53,
1.443 +
1.444 + /**
1.445 + This panic is raised by RCondVar::Wait() when the current thread does
1.446 + not hold the specified mutex.
1.447 + */
1.448 + ECondVarWaitMutexNotLocked=54,
1.449 +
1.450 + /**
1.451 + This panic is raised when a call is made to RThread::GetDesMaxLength(),
1.452 + which is obsolete.
1.453 + */
1.454 + EObsoleteFunctionality=55,
1.455 +
1.456 + /**
1.457 + This panic is raised on a process which has not yet been resumed and whoes
1.458 + creator has died.
1.459 + */
1.460 + EZombieProcessKilled=56,
1.461 +
1.462 + /**
1.463 + A connect message was sent to a session that has already been successfully
1.464 + connected to the server (cookie is non-NULL).
1.465 + */
1.466 + ESessionAlreadyConnected=57,
1.467 +
1.468 + /**
1.469 + A session tried to set the kernel session cookie to a null value
1.470 + */
1.471 + ESessionNullCookie=58,
1.472 +
1.473 + /**
1.474 + A session tried to set the kernel session cookie twice
1.475 + */
1.476 + ESessionCookieAlreadySet=59,
1.477 +
1.478 + /**
1.479 + A session tried to set the kernel session cookie with a message
1.480 + that wasn't the connect message
1.481 + */
1.482 + ESessionInvalidCookieMsg=60,
1.483 +
1.484 + /**
1.485 + A realtime thread executed a non-realtime function.
1.486 + */
1.487 + EIllegalFunctionForRealtimeThread=61,
1.488 +
1.489 + /**
1.490 + This panic is raised by Kern::SetThreadRealtimeState when the state argument is invalid.
1.491 + */
1.492 + EInvalidRealtimeState=62,
1.493 +
1.494 + /**
1.495 + A bad descriptor was passed to a server over IPC, causing an exception when the kernel tried to
1.496 + update its length field.
1.497 + */
1.498 + EBadIpcDescriptor=63,
1.499 +
1.500 + /**
1.501 + An invalid notification type was passed to a shared buffers exec call handler.
1.502 + */
1.503 + EShBufExecBadNotification=64,
1.504 +
1.505 + /**
1.506 + An invalid parameter was passed to a shared buffers exec call handler.
1.507 + */
1.508 + EShBufExecBadParameter=65,
1.509 + };
1.510 +
1.511 +#endif