]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Pei/Ppi/Ppi.c
Patch from open source community for CryptoPkg to allow it to build for ARM using...
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Ppi / Ppi.c
1 /** @file
2 EFI PEI Core PPI services
3
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include "PeiMain.h"
16
17 /**
18
19 Initialize PPI services.
20
21 @param PrivateData Pointer to the PEI Core data.
22 @param OldCoreData Pointer to old PEI Core data.
23 NULL if being run in non-permament memory mode.
24
25 **/
26 VOID
27 InitializePpiServices (
28 IN PEI_CORE_INSTANCE *PrivateData,
29 IN PEI_CORE_INSTANCE *OldCoreData
30 )
31 {
32 if (OldCoreData == NULL) {
33 PrivateData->PpiData.NotifyListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
34 PrivateData->PpiData.DispatchListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
35 PrivateData->PpiData.LastDispatchedNotify = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
36 }
37 }
38
39 /**
40
41 Migrate the Hob list from the temporary memory stack to PEI installed memory.
42
43 @param PrivateData Pointer to PeiCore's private data structure.
44 @param OldCheckingBottom Bottom of temporary memory range. All Ppi in this range
45 will be fixup for PpiData and PpiDescriptor pointer.
46 @param OldCheckingTop Top of temporary memory range. All Ppi in this range
47 will be fixup for PpiData and PpiDescriptor.
48 @param Fixup The address difference between
49 the new Hob list and old Hob list.
50 @param FixupPositive TRUE if new Hob list is above the old Hob list.
51 Otherwise FALSE.
52
53 **/
54 VOID
55 ConvertPpiPointers (
56 IN PEI_CORE_INSTANCE *PrivateData,
57 IN UINTN OldCheckingBottom,
58 IN UINTN OldCheckingTop,
59 IN UINTN Fixup,
60 IN BOOLEAN FixupPositive
61 )
62 {
63 UINT8 Index;
64 PEI_PPI_LIST_POINTERS *PpiPointer;
65
66 for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
67 if (Index < PrivateData->PpiData.PpiListEnd ||
68 Index > PrivateData->PpiData.NotifyListEnd) {
69 PpiPointer = &PrivateData->PpiData.PpiListPtrs[Index];
70
71 if (((UINTN)PpiPointer->Raw < OldCheckingTop) &&
72 ((UINTN)PpiPointer->Raw >= OldCheckingBottom)) {
73 //
74 // Convert the pointer to the PEIM descriptor from the old HOB heap
75 // to the relocated HOB heap.
76 //
77 if (FixupPositive) {
78 PpiPointer->Raw = (VOID *) ((UINTN)PpiPointer->Raw + Fixup);
79 } else {
80 PpiPointer->Raw = (VOID *) ((UINTN)PpiPointer->Raw - Fixup);
81 }
82
83 //
84 // Only when the PEIM descriptor is in the old HOB should it be necessary
85 // to try to convert the pointers in the PEIM descriptor
86 //
87
88 if (((UINTN)PpiPointer->Ppi->Guid < OldCheckingTop) &&
89 ((UINTN)PpiPointer->Ppi->Guid >= OldCheckingBottom)) {
90 //
91 // Convert the pointer to the GUID in the PPI or NOTIFY descriptor
92 // from the old HOB heap to the relocated HOB heap.
93 //
94 if (FixupPositive) {
95 PpiPointer->Ppi->Guid = (VOID *) ((UINTN)PpiPointer->Ppi->Guid + Fixup);
96 } else {
97 PpiPointer->Ppi->Guid = (VOID *) ((UINTN)PpiPointer->Ppi->Guid - Fixup);
98 }
99 }
100
101 //
102 // Assume that no code is located in the temporary memory, so the pointer to
103 // the notification function in the NOTIFY descriptor needs not be converted.
104 //
105 if (Index < PrivateData->PpiData.PpiListEnd &&
106 (UINTN)PpiPointer->Ppi->Ppi < OldCheckingTop &&
107 (UINTN)PpiPointer->Ppi->Ppi >= OldCheckingBottom) {
108 //
109 // Convert the pointer to the PPI interface structure in the PPI descriptor
110 // from the old HOB heap to the relocated HOB heap.
111 //
112 if (FixupPositive) {
113 PpiPointer->Ppi->Ppi = (VOID *) ((UINTN)PpiPointer->Ppi->Ppi + Fixup);
114 } else {
115 PpiPointer->Ppi->Ppi = (VOID *) ((UINTN)PpiPointer->Ppi->Ppi - Fixup);
116 }
117 }
118 }
119 }
120 }
121 }
122
123 /**
124
125 This function installs an interface in the PEI PPI database by GUID.
126 The purpose of the service is to publish an interface that other parties
127 can use to call additional PEIMs.
128
129 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
130 @param PpiList Pointer to a list of PEI PPI Descriptors.
131
132 @retval EFI_SUCCESS if all PPIs in PpiList are successfully installed.
133 @retval EFI_INVALID_PARAMETER if PpiList is NULL pointer
134 if any PPI in PpiList is not valid
135 @retval EFI_OUT_OF_RESOURCES if there is no more memory resource to install PPI
136
137 **/
138 EFI_STATUS
139 EFIAPI
140 PeiInstallPpi (
141 IN CONST EFI_PEI_SERVICES **PeiServices,
142 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
143 )
144 {
145 PEI_CORE_INSTANCE *PrivateData;
146 INTN Index;
147 INTN LastCallbackInstall;
148
149
150 if (PpiList == NULL) {
151 return EFI_INVALID_PARAMETER;
152 }
153
154 PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);
155
156 Index = PrivateData->PpiData.PpiListEnd;
157 LastCallbackInstall = Index;
158
159 //
160 // This is loop installs all PPI descriptors in the PpiList. It is terminated
161 // by the EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST being set in the last
162 // EFI_PEI_PPI_DESCRIPTOR in the list.
163 //
164
165 for (;;) {
166 //
167 // Since PpiData is used for NotifyList and PpiList, max resource
168 // is reached if the Install reaches the NotifyList
169 // PcdPeiCoreMaxPpiSupported can be set to a larger value in DSC to satisfy more PPI requirement.
170 //
171 if (Index == PrivateData->PpiData.NotifyListEnd + 1) {
172 return EFI_OUT_OF_RESOURCES;
173 }
174 //
175 // Check if it is a valid PPI.
176 // If not, rollback list to exclude all in this list.
177 // Try to indicate which item failed.
178 //
179 if ((PpiList->Flags & EFI_PEI_PPI_DESCRIPTOR_PPI) == 0) {
180 PrivateData->PpiData.PpiListEnd = LastCallbackInstall;
181 DEBUG((EFI_D_ERROR, "ERROR -> InstallPpi: %g %p\n", PpiList->Guid, PpiList->Ppi));
182 return EFI_INVALID_PARAMETER;
183 }
184
185 DEBUG((EFI_D_INFO, "Install PPI: %g\n", PpiList->Guid));
186 PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR*) PpiList;
187 PrivateData->PpiData.PpiListEnd++;
188
189 //
190 // Continue until the end of the PPI List.
191 //
192 if ((PpiList->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) ==
193 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) {
194 break;
195 }
196 PpiList++;
197 Index++;
198 }
199
200 //
201 // Dispatch any callback level notifies for newly installed PPIs.
202 //
203 DispatchNotify (
204 PrivateData,
205 EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
206 LastCallbackInstall,
207 PrivateData->PpiData.PpiListEnd,
208 PrivateData->PpiData.DispatchListEnd,
209 PrivateData->PpiData.NotifyListEnd
210 );
211
212
213 return EFI_SUCCESS;
214 }
215
216 /**
217
218 This function reinstalls an interface in the PEI PPI database by GUID.
219 The purpose of the service is to publish an interface that other parties can
220 use to replace an interface of the same name in the protocol database with a
221 different interface.
222
223 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
224 @param OldPpi Pointer to the old PEI PPI Descriptors.
225 @param NewPpi Pointer to the new PEI PPI Descriptors.
226
227 @retval EFI_SUCCESS if the operation was successful
228 @retval EFI_INVALID_PARAMETER if OldPpi or NewPpi is NULL
229 @retval EFI_INVALID_PARAMETER if NewPpi is not valid
230 @retval EFI_NOT_FOUND if the PPI was not in the database
231
232 **/
233 EFI_STATUS
234 EFIAPI
235 PeiReInstallPpi (
236 IN CONST EFI_PEI_SERVICES **PeiServices,
237 IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,
238 IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi
239 )
240 {
241 PEI_CORE_INSTANCE *PrivateData;
242 INTN Index;
243
244
245 if ((OldPpi == NULL) || (NewPpi == NULL)) {
246 return EFI_INVALID_PARAMETER;
247 }
248
249 if ((NewPpi->Flags & EFI_PEI_PPI_DESCRIPTOR_PPI) == 0) {
250 return EFI_INVALID_PARAMETER;
251 }
252
253 PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);
254
255 //
256 // Find the old PPI instance in the database. If we can not find it,
257 // return the EFI_NOT_FOUND error.
258 //
259 for (Index = 0; Index < PrivateData->PpiData.PpiListEnd; Index++) {
260 if (OldPpi == PrivateData->PpiData.PpiListPtrs[Index].Ppi) {
261 break;
262 }
263 }
264 if (Index == PrivateData->PpiData.PpiListEnd) {
265 return EFI_NOT_FOUND;
266 }
267
268 //
269 // Remove the old PPI from the database, add the new one.
270 //
271 DEBUG((EFI_D_INFO, "Reinstall PPI: %g\n", NewPpi->Guid));
272 ASSERT (Index < (INTN)(FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)));
273 PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR *) NewPpi;
274
275 //
276 // Dispatch any callback level notifies for the newly installed PPI.
277 //
278 DispatchNotify (
279 PrivateData,
280 EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
281 Index,
282 Index+1,
283 PrivateData->PpiData.DispatchListEnd,
284 PrivateData->PpiData.NotifyListEnd
285 );
286
287
288 return EFI_SUCCESS;
289 }
290
291 /**
292
293 Locate a given named PPI.
294
295
296 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
297 @param Guid Pointer to GUID of the PPI.
298 @param Instance Instance Number to discover.
299 @param PpiDescriptor Pointer to reference the found descriptor. If not NULL,
300 returns a pointer to the descriptor (includes flags, etc)
301 @param Ppi Pointer to reference the found PPI
302
303 @retval EFI_SUCCESS if the PPI is in the database
304 @retval EFI_NOT_FOUND if the PPI is not in the database
305
306 **/
307 EFI_STATUS
308 EFIAPI
309 PeiLocatePpi (
310 IN CONST EFI_PEI_SERVICES **PeiServices,
311 IN CONST EFI_GUID *Guid,
312 IN UINTN Instance,
313 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
314 IN OUT VOID **Ppi
315 )
316 {
317 PEI_CORE_INSTANCE *PrivateData;
318 INTN Index;
319 EFI_GUID *CheckGuid;
320 EFI_PEI_PPI_DESCRIPTOR *TempPtr;
321
322
323 PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);
324
325 //
326 // Search the data base for the matching instance of the GUIDed PPI.
327 //
328 for (Index = 0; Index < PrivateData->PpiData.PpiListEnd; Index++) {
329 TempPtr = PrivateData->PpiData.PpiListPtrs[Index].Ppi;
330 CheckGuid = TempPtr->Guid;
331
332 //
333 // Don't use CompareGuid function here for performance reasons.
334 // Instead we compare the GUID as INT32 at a time and branch
335 // on the first failed comparison.
336 //
337 if ((((INT32 *)Guid)[0] == ((INT32 *)CheckGuid)[0]) &&
338 (((INT32 *)Guid)[1] == ((INT32 *)CheckGuid)[1]) &&
339 (((INT32 *)Guid)[2] == ((INT32 *)CheckGuid)[2]) &&
340 (((INT32 *)Guid)[3] == ((INT32 *)CheckGuid)[3])) {
341 if (Instance == 0) {
342
343 if (PpiDescriptor != NULL) {
344 *PpiDescriptor = TempPtr;
345 }
346
347 if (Ppi != NULL) {
348 *Ppi = TempPtr->Ppi;
349 }
350
351
352 return EFI_SUCCESS;
353 }
354 Instance--;
355 }
356 }
357
358 return EFI_NOT_FOUND;
359 }
360
361 /**
362
363 This function installs a notification service to be called back when a given
364 interface is installed or reinstalled. The purpose of the service is to publish
365 an interface that other parties can use to call additional PPIs that may materialize later.
366
367 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
368 @param NotifyList Pointer to list of Descriptors to notify upon.
369
370 @retval EFI_SUCCESS if successful
371 @retval EFI_OUT_OF_RESOURCES if no space in the database
372 @retval EFI_INVALID_PARAMETER if not a good decriptor
373
374 **/
375 EFI_STATUS
376 EFIAPI
377 PeiNotifyPpi (
378 IN CONST EFI_PEI_SERVICES **PeiServices,
379 IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
380 )
381 {
382 PEI_CORE_INSTANCE *PrivateData;
383 INTN Index;
384 INTN NotifyIndex;
385 INTN LastCallbackNotify;
386 EFI_PEI_NOTIFY_DESCRIPTOR *NotifyPtr;
387 UINTN NotifyDispatchCount;
388
389
390 NotifyDispatchCount = 0;
391
392 if (NotifyList == NULL) {
393 return EFI_INVALID_PARAMETER;
394 }
395
396 PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);
397
398 Index = PrivateData->PpiData.NotifyListEnd;
399 LastCallbackNotify = Index;
400
401 //
402 // This is loop installs all Notify descriptors in the NotifyList. It is
403 // terminated by the EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST being set in the last
404 // EFI_PEI_NOTIFY_DESCRIPTOR in the list.
405 //
406
407 for (;;) {
408 //
409 // Since PpiData is used for NotifyList and InstallList, max resource
410 // is reached if the Install reaches the PpiList
411 // PcdPeiCoreMaxPpiSupported can be set to a larger value in DSC to satisfy more Notify PPIs requirement.
412 //
413 if (Index == PrivateData->PpiData.PpiListEnd - 1) {
414 return EFI_OUT_OF_RESOURCES;
415 }
416
417 //
418 // If some of the PPI data is invalid restore original Notify PPI database value
419 //
420 if ((NotifyList->Flags & EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES) == 0) {
421 PrivateData->PpiData.NotifyListEnd = LastCallbackNotify;
422 DEBUG((EFI_D_ERROR, "ERROR -> InstallNotify: %g %p\n", NotifyList->Guid, NotifyList->Notify));
423 return EFI_INVALID_PARAMETER;
424 }
425
426 if ((NotifyList->Flags & EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH) != 0) {
427 NotifyDispatchCount ++;
428 }
429
430 PrivateData->PpiData.PpiListPtrs[Index].Notify = (EFI_PEI_NOTIFY_DESCRIPTOR *) NotifyList;
431
432 PrivateData->PpiData.NotifyListEnd--;
433 DEBUG((EFI_D_INFO, "Register PPI Notify: %g\n", NotifyList->Guid));
434 if ((NotifyList->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) ==
435 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) {
436 break;
437 }
438 //
439 // Go the next descriptor. Remember the NotifyList moves down.
440 //
441 NotifyList++;
442 Index--;
443 }
444
445 //
446 // If there is Dispatch Notify PPI installed put them on the bottom
447 //
448 if (NotifyDispatchCount > 0) {
449 for (NotifyIndex = LastCallbackNotify; NotifyIndex > PrivateData->PpiData.NotifyListEnd; NotifyIndex--) {
450 if ((PrivateData->PpiData.PpiListPtrs[NotifyIndex].Notify->Flags & EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH) != 0) {
451 NotifyPtr = PrivateData->PpiData.PpiListPtrs[NotifyIndex].Notify;
452
453 for (Index = NotifyIndex; Index < PrivateData->PpiData.DispatchListEnd; Index++){
454 PrivateData->PpiData.PpiListPtrs[Index].Notify = PrivateData->PpiData.PpiListPtrs[Index + 1].Notify;
455 }
456 PrivateData->PpiData.PpiListPtrs[Index].Notify = NotifyPtr;
457 PrivateData->PpiData.DispatchListEnd--;
458 }
459 }
460
461 LastCallbackNotify -= NotifyDispatchCount;
462 }
463
464 //
465 // Dispatch any callback level notifies for all previously installed PPIs.
466 //
467 DispatchNotify (
468 PrivateData,
469 EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
470 0,
471 PrivateData->PpiData.PpiListEnd,
472 LastCallbackNotify,
473 PrivateData->PpiData.NotifyListEnd
474 );
475
476 return EFI_SUCCESS;
477 }
478
479
480 /**
481
482 Process the Notify List at dispatch level.
483
484 @param PrivateData PeiCore's private data structure.
485
486 **/
487 VOID
488 ProcessNotifyList (
489 IN PEI_CORE_INSTANCE *PrivateData
490 )
491 {
492 INTN TempValue;
493
494 while (TRUE) {
495 //
496 // Check if the PEIM that was just dispatched resulted in any
497 // Notifies getting installed. If so, go process any dispatch
498 // level Notifies that match the previouly installed PPIs.
499 // Use "while" instead of "if" since DispatchNotify can modify
500 // DispatchListEnd (with NotifyPpi) so we have to iterate until the same.
501 //
502 while (PrivateData->PpiData.LastDispatchedNotify != PrivateData->PpiData.DispatchListEnd) {
503 TempValue = PrivateData->PpiData.DispatchListEnd;
504 DispatchNotify (
505 PrivateData,
506 EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
507 0,
508 PrivateData->PpiData.LastDispatchedInstall,
509 PrivateData->PpiData.LastDispatchedNotify,
510 PrivateData->PpiData.DispatchListEnd
511 );
512 PrivateData->PpiData.LastDispatchedNotify = TempValue;
513 }
514
515
516 //
517 // Check if the PEIM that was just dispatched resulted in any
518 // PPIs getting installed. If so, go process any dispatch
519 // level Notifies that match the installed PPIs.
520 // Use "while" instead of "if" since DispatchNotify can modify
521 // PpiListEnd (with InstallPpi) so we have to iterate until the same.
522 //
523 while (PrivateData->PpiData.LastDispatchedInstall != PrivateData->PpiData.PpiListEnd) {
524 TempValue = PrivateData->PpiData.PpiListEnd;
525 DispatchNotify (
526 PrivateData,
527 EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
528 PrivateData->PpiData.LastDispatchedInstall,
529 PrivateData->PpiData.PpiListEnd,
530 FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1,
531 PrivateData->PpiData.DispatchListEnd
532 );
533 PrivateData->PpiData.LastDispatchedInstall = TempValue;
534 }
535
536 if (PrivateData->PpiData.LastDispatchedNotify == PrivateData->PpiData.DispatchListEnd) {
537 break;
538 }
539 }
540 return;
541 }
542
543 /**
544
545 Dispatch notifications.
546
547 @param PrivateData PeiCore's private data structure
548 @param NotifyType Type of notify to fire.
549 @param InstallStartIndex Install Beginning index.
550 @param InstallStopIndex Install Ending index.
551 @param NotifyStartIndex Notify Beginning index.
552 @param NotifyStopIndex Notify Ending index.
553
554 **/
555 VOID
556 DispatchNotify (
557 IN PEI_CORE_INSTANCE *PrivateData,
558 IN UINTN NotifyType,
559 IN INTN InstallStartIndex,
560 IN INTN InstallStopIndex,
561 IN INTN NotifyStartIndex,
562 IN INTN NotifyStopIndex
563 )
564 {
565 INTN Index1;
566 INTN Index2;
567 EFI_GUID *SearchGuid;
568 EFI_GUID *CheckGuid;
569 EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor;
570
571 //
572 // Remember that Installs moves up and Notifies moves down.
573 //
574 for (Index1 = NotifyStartIndex; Index1 > NotifyStopIndex; Index1--) {
575 NotifyDescriptor = PrivateData->PpiData.PpiListPtrs[Index1].Notify;
576
577 CheckGuid = NotifyDescriptor->Guid;
578
579 for (Index2 = InstallStartIndex; Index2 < InstallStopIndex; Index2++) {
580 SearchGuid = PrivateData->PpiData.PpiListPtrs[Index2].Ppi->Guid;
581 //
582 // Don't use CompareGuid function here for performance reasons.
583 // Instead we compare the GUID as INT32 at a time and branch
584 // on the first failed comparison.
585 //
586 if ((((INT32 *)SearchGuid)[0] == ((INT32 *)CheckGuid)[0]) &&
587 (((INT32 *)SearchGuid)[1] == ((INT32 *)CheckGuid)[1]) &&
588 (((INT32 *)SearchGuid)[2] == ((INT32 *)CheckGuid)[2]) &&
589 (((INT32 *)SearchGuid)[3] == ((INT32 *)CheckGuid)[3])) {
590 DEBUG ((EFI_D_INFO, "Notify: PPI Guid: %g, Peim notify entry point: %p\n",
591 SearchGuid,
592 NotifyDescriptor->Notify
593 ));
594 NotifyDescriptor->Notify (
595 (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),
596 NotifyDescriptor,
597 (PrivateData->PpiData.PpiListPtrs[Index2].Ppi)->Ppi
598 );
599 }
600 }
601 }
602 }
603