|
1 // Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32\include\e32kpan.h |
|
15 // Kernel-generated panic codes |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __E32KPAN_H__ |
|
20 #define __E32KPAN_H__ |
|
21 #include <e32def.h> |
|
22 |
|
23 /** |
|
24 @publishedAll |
|
25 @released |
|
26 |
|
27 These panics represent program errors detected by the Kernel. |
|
28 Typically, they are caused by passing bad or contradictory parameters |
|
29 to functions. Threads that cause exceptions also raise a KERN-EXEC type panic. |
|
30 */ |
|
31 enum TKernelPanic |
|
32 { |
|
33 |
|
34 /** |
|
35 This panic is raised when the Kernel cannot find an object in |
|
36 the object index for the current process, or current thread, using |
|
37 a specified object index number (the raw handle number). |
|
38 */ |
|
39 EBadHandle=0, |
|
40 |
|
41 /** |
|
42 This is a general panic raised as a result of attempting |
|
43 some unauthorised activity such as trying to suspend a thread, |
|
44 or trying to set the priority of a thread, when not authorised to do so. |
|
45 */ |
|
46 EAccessDenied=1, |
|
47 |
|
48 /** |
|
49 This panic is raised by the kernel when opening a kernel side object, |
|
50 a DObject type, and the fullname is invalid. |
|
51 */ |
|
52 EBadName=2, |
|
53 |
|
54 /** |
|
55 This panic is raised when an unhandled exception occurs. |
|
56 Exceptions have many causes, but the most common are access violations |
|
57 caused, for example, by dreferencing NULL. |
|
58 |
|
59 Among other possible causes are: |
|
60 general protection faults, executing an invalid instruction, |
|
61 alignment checks, etc. |
|
62 */ |
|
63 ECausedException=3, |
|
64 |
|
65 /** |
|
66 Not used. |
|
67 */ |
|
68 ECompletion=4, |
|
69 |
|
70 /** |
|
71 Not used. |
|
72 */ |
|
73 ELeaveWithoutTrap=5, |
|
74 |
|
75 /** |
|
76 This panic is raised by the kernel when a handle to a code segment |
|
77 is invalid. |
|
78 */ |
|
79 EBadCodeSegHandle=6, |
|
80 |
|
81 /** |
|
82 Not used. |
|
83 */ |
|
84 ESegmentWriteOutOfRange=7, |
|
85 |
|
86 /** |
|
87 Not used. |
|
88 */ |
|
89 EChunkSizeTooBig=8, |
|
90 |
|
91 /** |
|
92 This is a general panic raised by the kernel when an attempt |
|
93 is made to issue a request when one is already outstanding, and only one |
|
94 outstanding request is permitted at any one time. |
|
95 */ |
|
96 ERequestAlreadyPending=9, |
|
97 |
|
98 /** |
|
99 This panic is raised by the Request() member function of |
|
100 the DLogicalChannel() kernel object when the request number passed |
|
101 to the function is smaller than the permitted minimum. |
|
102 |
|
103 @see DLogicalChannel::EMinRequestId |
|
104 */ |
|
105 ERequestNoInvalid=10, |
|
106 |
|
107 /** |
|
108 This panic is raised when creating a logical channel, and the unit number |
|
109 is outside the permitted range. |
|
110 |
|
111 If unit numbers are not permmitted, the unit number value |
|
112 must be KNullUnit. |
|
113 If unit numbers are permitted, the unit number value must |
|
114 be less than KMaxUnits. |
|
115 */ |
|
116 EBadUnitNumber=11, |
|
117 |
|
118 /** |
|
119 This panic is raised by the kernel if an event capture |
|
120 hook has already been designated. |
|
121 */ |
|
122 EEventAlreadyCaptured=12, |
|
123 |
|
124 /** |
|
125 This panic is raised by the kernel if the current thread is not |
|
126 the designated event capture hook. |
|
127 */ |
|
128 EEventNotCaptured=13, |
|
129 |
|
130 /** |
|
131 This panic is raised when an attempt is made to set the priority of |
|
132 a thread or process to an illegal value. |
|
133 */ |
|
134 EBadPriority=14, |
|
135 |
|
136 /** |
|
137 This panic is raised when a timer event is requested from an asynchronous |
|
138 timer service, an RTimer, and a timer event is already outstanding. |
|
139 It is caused by calling either the At(), After() or Lock() member functions |
|
140 after a previous call to any of these functions but before the timer event |
|
141 requested by those functions has completed. |
|
142 */ |
|
143 ETimerAlreadyPending=15, |
|
144 |
|
145 /** |
|
146 Not used. |
|
147 */ |
|
148 EAlreadyLoggedOn=16, |
|
149 |
|
150 /** |
|
151 The panic is raised if kernel heap checking has failed. |
|
152 */ |
|
153 EFailedKernelHeapCheck=17, |
|
154 |
|
155 /** |
|
156 Not used. |
|
157 */ |
|
158 ERequestFromWrongThread=18, |
|
159 |
|
160 /** |
|
161 This panic is raised by the Kernel when a server program issues a request |
|
162 to receive a message, i.e. when it calls the Receive() member function |
|
163 of RServer, the handle to the Kernel side server object. |
|
164 |
|
165 The panic occurs when a receive message request has previously been made |
|
166 and is still outstanding. |
|
167 */ |
|
168 EMesAlreadyPending=19, |
|
169 |
|
170 /** |
|
171 This panic is raised by the Kernel when a request for an event |
|
172 (as originated by a call to UserSvr::RequestEvent()) is made while |
|
173 a previously made request is still outstanding. |
|
174 */ |
|
175 EEventRequestPending=20, |
|
176 |
|
177 /** |
|
178 Not used. |
|
179 */ |
|
180 EIllegalWsProcess=21, |
|
181 |
|
182 /** |
|
183 Not used. |
|
184 */ |
|
185 EHardwareNotAvailable=22, |
|
186 |
|
187 /** |
|
188 This panic is raised when attempting to create a session with a server, |
|
189 and access is been denied. |
|
190 */ |
|
191 EUnsharableSession=23, |
|
192 |
|
193 /** |
|
194 This panic is raised when writing global DLL data, and the length of |
|
195 data to be written is greater than the space available. |
|
196 */ |
|
197 EDesOverflow=24, |
|
198 |
|
199 /** |
|
200 This panic is raised when searching for objects, using the internal |
|
201 function TFindHandleBase::NextObject(), and an invalid object type |
|
202 is specified. |
|
203 */ |
|
204 EBadObjectType=25, |
|
205 |
|
206 /** |
|
207 This panic is raised by kernel side code that implements heap debugging |
|
208 behaviour, when a specific debug request is not recognised. |
|
209 */ |
|
210 EBadKernelHeapDebugFunction=26, |
|
211 |
|
212 /** |
|
213 This panic is raised when an executive call is made with an invalid call |
|
214 number. |
|
215 */ |
|
216 EInvalidSystemCall=27, |
|
217 |
|
218 /** |
|
219 Not used. |
|
220 */ |
|
221 ESetSessionPtrInvalidMessage=28, |
|
222 |
|
223 /** |
|
224 Not used. |
|
225 */ |
|
226 ECompleteDisconnectInvalidMessage=29, |
|
227 |
|
228 /** |
|
229 This panic is raised when an attempt is being made to send |
|
230 a synchronous message to a server more than once, using |
|
231 the current thread's dedicated synchronous message. |
|
232 */ |
|
233 ESyncMsgSentTwice=30, |
|
234 |
|
235 /** |
|
236 Not used. |
|
237 */ |
|
238 EAutoAttachFailed=31, |
|
239 |
|
240 /** |
|
241 This panic is called by DProcess::Resume() when trying to resume |
|
242 a process that is still being loaded. |
|
243 */ |
|
244 EProcessNotLoaded=32, |
|
245 |
|
246 /** |
|
247 This panic is raised in a call to Kern::KUDesInfo(), Kern::KUDesPut() etc |
|
248 when an invalid descriptor is passed. |
|
249 */ |
|
250 EKUDesInfoInvalidType=33, |
|
251 |
|
252 /** |
|
253 This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut() |
|
254 when the descriptor passed to it is not a modifiable type. |
|
255 */ |
|
256 EKUDesSetLengthInvalidType=34, |
|
257 |
|
258 /** |
|
259 This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut() |
|
260 when the length of the source descriptor is longer than the length of |
|
261 the target descriptor. |
|
262 */ |
|
263 EKUDesSetLengthOverflow=35, |
|
264 |
|
265 /** |
|
266 This panic is raised by the kernel side code that implements the setting |
|
267 of the currency symbol when the length of the currency symbol is |
|
268 greater than KMaxCurrencySymbol. |
|
269 */ |
|
270 EBadParameter=36, |
|
271 |
|
272 /** |
|
273 This panic is raised by kernel code when it tries to acquire the process |
|
274 DLL lock just before a load, and the wait DLL lock is invalid. |
|
275 */ |
|
276 EWaitDllLockInvalid=37, |
|
277 |
|
278 /** |
|
279 This panic is raised by internal kernel code when an illegal attempt |
|
280 is made to attatch to a library. |
|
281 */ |
|
282 ELibraryAttachInvalid=38, |
|
283 |
|
284 /** |
|
285 This panic is raised when extracting a list of DLL entry points |
|
286 and the number exceeds the maximum permitted. |
|
287 */ |
|
288 ETooManyEntryPoints=39, |
|
289 |
|
290 /** |
|
291 This panic is raised by internal kernel code when an illegal attempt |
|
292 is made to detach a library. |
|
293 */ |
|
294 ELibraryDetachInvalid=40, |
|
295 |
|
296 /** |
|
297 This panic is raised by internal kernel code when an illegal attempt |
|
298 is made to attach to a library. |
|
299 */ |
|
300 ELibraryAttachedInvalid=41, |
|
301 |
|
302 /** |
|
303 This panic is raised by internal kernel code when an illegal attempt |
|
304 is made to detach a library. |
|
305 */ |
|
306 ELibraryDetachedInvalid=42, |
|
307 |
|
308 /** |
|
309 This panic is raised by kernel code when it tries to release the process DLL lock |
|
310 when a load fails, and the release DLL lock is invalid. |
|
311 */ |
|
312 EReleaseDllLockInvalid=43, |
|
313 |
|
314 /** |
|
315 This panic is raised when a bad message handle is passed to the kernel. |
|
316 This usually occurs when using methods on the RMessagePtr2 or RMessage2 classes |
|
317 after the message has been completed; or when the iHandle data member has become |
|
318 corrupted. |
|
319 */ |
|
320 EBadMessageHandle=44, |
|
321 |
|
322 /** |
|
323 Not used. |
|
324 */ |
|
325 EInvalidMessageParameter=45, |
|
326 |
|
327 /** |
|
328 This panic can be raised as a result of a call to one of a large |
|
329 number of functions. In general, the panic indicates an attempt to perform an |
|
330 operation on a thread or process by code running in another process - violating |
|
331 the security principle of process isolation. |
|
332 |
|
333 There are exceptions to this general rule, for example, where the |
|
334 panic is raised because the calling process has insufficient capability. The |
|
335 precise reason is stated with the function(s). |
|
336 |
|
337 -# The panic is raised on a call to the following function if the |
|
338 process owning the thread performing the call is not the creator of the target |
|
339 process or, if a handle is specified, the handle is not local. |
|
340 - RProcess::SetParameter() |
|
341 . |
|
342 -# The panic is raised on a call to the following functions if the |
|
343 process owning the thread performing the call is not the same as the target |
|
344 process.\n |
|
345 - RProcess::Kill() |
|
346 - RProcess::Terminate() |
|
347 - RProcess::Panic() |
|
348 - RProcess::SetJustInTime() |
|
349 - RProcess::Resume() |
|
350 - RThread::Kill() |
|
351 - RThread::Terminate() |
|
352 - RThread::Panic() |
|
353 - RThread::Suspend() |
|
354 - RThread::Resume() |
|
355 - RThread::SetPriority() |
|
356 - RThread::RequestComplete() |
|
357 - RThread::RequestSignal() |
|
358 . |
|
359 NOTE: the creator of a new process can kill or panic the new |
|
360 process, change the new process priority and set the new process startup |
|
361 parameters until the process is resumed (which the creator can also do). After |
|
362 the new process has been resumed, then it becomes totally independent of its |
|
363 creator, and any attempt to panic it, kill it etc will raise the KERN-EXEC 46 |
|
364 panic. |
|
365 -# The panic is raised on call to the following (Symbian partner |
|
366 only) functions if the calling process does not have the PowerMgmt |
|
367 capability (TCapability::ECapabilityPowerMgmt): |
|
368 - Power::PowerDown() |
|
369 - Power::EnableWakeupEvents() |
|
370 - Power::DisableWakeupEvents() |
|
371 - Power::RequestWakeupEventNotification() |
|
372 - Power::CancelWakeupEventNotification() |
|
373 . |
|
374 -# The panic is raised on call to the following functions if the |
|
375 calling process does not have the WriteDeviceData capability |
|
376 (TCapability::ECapabilityWriteDeviceData): |
|
377 - User::SetMachineConfiguration() |
|
378 - User::SetHomeTime() |
|
379 - User::SetUTCTime() |
|
380 - User::SetUTCOffset() |
|
381 - User::SetUTCTimeAndOffset() |
|
382 . |
|
383 -# The panic is raised on call to the following function if the |
|
384 calling process does not have the ReadDeviceData capability |
|
385 (TCapability::ECapabilityReadDeviceData): |
|
386 - User::MachineConfiguration() |
|
387 . |
|
388 */ |
|
389 EPlatformSecurityTrap=46, |
|
390 |
|
391 /** |
|
392 This panic is raised when the user issues a request to be notified of |
|
393 messages or the availability of space, when a request has already been |
|
394 issued and is still outstanding. |
|
395 |
|
396 @see RMsgQueue |
|
397 */ |
|
398 EMsgQueueRequestPending=47, |
|
399 |
|
400 /** |
|
401 This panic is raised when creating a message queue and the size of |
|
402 the template parameter is invalid. |
|
403 |
|
404 @see RMsgQueue |
|
405 */ |
|
406 EMsgQueueInvalidLength=48, |
|
407 |
|
408 /** |
|
409 This panic is raised when creating a message queue and the specified number |
|
410 of slots is not positive. |
|
411 |
|
412 @see RMsgQueue |
|
413 */ |
|
414 EMsgQueueInvalidSlots=49, |
|
415 |
|
416 /** |
|
417 This panic is raised if an attempt is made to cancel an outstanding request |
|
418 to be notified of messages or the availability of space, and the cancel is |
|
419 being made by a thread in a different process. |
|
420 */ |
|
421 EMsgQueueIllegalCancel=50, |
|
422 |
|
423 /** |
|
424 This panic is raised by RProcess::Setparameter() |
|
425 if a slot value is invalid. |
|
426 */ |
|
427 EParameterSlotRange=51, |
|
428 |
|
429 /** |
|
430 This panic is raised by RProcess::Setparameter() |
|
431 if a slot is in use. |
|
432 */ |
|
433 EParameterSlotInUse=52, |
|
434 |
|
435 /** |
|
436 This panic is raised by RProcess::Setparameter() |
|
437 if the length of the data passed is negative. |
|
438 */ |
|
439 EParameterSlotDataLength=53, |
|
440 |
|
441 /** |
|
442 This panic is raised by RCondVar::Wait() when the current thread does |
|
443 not hold the specified mutex. |
|
444 */ |
|
445 ECondVarWaitMutexNotLocked=54, |
|
446 |
|
447 /** |
|
448 This panic is raised when a call is made to RThread::GetDesMaxLength(), |
|
449 which is obsolete. |
|
450 */ |
|
451 EObsoleteFunctionality=55, |
|
452 |
|
453 /** |
|
454 This panic is raised on a process which has not yet been resumed and whoes |
|
455 creator has died. |
|
456 */ |
|
457 EZombieProcessKilled=56, |
|
458 |
|
459 /** |
|
460 A connect message was sent to a session that has already been successfully |
|
461 connected to the server (cookie is non-NULL). |
|
462 */ |
|
463 ESessionAlreadyConnected=57, |
|
464 |
|
465 /** |
|
466 A session tried to set the kernel session cookie to a null value |
|
467 */ |
|
468 ESessionNullCookie=58, |
|
469 |
|
470 /** |
|
471 A session tried to set the kernel session cookie twice |
|
472 */ |
|
473 ESessionCookieAlreadySet=59, |
|
474 |
|
475 /** |
|
476 A session tried to set the kernel session cookie with a message |
|
477 that wasn't the connect message |
|
478 */ |
|
479 ESessionInvalidCookieMsg=60, |
|
480 |
|
481 /** |
|
482 A realtime thread executed a non-realtime function. |
|
483 */ |
|
484 EIllegalFunctionForRealtimeThread=61, |
|
485 |
|
486 /** |
|
487 This panic is raised by Kern::SetThreadRealtimeState when the state argument is invalid. |
|
488 */ |
|
489 EInvalidRealtimeState=62, |
|
490 |
|
491 /** |
|
492 A bad descriptor was passed to a server over IPC, causing an exception when the kernel tried to |
|
493 update its length field. |
|
494 */ |
|
495 EBadIpcDescriptor=63, |
|
496 |
|
497 /** |
|
498 An invalid notification type was passed to a shared buffers exec call handler. |
|
499 */ |
|
500 EShBufExecBadNotification=64, |
|
501 |
|
502 /** |
|
503 An invalid parameter was passed to a shared buffers exec call handler. |
|
504 */ |
|
505 EShBufExecBadParameter=65, |
|
506 }; |
|
507 |
|
508 #endif |