summaryrefslogtreecommitdiff
path: root/tests/aslts/src/runtime/cntl/ehandle.asl
blob: 08449d0be50389340ee9f6cdf260ba02c611532c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
/*
 * Some or all of this work - Copyright (c) 2006 - 2013, Intel Corp.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 * Neither the name of Intel Corporation nor the names of its contributors
 * may be used to endorse or promote products derived from this software
 * without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

External (_ERR, MethodObj)

/*
 * Exceptional conditions support
 */

Name(z063, 63)

// The current number of exceptions handled
Name(EXC0, 0x0)

// The total number of exceptions handled
Name(EXC1, 0x0)

// Opcode of the last exception
Name(EX00, 0x0)

// Name of the last exception
Name(EX01, "")

// Opcode of the first exception
Name(EX04, 0x0)

// Name of the first exception
Name(EX05, "")


/*
 * Undefined opcodes of exception
 */
Name(EX0D, 0xfd)
Name(EX0E, 0xfe)

// Undefined opcode of exception means 'any exceptions'
Name(EX0F, 0xff)

// Description of all exceptional conditions
Name(pf00, Package() {
	//          ix opcodes      names
	Package() { 0, 0x00000000, "AE_OK"},
	Package() { 1, 0x00000001, "AE_ERROR"},
	Package() { 2, 0x00000002, "AE_NO_ACPI_TABLES"},
	Package() { 3, 0x00000003, "AE_NO_NAMESPACE"},
	Package() { 4, 0x00000004, "AE_NO_MEMORY"},
	Package() { 5, 0x00000005, "AE_NOT_FOUND"},
	Package() { 6, 0x00000006, "AE_NOT_EXIST"},
	Package() { 7, 0x00000007, "AE_ALREADY_EXISTS"},
	Package() { 8, 0x00000008, "AE_TYPE"},
	Package() { 9, 0x00000009, "AE_NULL_OBJECT"},
	Package() {10, 0x0000000a, "AE_NULL_ENTRY"},
	Package() {11, 0x0000000b, "AE_BUFFER_OVERFLOW"},
	Package() {12, 0x0000000c, "AE_STACK_OVERFLOW"},
	Package() {13, 0x0000000d, "AE_STACK_UNDERFLOW"},
	Package() {14, 0x0000000e, "AE_NOT_IMPLEMENTED"},
	Package() {15, 0x0000000f, "AE_VERSION_MISMATCH"}, /* obsolete */
	Package() {16, 0x0000000f, "AE_SUPPORT"},
	Package() {17, 0x00000011, "AE_SHARE"}, /* obsolete */
	Package() {18, 0x00000010, "AE_LIMIT"},
	Package() {19, 0x00000011, "AE_TIME"},
	Package() {20, 0x00000014, "AE_UNKNOWN_STATUS"}, /* obsolete */
	Package() {21, 0x00000012, "AE_ACQUIRE_DEADLOCK"},
	Package() {22, 0x00000013, "AE_RELEASE_DEADLOCK"},
	Package() {23, 0x00000014, "AE_NOT_ACQUIRED"},
	Package() {24, 0x00000015, "AE_ALREADY_ACQUIRED"},
	Package() {25, 0x00000016, "AE_NO_HARDWARE_RESPONSE"},
	Package() {26, 0x00000017, "AE_NO_GLOBAL_LOCK"},
	Package() {27, 0x00000018, "AE_ABORT_METHOD"},
	Package() {28, 0x00001001, "AE_BAD_PARAMETER"},
	Package() {29, 0x00001002, "AE_BAD_CHARACTER"},
	Package() {30, 0x00001003, "AE_BAD_PATHNAME"},
	Package() {31, 0x00001004, "AE_BAD_DATA"},
	Package() {32, 0x00001005, "AE_BAD_ADDRESS"}, /* obsolete */
	Package() {33, 0x00001006, "AE_ALIGNMENT"}, /* obsolete */
	Package() {34, 0x00001005, "AE_BAD_HEX_CONSTANT"},
	Package() {35, 0x00001006, "AE_BAD_OCTAL_CONSTANT"},
	Package() {36, 0x00001007, "AE_BAD_DECIMAL_CONSTANT"},
	Package() {37, 0x00002001, "AE_BAD_SIGNATURE"},
	Package() {38, 0x00002002, "AE_BAD_HEADER"},
	Package() {39, 0x00002003, "AE_BAD_CHECKSUM"},
	Package() {40, 0x00002004, "AE_BAD_VALUE"},
	Package() {41, 0x00002005, "AE_TABLE_NOT_SUPPORTED"}, /* obsolete */
	Package() {42, 0x00002005, "AE_INVALID_TABLE_LENGTH"},
	Package() {43, 0x00003001, "AE_AML_ERROR"}, /* obsolete */
	Package() {44, 0x00003002, "AE_AML_PARSE"}, /* obsolete */
	Package() {45, 0x00003001, "AE_AML_BAD_OPCODE"},
	Package() {46, 0x00003002, "AE_AML_NO_OPERAND"},
	Package() {47, 0x00003003, "AE_AML_OPERAND_TYPE"},
	Package() {48, 0x00003004, "AE_AML_OPERAND_VALUE"},
	Package() {49, 0x00003005, "AE_AML_UNINITIALIZED_LOCAL"},
	Package() {50, 0x00003006, "AE_AML_UNINITIALIZED_ARG"},
	Package() {51, 0x00003007, "AE_AML_UNINITIALIZED_ELEMENT"},
	Package() {52, 0x00003008, "AE_AML_NUMERIC_OVERFLOW"},
	Package() {53, 0x00003009, "AE_AML_REGION_LIMIT"},
	Package() {54, 0x0000300a, "AE_AML_BUFFER_LIMIT"},
	Package() {55, 0x0000300b, "AE_AML_PACKAGE_LIMIT"},
	Package() {56, 0x0000300c, "AE_AML_DIVIDE_BY_ZERO"},
	Package() {57, 0x0000300d, "AE_AML_BAD_NAME"},
	Package() {58, 0x0000300e, "AE_AML_NAME_NOT_FOUND"},
	Package() {59, 0x0000300f, "AE_AML_INTERNAL"},
	Package() {60, 0x00003010, "AE_AML_INVALID_SPACE_ID"},
	Package() {61, 0x00003011, "AE_AML_STRING_LIMIT"},
	Package() {62, 0x00003012, "AE_AML_NO_RETURN_VALUE"},
	Package() {63, 0x00003014, "AE_AML_NOT_OWNER"},
	Package() {64, 0x00003015, "AE_AML_MUTEX_ORDER"},
	Package() {65, 0x00003016, "AE_AML_MUTEX_NOT_ACQUIRED"},
	Package() {66, 0x00003017, "AE_AML_INVALID_RESOURCE_TYPE"},
	Package() {67, 0x00003018, "AE_AML_INVALID_INDEX"},
	Package() {68, 0x00003019, "AE_AML_REGISTER_LIMIT"},
	Package() {69, 0x0000301a, "AE_AML_NO_WHILE"},
	Package() {70, 0x0000301b, "AE_AML_ALIGNMENT"},
	Package() {71, 0x0000301c, "AE_AML_NO_RESOURCE_END_TAG"},
	Package() {72, 0x0000301d, "AE_AML_BAD_RESOURCE_VALUE"},
	Package() {73, 0x0000301e, "AE_AML_CIRCULAR_REFERENCE"},
	Package() {74, 0x00004001, "AE_CTRL_RETURN_VALUE"},
	Package() {75, 0x00004002, "AE_CTRL_PENDING"},
	Package() {76, 0x00004003, "AE_CTRL_TERMINATE"},
	Package() {77, 0x00004004, "AE_CTRL_TRUE"},
	Package() {78, 0x00004005, "AE_CTRL_FALSE"},
	Package() {79, 0x00004006, "AE_CTRL_DEPTH"},
	Package() {80, 0x00004007, "AE_CTRL_END"},
	Package() {81, 0x00004008, "AE_CTRL_TRANSFER"},
	Package() {82, 0x00004009, "AE_CTRL_BREAK"},
	Package() {83, 0x0000400a, "AE_CTRL_CONTINUE"},

	/* New additional are here not to touch previous indexes */

	Package() {84, 0x00003013, "AE_AML_METHOD_LIMIT"},
	Package() {85, 0x0000100B, "AE_INDEX_TO_NOT_ATTACHED"},
	Package() {86, 0x0000001B, "AE_OWNER_ID_LIMIT"}}
)

/*
 * (multi-threading)
 *
 * Packages to store per-thread information about exceptions
 * (used in mt-mode)
 *
 * EXC2 - maximal number of exception can be registered
 * EX02 - package to store ID of thread where exception occurs
 * EX03 - package to store opcode of exception
 */
Name(EXC2, 200)
Name(EX02, Package(EXC2) {})
Name(EX03, Package(EXC2) {})

/*
 * Exceptional conditions handler
 *
 * arg0 - AcpiStatus
 * arg1 - AsciiExceptionString
 * arg2 - ID of current thread
 */
Method(_ERR, 3)
{
	Store(arg0, EX00)
	Store(arg1, EX01)

	if (LEqual(EX04, 0)) {
		Store(arg0, EX04)
		Store(arg1, EX05)
	}

	/* multi-threading */
	if (MTHR) {
		/* If the current number of exceptions handled doesn't exceed EXC2 */
		if (LLess(EXC0, EXC2)) {
			Store(arg2, Index(EX02, EXC0))
			Store(arg0, Index(EX03, EXC0))
		} else {
			Store("Maximal number of exceptions exceeded", Debug)
			err("_ERR", z063, 0, 0, 0, EXC0, EXC2)
		}
	}

	Increment(EXC0)
	Increment(EXC1)

//	Store("Run-time exception:", Debug)
//	Store(arg0, Debug)
//	Store(arg1, Debug)
//	Store(arg2, Debug)

	Return (0) // Map error to AE_OK
}

// Check that exceptions has not arisen at all
Method(CH02)
{
	if (EXC1) {
		Concatenate("Some unexpected exceptions were handled, 0x", EXC1, Local0)
		err("CH02", z063, 1, 0, 0, Local0, 0)
	}
	Return(EXC1)
}

/*
 * Check that the counter of current exceptions is zero. Set it to zero.
 * arg0 - diagnostic message
 * arg1 - absolute index of file initiating the checking
 * arg2 - index of checking
 * arg3 - arg5 of err, "received value"
 * arg4 - arg6 of err, "expected value"
 */
Method(CH03, 5)
{
	Store(0, Local7)

	if (EXC0) {
		Concatenate("Unexpected exceptions (count ", EXC0, Local0)
		Concatenate(Local0, "), the last is ", Local1)
		Concatenate(Local1, EX01, Local0)
		Concatenate(Local0, ", ", Local1)
		Concatenate(Local1, EX00, Debug)
		err(arg0, z063, 2, arg1, arg2, arg3, arg4)
		Store(EXC0, Local7)
	}
	Store(0, EXC0)
	Store(0, EX04)

	return (Local7)
}

//
// Convert 32/64 bit integer to 16-bit Hex value
//
Method(ST16, 1, Serialized)
{
    Name (EBUF, Buffer(ISZC){}) /* 8 or 16 bytes, depending on 32/64 mode */
    Name (RBUF, Buffer(4){})

    Store (ToHexString (Arg0), EBUF)
    Mid (EBUF, Subtract(ISZC, 4), 4, RBUF)
    Return (Concatenate ("0x", ToString (RBUF)))
}

/*
 * Check that exceptions are handled as expected, report errors
 * (if any) and set the current number of exceptions to zero.
 *
 * Verified:
 * - exception has arisen
 * - check the number of exceptions
 * - the last arisen exception matches one described by arguments
 *
 * arg0 - diagnostic message
 * arg1 -
 *   zero means:
 *        - check that only one exception has arisen (curent number is equal to 1)
 *        - check that opcode is equal to that specified by arg2
 *   non-zero means:
 *        - check that the number of exception arisen is not less than 1
 *          (curent number is equal to 1 or greater)
 *     1:   check that the first opcode is equal to that specified by arg2
 *     2:   check that the last opcode is equal to that specified by arg2
 *
 * arg2 - index of exception info in pf00 Package
 * arg3 - absolute index of file initiating the checking
 * arg4 - index of checking
 * arg5 - arg5 of err, "received value"
 * arg6 - arg6 of err, "expected value"
 */
Method(CH04, 7)
{
	Store(0, Local5)

	if (LEqual(arg2, 0xff)) {

	if (LEqual(EXC0, 0)) {
		Store(1, Local5)
		Store("ERROR: No ANY exception has arisen.", Debug)
	}

	} else {

	// Determine opcode and name of the expected exception

	Store(DeRefOf(Index (pf00, arg2)), Local2) // exception info
	Store(DeRefOf(Index (Local2, 1)), Local3)  // opcode
	Store(DeRefOf(Index (Local2, 2)), Local4)  // name

	if (LEqual(EXC0, 0)) {
		Store (1, Local5)
		Concatenate("No exception - expected: ", Local4, Local0)
		Concatenate(Local0, "-", Local0)
		Concatenate(Local0, ST16(Local3), Local0)
		Store(Local0, Debug)
	} else {
		if (LAnd(LNot(arg1), LGreater(EXC0, 1))) {
			Store(1, Local5)
			Concatenate("More than one exception: 0x", EXC0, Local0)
			Store(Local0, Debug)
		} else {
			if (LEqual(arg1, 1)) {
				/* Opcode of the first exception */
				Store(EX04, Local6)
				Store(EX05, Local7)
			} else {
				/* Opcode of the last exception */
				Store(EX00, Local6)
				Store(EX01, Local7)
			}

			if (LNotEqual(Local3, Local6)) {
				Store(1, Local5)
				Concatenate("Exception: ", Local7, Local0)

				Concatenate(Local0, "-", Local0)
				Concatenate(Local0, ST16(Local6), Local0)

				Concatenate(" differs from expected: ", Local4, Local1)
				Concatenate(Local0, Local1, Local0)

				Concatenate(Local0, "-", Local0)
				Concatenate(Local0, ST16(Local3), Local0)
				Store(Local0, Debug)
			}
			if (LNotEqual(Local4, Local7)) {
				Store(1, Local5)
				Store("Unexpected exception:", Debug)
				Store(Concatenate("Expected: ", Local4), Debug)
				Store(Concatenate("Received: ", Local7), Debug)
			}
		}
	}

	} /* if(LNotEqual(arg2,0xff)) */

	Store(0, EXC0)
	Store(0, EX04)

	if (Local5) {
		err(arg0, z063, 3, arg3, arg4, arg5, arg6)
	}

	return (Local5)
}

Method(CH05)
{
	return (CH03("CH05", 0, 0, 0, 0))
}

Method(CH06, 3)
{
	if (EXCV) {
		return (CH04(arg0, 0, arg2, 0, arg1, 0, 0))
	} else {
		// Just only presence of ANY exception(s)
		return (CH04(arg0, 0, 0xff, 0, arg1, 0, 0))
	}
}

/*
 * Check for any exception when the slack mode is initiated
 */
Method(CH07, 7)
{
	if (SLCK) {
		CH03(arg0, arg3, arg4, arg5, arg6)
	} else {
		CH04(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
	}
}


/* MULTI-THREADING */

/*
 * Report message of thread
 * (adds ID of thread and reports the message)
 *
 * arg0 - ID of current thread
 * arg1 - string
 */
Method(MSG0, 2)
{
	Concatenate("THREAD ID ", arg0, Local0)
	Concatenate(Local0, ": ", Local1)
	Concatenate(Local1, arg1, Local0)
	Store(Local0, Debug)
}

/*
 * Used in multi-threading mode
 *
 * Return the first encountered exception corresponding to this Thread ID
 * and the total number of exceptions corresponding to this Thread ID.
 * Reset all the entries corresponding to the thread identified by arg0.
 *
 * Note: this method is used in mt-mode (by several threads simultaneously)
 *       but each of threads changes only its elements of EX02.
 *
 * arg0 - ID of current thread
 */
Method(MTEX, 1)
{
	Store(Package(2) {0,0}, Local2) // Package to be returned
	Store(0, Local3) // found

	Store(EXC0, Local4) // lpN0
	Store(0, Local5)    // lpC0
	While (Local4) {

		Store(DeRefOf(Index(EX02, Local5)), Local0)

		/* Matching ID of current thread */
		if (LEqual(Local0, arg0)) {
			Store(DeRefOf(Index(EX03, Local5)), Local1)
			if (LEqual(Local3, 0)) {
				/* Opcode of the first exception */
				Store(Local1, Index(Local2, 0))
			}
			Increment(Local3)

			/* Reset information about this exception */
			Store(0, Index(EX02, Local5))
		}

		Decrement(Local4)
		Increment(Local5)
	}
	Store(Local3, Index(Local2, 1))

	return (Local2)
}

/*
 * The same as CH03, but to be used in multi-threading mode
 *
 * arg0 - diagnostic message
 * arg1 - ID of current thread
 * arg2 - absolute index of file initiating the checking
 * arg3 - index of checking
 * arg4 - arg5 of err, "received value"
 * arg5 - arg6 of err, "expected value"
 *
 * Return: current number of exceptions occur on this thread
 */
Method(CH08, 6)
{
	Store(MTEX(arg1), Local2)
	Store(DeRefOf(Index(Local2, 0)), Local3) // opcode of the first exception
	Store(DeRefOf(Index(Local2, 1)), Local4) // number of exceptions

	Store(0, Local7)

	if (Local4) {
		Concatenate("Unexpected exception 0x", Local3, Local0)
		Concatenate(Local0, ", number of exceptions 0x", Local1)
		Concatenate(Local1, Local4, Local0)
		MSG0(arg1, Local0)
		err(arg0, z063, 4, arg2, arg3, arg4, arg5)
		Store(1, Local7)
	}

	/*
	 * Reset of EXC0 should be done by Control thread
	 * Store(0, EXC0)
	 */

	return (Local4)
}

/*
 * The same as CH04, but to be used in multi-threading mode
 *
 * arg0 - non-zero means to treat "More than one exceptions" as error
 * arg1 - ID of current thread
 * arg2 - index of exception info in pf00 Package
 * arg3 - absolute index of file initiating the checking
 * arg4 - index of checking
 * arg5 - RefOf to Integer to return 'current number of exceptions occur on this thread'
 *
 * Return: non-zero when errors detected
 */
Method(CH09, 6)
{
	Store(MTEX(arg1), Local7)
	Store(DeRefOf(Index(Local7, 0)), Local6) // opcode of the first exception
	Store(DeRefOf(Index(Local7, 1)), Local7) // number of exceptions

	Store(0, Local5)

	if (LEqual(arg2, 0xff)) {
		if (LEqual(Local7, 0)) {
			/* No exceptions */
			Store(1, Local5)
			MSG0(arg1, "ERROR: No ANY exception has arisen.")
		}
	} else {

	// Determine opcode and name of the expected exception

	Store(DeRefOf(Index (pf00, arg2)), Local2) // exception info
	Store(DeRefOf(Index (Local2, 1)), Local3)  // opcode
	Store(DeRefOf(Index (Local2, 2)), Local4)  // name

	if (LEqual(Local7, 0)) {
		/* No exceptions */
		Store (1, Local5)
		Concatenate("No exception has arisen, expected: ", Local4, Local0)
		Concatenate(", opcode 0x", Local3, Local1)
		Concatenate(Local0, Local1, Local0)
		MSG0(arg1, Local0)
	} else {
		if (LAnd(arg0, LGreater(Local7, 1))) {
			Store(1, Local5)
			Concatenate("More than one exception has arisen: 0x", Local7, Local0)
			MSG0(arg1, Local0)
		} else {

			/* Opcode of the first exception */

			if (LNotEqual(Local3, Local6)) {
				Store(1, Local5)
				Concatenate("The exception 0x", Local6, Local0)
				Concatenate(Local0, " differs from expected ", Local1)
				Concatenate(Local1, ST16 (Local3), Local0)
				MSG0(arg1, Local0)
			}
		}
	}

	} /* if(LNotEqual(arg2,0xff)) */

	/*
	 * Reset of EXC0 should be done by Control thread
	 * Store(0, EXC0)
	 */

	if (Local5) {
		err("", z063, 5, arg3, arg4, 0, 0)
	}

	Store(Local7, arg5)

	return (Local5)
}

/*
 * Reset EXC0 (the current number of exceptions handled)
 *
 * It should be invoked by the Control thread.
 */
Method(CH0A)
{
	Store(0, EXC0)
}