]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c
0526d22073f037f81ffc0bbaf244ae30f731a56a
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / DxeReportStatusCodeLib / ReportStatusCodeLib.c
1 /*++
2
3 Copyright (c) 2004 - 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 ReportStatusCodeLib.c
16
17 Abstract:
18
19 Report Status Code Library for DXE Phase.
20
21 --*/
22
23 #include "EdkIIGlueDxe.h"
24
25 //
26 // Global pointer to the Status Code Protocol
27 //
28 static EFI_STATUS_CODE_PROTOCOL *gStatusCode = NULL;
29
30
31 /**
32 Internal worker function that reports a status code through the Status Code Protocol
33
34 This function checks to see if a Status Code Protocol is present in the handle
35 database. If a Status Code Protocol is not present, then EFI_UNSUPPORTED is
36 returned. If a Status Code Protocol is present, then it is cached in gStatusCode,
37 and the ReportStatusCode() service of the Status Code Protocol is called passing in
38 Type, Value, Instance, CallerId, and Data. The result of this call is returned.
39
40 @param Type Status code type.
41 @param Value Status code value.
42 @param Instance Status code instance number.
43 @param CallerId Pointer to a GUID that identifies the caller of this
44 function. This is an optional parameter that may be
45 NULL.
46 @param Data Pointer to the extended data buffer. This is an
47 optional parameter that may be NULL.
48
49 @retval EFI_SUCCESS The status code was reported.
50 @retval EFI_OUT_OF_RESOURCES There were not enough resources to report the status code.
51 @retval EFI_UNSUPPORTED Status Code Protocol is not available.
52
53 **/
54 STATIC
55 EFI_STATUS
56 InternalReportStatusCode (
57 IN EFI_STATUS_CODE_TYPE Type,
58 IN EFI_STATUS_CODE_VALUE Value,
59 IN UINT32 Instance,
60 IN CONST EFI_GUID *CallerId OPTIONAL,
61 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
62 )
63 {
64 EFI_STATUS Status;
65
66 if (gRT == NULL) {
67 return EFI_UNSUPPORTED;
68 }
69
70 if (gRT->Hdr.Revision >= 0x00020000) {
71 //
72 // If gStatusCode is NULL, then see if a Status Code Protocol instance is present
73 // in the handle database.
74 //
75 if (gStatusCode == NULL) {
76 Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID **)&gStatusCode);
77 if (EFI_ERROR (Status) || gStatusCode == NULL) {
78 return EFI_UNSUPPORTED;
79 }
80 }
81
82 //
83 // A Status Code Protocol is present in the handle database, so pass in all the
84 // parameters to the ReportStatusCode() service of the Status Code Protocol
85 //
86 return (gStatusCode->ReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
87 } else {
88 return (gRT->ReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
89 }
90
91 }
92
93
94 /**
95 Computes and returns the size, in bytes, of a device path.
96
97 @param DevicePath A pointer to a device path.
98
99 @return The size, in bytes, of DevicePath.
100
101 **/
102 STATIC
103 UINTN
104 InternalReportStatusCodeDevicePathSize (
105 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
106 )
107 {
108 CONST EFI_DEVICE_PATH_PROTOCOL *Start;
109
110 //
111 // Search for the end of the device path structure
112 //
113 Start = DevicePath;
114 while (!EfiIsDevicePathEnd (DevicePath)) {
115 DevicePath = EfiNextDevicePathNode (DevicePath);
116 }
117
118 //
119 // Subtract the start node from the end node and add in the size of the end node
120 //
121 return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath);
122 }
123
124
125 /**
126 Converts a status code to an 8-bit POST code value.
127
128 Converts the status code specified by CodeType and Value to an 8-bit POST code
129 and returns the 8-bit POST code in PostCode. If CodeType is an
130 EFI_PROGRESS_CODE or CodeType is an EFI_ERROR_CODE, then bits 0..4 of PostCode
131 are set to bits 16..20 of Value, and bits 5..7 of PostCode are set to bits
132 24..26 of Value., and TRUE is returned. Otherwise, FALSE is returned.
133
134 If PostCode is NULL, then ASSERT().
135
136 @param CodeType The type of status code being converted.
137 @param Value The status code value being converted.
138 @param PostCode A pointer to the 8-bit POST code value to return.
139
140 @retval TRUE The status code specified by CodeType and Value was converted
141 to an 8-bit POST code and returned in PostCode.
142 @retval FALSE The status code specified by CodeType and Value could not be
143 converted to an 8-bit POST code value.
144
145 **/
146 BOOLEAN
147 EFIAPI
148 GlueCodeTypeToPostCode (
149 IN EFI_STATUS_CODE_TYPE CodeType,
150 IN EFI_STATUS_CODE_VALUE Value,
151 OUT UINT8 *PostCode
152 )
153 {
154 //
155 // If PostCode is NULL, then ASSERT()
156 //
157 ASSERT (PostCode != NULL);
158
159 //
160 // Convert Value to an 8 bit post code
161 //
162 if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||
163 ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ) {
164 *PostCode = (UINT8) ((((Value & EFI_STATUS_CODE_CLASS_MASK) >> 24) << 5) |
165 (((Value & EFI_STATUS_CODE_SUBCLASS_MASK) >> 16) & 0x1f));
166 return TRUE;
167 }
168 return FALSE;
169 }
170
171
172 /**
173 Extracts ASSERT() information from a status code structure.
174
175 Converts the status code specified by CodeType, Value, and Data to the ASSERT()
176 arguments specified by Filename, Description, and LineNumber. If CodeType is
177 an EFI_ERROR_CODE, and CodeType has a severity of EFI_ERROR_UNRECOVERED, and
178 Value has an operation mask of EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, extract
179 Filename, Description, and LineNumber from the optional data area of the
180 status code buffer specified by Data. The optional data area of Data contains
181 a Null-terminated ASCII string for the FileName, followed by a Null-terminated
182 ASCII string for the Description, followed by a 32-bit LineNumber. If the
183 ASSERT() information could be extracted from Data, then return TRUE.
184 Otherwise, FALSE is returned.
185
186 If Data is NULL, then ASSERT().
187 If Filename is NULL, then ASSERT().
188 If Description is NULL, then ASSERT().
189 If LineNumber is NULL, then ASSERT().
190
191 @param CodeType The type of status code being converted.
192 @param Value The status code value being converted.
193 @param Data Pointer to status code data buffer.
194 @param Filename Pointer to the source file name that generated the ASSERT().
195 @param Description Pointer to the description of the ASSERT().
196 @param LineNumber Pointer to source line number that generated the ASSERT().
197
198 @retval TRUE The status code specified by CodeType, Value, and Data was
199 converted ASSERT() arguments specified by Filename, Description,
200 and LineNumber.
201 @retval FALSE The status code specified by CodeType, Value, and Data could
202 not be converted to ASSERT() arguments.
203
204 **/
205 BOOLEAN
206 EFIAPI
207 GlueReportStatusCodeExtractAssertInfo (
208 IN EFI_STATUS_CODE_TYPE CodeType,
209 IN EFI_STATUS_CODE_VALUE Value,
210 IN CONST EFI_STATUS_CODE_DATA *Data,
211 OUT CHAR8 **Filename,
212 OUT CHAR8 **Description,
213 OUT UINT32 *LineNumber
214 )
215 {
216 EFI_DEBUG_ASSERT_DATA *AssertData;
217
218 ASSERT (Data != NULL);
219 ASSERT (Filename != NULL);
220 ASSERT (Description != NULL);
221 ASSERT (LineNumber != NULL);
222
223 if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) &&
224 ((CodeType & EFI_STATUS_CODE_SEVERITY_MASK) == EFI_ERROR_UNRECOVERED) &&
225 ((Value & EFI_STATUS_CODE_OPERATION_MASK) == EFI_SW_EC_ILLEGAL_SOFTWARE_STATE)) {
226 AssertData = (EFI_DEBUG_ASSERT_DATA *)(Data + 1);
227 *Filename = (CHAR8 *)(AssertData + 1);
228 *Description = *Filename + AsciiStrLen (*Filename) + 1;
229 *LineNumber = AssertData->LineNumber;
230 return TRUE;
231 }
232 return FALSE;
233 }
234
235
236 /**
237 Extracts DEBUG() information from a status code structure.
238
239 Converts the status code specified by Data to the DEBUG() arguments specified
240 by ErrorLevel, Marker, and Format. If type GUID in Data is
241 EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID, then extract ErrorLevel, Marker, and
242 Format from the optional data area of the status code buffer specified by Data.
243 The optional data area of Data contains a 32-bit ErrorLevel followed by Marker
244 which is 12 UINTN parameters, followed by a Null-terminated ASCII string for
245 the Format. If the DEBUG() information could be extracted from Data, then
246 return TRUE. Otherwise, FALSE is returned.
247
248 If Data is NULL, then ASSERT().
249 If ErrorLevel is NULL, then ASSERT().
250 If Marker is NULL, then ASSERT().
251 If Format is NULL, then ASSERT().
252
253 @param Data Pointer to status code data buffer.
254 @param ErrorLevel Pointer to error level mask for a debug message.
255 @param Marker Pointer to the variable argument list associated with Format.
256 @param Format Pointer to a Null-terminated ASCII format string of a
257 debug message.
258
259 @retval TRUE The status code specified by Data was converted DEBUG() arguments
260 specified by ErrorLevel, Marker, and Format.
261 @retval FALSE The status code specified by Data could not be converted to
262 DEBUG() arguments.
263
264 **/
265 BOOLEAN
266 EFIAPI
267 GlueReportStatusCodeExtractDebugInfo (
268 IN CONST EFI_STATUS_CODE_DATA *Data,
269 OUT UINT32 *ErrorLevel,
270 OUT VA_LIST *Marker,
271 OUT CHAR8 **Format
272 )
273 {
274 EFI_DEBUG_INFO *DebugInfo;
275
276 ASSERT (Data != NULL);
277 ASSERT (ErrorLevel != NULL);
278 ASSERT (Marker != NULL);
279 ASSERT (Format != NULL);
280
281 //
282 // If the GUID type is not EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID then return FALSE
283 //
284 if (!CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeDebugGuid)) {
285 return FALSE;
286 }
287
288 //
289 // Retrieve the debug information from the status code record
290 //
291 DebugInfo = (EFI_DEBUG_INFO *)(Data + 1);
292
293 *ErrorLevel = DebugInfo->ErrorLevel;
294
295 //
296 // The first 12 * UINTN bytes of the string are really an
297 // argument stack to support varargs on the Format string.
298 //
299 *Marker = (VA_LIST) (DebugInfo + 1);
300 *Format = (CHAR8 *)(((UINT64 *)*Marker) + 12);
301
302 return TRUE;
303 }
304
305
306 /**
307 Reports a status code.
308
309 Reports the status code specified by the parameters Type and Value. Status
310 code also require an instance, caller ID, and extended data. This function
311 passed in a zero instance, NULL extended data, and a caller ID of
312 gEfiCallerIdGuid, which is the GUID for the module.
313
314 ReportStatusCode()must actively prevent recusrsion. If ReportStatusCode()
315 is called while processing another any other Report Status Code Library function,
316 then ReportStatusCode() must return immediately.
317
318 @param Type Status code type.
319 @param Value Status code value.
320
321 @retval EFI_SUCCESS The status code was reported.
322 @retval EFI_DEVICE_ERROR There status code could not be reported due to a
323 device error.
324 @retval EFI_UNSUPPORTED Report status code is not supported
325
326 **/
327 EFI_STATUS
328 EFIAPI
329 GlueReportStatusCode (
330 IN EFI_STATUS_CODE_TYPE Type,
331 IN EFI_STATUS_CODE_VALUE Value
332 )
333 {
334 return InternalReportStatusCode (Type, Value, 0, &gEfiCallerIdGuid, NULL);
335 }
336
337
338 /**
339 Reports a status code with a Device Path Protocol as the extended data.
340
341 Allocates and fills in the extended data section of a status code with the
342 Device Path Protocol specified by DevicePath. This function is responsible
343 for allocating a buffer large enough for the standard header and the device
344 path. The standard header is filled in with a GUID of
345 gEfiStatusCodeSpecificDataGuid. The status code is reported with a zero
346 instance and a caller ID of gEfiCallerIdGuid.
347
348 ReportStatusCodeWithDevicePath()must actively prevent recursion. If
349 ReportStatusCodeWithDevicePath() is called while processing another any other
350 Report Status Code Library function, then ReportStatusCodeWithDevicePath()
351 must return EFI_DEVICE_ERROR immediately.
352
353 If DevicePath is NULL, then ASSERT().
354
355 @param Type Status code type.
356 @param Value Status code value.
357 @param DevicePath Pointer to the Device Path Protocol to be reported.
358
359 @retval EFI_SUCCESS The status code was reported with the extended
360 data specified by DevicePath.
361 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the
362 extended data section.
363 @retval EFI_UNSUPPORTED Report status code is not supported
364
365 **/
366 EFI_STATUS
367 EFIAPI
368 GlueReportStatusCodeWithDevicePath (
369 IN EFI_STATUS_CODE_TYPE Type,
370 IN EFI_STATUS_CODE_VALUE Value,
371 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
372 )
373 {
374 ASSERT (DevicePath != NULL);
375 return ReportStatusCodeWithExtendedData (
376 Type,
377 Value,
378 (VOID *)DevicePath,
379 InternalReportStatusCodeDevicePathSize (DevicePath)
380 );
381 }
382
383
384 /**
385 Reports a status code with an extended data buffer.
386
387 Allocates and fills in the extended data section of a status code with the
388 extended data specified by ExtendedData and ExtendedDataSize. ExtendedData
389 is assumed to be one of the data structures specified in Related Definitions.
390 These data structure do not have the standard header, so this function is
391 responsible for allocating a buffer large enough for the standard header and
392 the extended data passed into this function. The standard header is filled
393 in with a GUID of gEfiStatusCodeSpecificDataGuid. The status code is reported
394 with a zero instance and a caller ID of gEfiCallerIdGuid.
395
396 ReportStatusCodeWithExtendedData()must actively prevent recursion. If
397 ReportStatusCodeWithExtendedData() is called while processing another any other
398 Report Status Code Library function, then ReportStatusCodeWithExtendedData()
399 must return EFI_DEVICE_ERROR immediately.
400
401 If ExtendedData is NULL, then ASSERT().
402 If ExtendedDataSize is 0, then ASSERT().
403
404 @param Type Status code type.
405 @param Value Status code value.
406 @param ExtendedData Pointer to the extended data buffer to be reported.
407 @param ExtendedDataSize The size, in bytes, of the extended data buffer to
408 be reported.
409
410 @retval EFI_SUCCESS The status code was reported with the extended
411 data specified by ExtendedData and ExtendedDataSize.
412 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the
413 extended data section.
414 @retval EFI_UNSUPPORTED Report status code is not supported
415
416 **/
417 EFI_STATUS
418 EFIAPI
419 GlueReportStatusCodeWithExtendedData (
420 IN EFI_STATUS_CODE_TYPE Type,
421 IN EFI_STATUS_CODE_VALUE Value,
422 IN CONST VOID *ExtendedData,
423 IN UINTN ExtendedDataSize
424 )
425 {
426 ASSERT (ExtendedData != NULL);
427 ASSERT (ExtendedDataSize != 0);
428 return ReportStatusCodeEx (
429 Type,
430 Value,
431 0,
432 NULL,
433 NULL,
434 ExtendedData,
435 ExtendedDataSize
436 );
437 }
438
439
440 /**
441 Reports a status code with full parameters.
442
443 The function reports a status code. If ExtendedData is NULL and ExtendedDataSize
444 is 0, then an extended data buffer is not reported. If ExtendedData is not
445 NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.
446 ExtendedData is assumed not have the standard status code header, so this function
447 is responsible for allocating a buffer large enough for the standard header and
448 the extended data passed into this function. The standard header is filled in
449 with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a
450 GUID of gEfiStatusCodeSpecificDatauid is used. The status code is reported with
451 an instance specified by Instance and a caller ID specified by CallerId. If
452 CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.
453
454 ReportStatusCodeEx()must actively prevent recursion. If ReportStatusCodeEx()
455 is called while processing another any other Report Status Code Library function,
456 then ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.
457
458 If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().
459 If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().
460
461 @param Type Status code type.
462 @param Value Status code value.
463 @param Instance Status code instance number.
464 @param CallerId Pointer to a GUID that identifies the caller of this
465 function. If this parameter is NULL, then a caller
466 ID of gEfiCallerIdGuid is used.
467 @param ExtendedDataGuid Pointer to the GUID for the extended data buffer.
468 If this parameter is NULL, then a the status code
469 standard header is filled in with
470 gEfiStatusCodeSpecificDataGuid.
471 @param ExtendedData Pointer to the extended data buffer. This is an
472 optional parameter that may be NULL.
473 @param ExtendedDataSize The size, in bytes, of the extended data buffer.
474
475 @retval EFI_SUCCESS The status code was reported.
476 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate
477 the extended data section if it was specified.
478 @retval EFI_UNSUPPORTED Report status code is not supported
479
480 **/
481 EFI_STATUS
482 EFIAPI
483 GlueReportStatusCodeEx (
484 IN EFI_STATUS_CODE_TYPE Type,
485 IN EFI_STATUS_CODE_VALUE Value,
486 IN UINT32 Instance,
487 IN CONST EFI_GUID *CallerId OPTIONAL,
488 IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,
489 IN CONST VOID *ExtendedData OPTIONAL,
490 IN UINTN ExtendedDataSize
491 )
492 {
493 EFI_STATUS Status;
494 EFI_STATUS_CODE_DATA *StatusCodeData;
495
496 ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));
497 ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
498
499 //
500 // Allocate space for the Status Code Header and its buffer
501 //
502 StatusCodeData = NULL;
503 (gBS->AllocatePool) (EfiBootServicesData, sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize, (VOID **)&StatusCodeData);
504 if (StatusCodeData == NULL) {
505 return EFI_OUT_OF_RESOURCES;
506 }
507
508 //
509 // Fill in the extended data header
510 //
511 StatusCodeData->HeaderSize = sizeof (EFI_STATUS_CODE_DATA);
512 StatusCodeData->Size = (UINT16)ExtendedDataSize;
513 if (ExtendedDataGuid == NULL) {
514 ExtendedDataGuid = &gEfiStatusCodeSpecificDataGuid;
515 }
516 CopyGuid (&StatusCodeData->Type, ExtendedDataGuid);
517
518 //
519 // Fill in the extended data buffer
520 //
521 CopyMem (StatusCodeData + 1, ExtendedData, ExtendedDataSize);
522
523 //
524 // Report the status code
525 //
526 if (CallerId == NULL) {
527 CallerId = &gEfiCallerIdGuid;
528 }
529 Status = InternalReportStatusCode (Type, Value, Instance, CallerId, StatusCodeData);
530
531 //
532 // Free the allocated buffer
533 //
534 (gBS->FreePool) (StatusCodeData);
535
536 return Status;
537 }
538
539
540 /**
541 Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled
542
543 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED
544 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.
545
546 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of
547 PcdReportStatusCodeProperyMask is set.
548 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of
549 PcdReportStatusCodeProperyMask is clear.
550
551 **/
552 BOOLEAN
553 EFIAPI
554 GlueReportProgressCodeEnabled (
555 VOID
556 )
557 {
558 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED) != 0);
559 }
560
561
562 /**
563 Returns TRUE if status codes of type EFI_ERROR_CODE are enabled
564
565 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED
566 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.
567
568 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of
569 PcdReportStatusCodeProperyMask is set.
570 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of
571 PcdReportStatusCodeProperyMask is clear.
572
573 **/
574 BOOLEAN
575 EFIAPI
576 GlueReportErrorCodeEnabled (
577 VOID
578 )
579 {
580 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED) != 0);
581 }
582
583
584 /**
585 Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled
586
587 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED
588 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.
589
590 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of
591 PcdReportStatusCodeProperyMask is set.
592 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of
593 PcdReportStatusCodeProperyMask is clear.
594
595 **/
596 BOOLEAN
597 EFIAPI
598 GlueReportDebugCodeEnabled (
599 VOID
600 )
601 {
602 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED) != 0);
603 }