]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c
1)Add a new module CapsuleRuntime under EdkModulePkg\Universal\Capsule\RuntimeDxe...
[mirror_edk2.git] / EdkModulePkg / Universal / Runtime / RuntimeDxe / Runtime.c
1 /*++
2
3 Copyright (c) 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 Module Name:
13
14 Runtime.c
15
16 Abstract:
17
18 Runtime Architectural Protocol as defined in the DXE CIS
19
20 This code is used to produce the EFI runtime virtual switch over
21
22 THIS IS VERY DANGEROUS CODE BE VERY CAREFUL IF YOU CHANGE IT
23
24 The transition for calling EFI Runtime functions in physical mode to calling
25 them in virtual mode is very very complex. Every pointer in needs to be
26 converted from physical mode to virtual mode. Be very careful walking linked
27 lists! Then to make it really hard the code it's self needs be relocated into
28 the new virtual address space.
29
30 So here is the concept. The code in this module will never ever be called in
31 virtual mode. This is the code that collects the information needed to convert
32 to virtual mode (DXE core registers runtime stuff with this code). Since this
33 code is used to fixup all runtime images, it CAN NOT fix it's self up. So some
34 code has to stay behind and that is us.
35
36 Also you need to be careful about when you allocate memory, as once we are in
37 runtime (including our EVT_SIGNAL_EXIT_BOOT_SERVICES event) you can no longer
38 allocate memory.
39
40 Any runtime driver that gets loaded before us will not be callable in virtual
41 mode. This is due to the fact that the DXE core can not register the info
42 needed with us. This is good, since it keeps the code in this file from
43 getting registered.
44
45
46 Revision History:
47
48 - Move the CalculateCrc32 function from Runtime Arch Protocol to Boot Service.
49 Runtime Arch Protocol definition no longer contains CalculateCrc32. Boot Service
50 Table now contains an item named CalculateCrc32.
51
52 --*/
53
54
55 #include "Runtime.h"
56
57 //
58 // This is a only short term solution.
59 // There is a change coming to the Runtime AP that
60 // will make it so the Runtime driver will not have to allocate any buffers.
61 //
62 #define MAX_RUNTIME_IMAGE_NUM (64)
63 #define MAX_RUNTIME_EVENT_NUM (64)
64 RUNTIME_IMAGE_RELOCATION_DATA mRuntimeImageBuffer[MAX_RUNTIME_IMAGE_NUM];
65 RUNTIME_NOTIFY_EVENT_DATA mRuntimeEventBuffer[MAX_RUNTIME_EVENT_NUM];
66 UINTN mRuntimeImageNumber;
67 UINTN mRuntimeEventNumber;
68
69 //
70 // The handle onto which the Runtime Architectural Protocol instance is installed
71 //
72 EFI_HANDLE mRuntimeHandle = NULL;
73
74 //
75 // The Runtime Architectural Protocol instance produced by this driver
76 //
77 EFI_RUNTIME_ARCH_PROTOCOL mRuntime = {
78 RuntimeDriverRegisterImage,
79 RuntimeDriverRegisterEvent
80 };
81
82 //
83 // Global Variables
84 //
85 LIST_ENTRY mRelocationList = INITIALIZE_LIST_HEAD_VARIABLE(mRelocationList);
86 LIST_ENTRY mEventList = INITIALIZE_LIST_HEAD_VARIABLE(mEventList);
87 BOOLEAN mEfiVirtualMode = FALSE;
88 EFI_GUID mLocalEfiUgaIoProtocolGuid = EFI_UGA_IO_PROTOCOL_GUID;
89 EFI_MEMORY_DESCRIPTOR *mVirtualMap = NULL;
90 UINTN mVirtualMapDescriptorSize;
91 UINTN mVirtualMapMaxIndex;
92
93 EFI_LOADED_IMAGE_PROTOCOL *mMyLoadedImage;
94
95 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
96 STATIC EFI_GUID mEfiCapsuleHeaderGuid = EFI_CAPSULE_GUID;
97 #endif
98 //
99 // Worker Functions
100 //
101 VOID
102 RuntimeDriverCalculateEfiHdrCrc (
103 IN OUT EFI_TABLE_HEADER *Hdr
104 )
105 /*++
106
107 Routine Description:
108
109 Calcualte the 32-bit CRC in a EFI table using the Runtime Drivers
110 internal function. The EFI Boot Services Table can not be used because
111 the EFI Boot Services Table was destroyed at ExitBootServices()
112
113 Arguments:
114
115 Hdr - Pointer to an EFI standard header
116
117 Returns:
118
119 None
120
121 --*/
122 {
123 UINT32 Crc;
124
125 Hdr->CRC32 = 0;
126
127 Crc = 0;
128 RuntimeDriverCalculateCrc32 ((UINT8 *) Hdr, Hdr->HeaderSize, &Crc);
129 Hdr->CRC32 = Crc;
130 }
131
132 EFI_STATUS
133 EFIAPI
134 RuntimeDriverRegisterImage (
135 IN EFI_RUNTIME_ARCH_PROTOCOL *This,
136 IN EFI_PHYSICAL_ADDRESS ImageBase,
137 IN UINTN ImageSize,
138 IN VOID *RelocationData
139 )
140 /*++
141
142 Routine Description:
143
144 When a SetVirtualAddressMap() is performed all the runtime images loaded by
145 DXE must be fixed up with the new virtual address map. To facilitate this the
146 Runtime Architectural Protocol needs to be informed of every runtime driver
147 that is registered. All the runtime images loaded by DXE should be registered
148 with this service by the DXE Core when ExitBootServices() is called. The
149 images that are registered with this service must have successfully been
150 loaded into memory with the Boot Service LoadImage(). As a result, no
151 parameter checking needs to be performed.
152
153 Arguments:
154
155 This - The EFI_RUNTIME_ARCH_PROTOCOL instance.
156
157 ImageBase - Start of image that has been loaded in memory. It is either
158 a pointer to the DOS or PE header of the image.
159
160 ImageSize - Size of the image in bytes.
161
162 RelocationData - Information about the fixups that were performed on ImageBase
163 when it was loaded into memory. This information is needed
164 when the virtual mode fix-ups are reapplied so that data that
165 has been programmatically updated will not be fixed up. If
166 code updates a global variable the code is responsible for
167 fixing up the variable for virtual mode.
168
169 Returns:
170
171 EFI_SUCCESS - The ImageBase has been registered.
172
173 --*/
174 {
175 RUNTIME_IMAGE_RELOCATION_DATA *RuntimeImage;
176
177 if (mMyLoadedImage->ImageBase == (VOID *) (UINTN) ImageBase) {
178 //
179 // We don't want to relocate our selves, as we only run in physical mode.
180 //
181 return EFI_SUCCESS;
182 }
183
184 RuntimeImage = &mRuntimeImageBuffer[mRuntimeImageNumber];
185 mRuntimeImageNumber++;
186 ASSERT (mRuntimeImageNumber < MAX_RUNTIME_IMAGE_NUM);
187
188 RuntimeImage->Valid = TRUE;
189 RuntimeImage->ImageBase = ImageBase;
190 RuntimeImage->ImageSize = ImageSize;
191 RuntimeImage->RelocationData = RelocationData;
192
193 InsertTailList (&mRelocationList, &RuntimeImage->Link);
194 return EFI_SUCCESS;
195 }
196
197 EFI_STATUS
198 EFIAPI
199 RuntimeDriverRegisterEvent (
200 IN EFI_RUNTIME_ARCH_PROTOCOL *This,
201 IN UINT32 Type,
202 IN EFI_TPL NotifyTpl,
203 IN EFI_EVENT_NOTIFY NotifyFunction,
204 IN VOID *NotifyContext,
205 IN EFI_EVENT *Event
206 )
207 /*++
208
209 Routine Description:
210
211 This function is used to support the required runtime events. Currently only
212 runtime events of type EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE needs to be
213 registered with this service. All the runtime events that exist in the DXE
214 Core should be registered with this service when ExitBootServices() is called.
215 All the events that are registered with this service must have been created
216 with the Boot Service CreateEvent(). As a result, no parameter checking needs
217 to be performed.
218
219 Arguments:
220
221 This - The EFI_RUNTIME_ARCH_PROTOCOL instance.
222
223 Type - The same as Type passed into CreateEvent().
224
225 NotifyTpl - The same as NotifyTpl passed into CreateEvent().
226
227 NotifyFunction - The same as NotifyFunction passed into CreateEvent().
228
229 NotifyContext - The same as NotifyContext passed into CreateEvent().
230
231 Event - The EFI_EVENT returned by CreateEvent(). Event must be in
232 runtime memory.
233
234 Returns:
235
236 EFI_SUCCESS - The Event has been registered.
237
238 --*/
239 {
240 RUNTIME_NOTIFY_EVENT_DATA *RuntimeEvent;
241
242 RuntimeEvent = &mRuntimeEventBuffer[mRuntimeEventNumber];
243 mRuntimeEventNumber++;
244 ASSERT (mRuntimeEventNumber < MAX_RUNTIME_EVENT_NUM);
245
246 RuntimeEvent->Type = Type;
247 RuntimeEvent->NotifyTpl = NotifyTpl;
248 RuntimeEvent->NotifyFunction = NotifyFunction;
249 RuntimeEvent->NotifyContext = NotifyContext;
250 RuntimeEvent->Event = Event;
251
252 InsertTailList (&mEventList, &RuntimeEvent->Link);
253 return EFI_SUCCESS;
254 }
255
256 EFI_STATUS
257 EFIAPI
258 RuntimeDriverConvertPointer (
259 IN UINTN DebugDisposition,
260 IN OUT VOID **ConvertAddress
261 )
262 {
263 UINTN Address;
264 VOID *PlabelConvertAddress;
265 UINT64 VirtEndOfRange;
266 EFI_MEMORY_DESCRIPTOR *VirtEntry;
267 UINTN Index;
268
269 //
270 // Make sure ConvertAddress is a valid pointer
271 //
272 if (ConvertAddress == NULL) {
273 return EFI_INVALID_PARAMETER;
274 }
275 //
276 // Get the address to convert
277 //
278 Address = (UINTN) *ConvertAddress;
279
280 //
281 // If this is a null pointer, return if it's allowed
282 //
283 if (Address == 0) {
284 if (DebugDisposition & EFI_OPTIONAL_POINTER) {
285 return EFI_SUCCESS;
286 }
287
288 return EFI_INVALID_PARAMETER;
289 }
290
291 PlabelConvertAddress = NULL;
292 VirtEntry = mVirtualMap;
293 for (Index = 0; Index < mVirtualMapMaxIndex; Index++) {
294 //
295 // To prevent the inclusion of 64-bit math functions a UINTN was placed in
296 // front of VirtEntry->NumberOfPages to cast it to a 32-bit thing on IA-32
297 // platforms. If you get this ASSERT remove the UINTN and do a 64-bit
298 // multiply.
299 //
300 ASSERT ((VirtEntry->NumberOfPages < 0xffffffff) || (sizeof (UINTN) > 4));
301
302 if ((VirtEntry->Attribute & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME) {
303 if (Address >= VirtEntry->PhysicalStart) {
304 VirtEndOfRange = VirtEntry->PhysicalStart + (((UINTN) VirtEntry->NumberOfPages) * EFI_PAGE_SIZE);
305 if (Address < VirtEndOfRange) {
306 //
307 // Compute new address
308 //
309 *ConvertAddress = (VOID *) (Address - (UINTN) VirtEntry->PhysicalStart + (UINTN) VirtEntry->VirtualStart);
310 return EFI_SUCCESS;
311 } else if (Address < (VirtEndOfRange + 0x200000)) {
312 //
313 // On Itanium GP defines a window +/- 2 MB inside an image.
314 // The compiler may asign a GP value outside of the image. Thus
315 // it could fall out side of any of our valid regions
316 //
317 PlabelConvertAddress = (VOID *) (Address - (UINTN) VirtEntry->PhysicalStart + (UINTN) VirtEntry->VirtualStart);
318 }
319 }
320 }
321
322 VirtEntry = NextMemoryDescriptor (VirtEntry, mVirtualMapDescriptorSize);
323 }
324
325 if (DebugDisposition & EFI_IPF_GP_POINTER) {
326 //
327 // If it's an IPF GP and the GP was outside the image handle that case.
328 //
329 if (PlabelConvertAddress != NULL) {
330 *ConvertAddress = PlabelConvertAddress;
331 return EFI_SUCCESS;
332 }
333 }
334
335 return EFI_NOT_FOUND;
336 }
337
338 EFI_STATUS
339 RuntimeDriverConvertInternalPointer (
340 IN OUT VOID **ConvertAddress
341 )
342 {
343 return RuntimeDriverConvertPointer (0x0, ConvertAddress);
344 }
345
346 EFI_STATUS
347 EFIAPI
348 RuntimeDriverSetVirtualAddressMap (
349 IN UINTN MemoryMapSize,
350 IN UINTN DescriptorSize,
351 IN UINT32 DescriptorVersion,
352 IN EFI_MEMORY_DESCRIPTOR *VirtualMap
353 )
354 {
355 RUNTIME_NOTIFY_EVENT_DATA *RuntimeEvent;
356 RUNTIME_IMAGE_RELOCATION_DATA *RuntimeImage;
357 LIST_ENTRY *Link;
358 UINTN Index;
359 UINTN Index1;
360 EFI_DRIVER_OS_HANDOFF_HEADER *DriverOsHandoffHeader;
361 EFI_DRIVER_OS_HANDOFF *DriverOsHandoff;
362 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
363 EFI_CAPSULE_TABLE *CapsuleTable;
364 #endif
365
366 //
367 // Can only switch to virtual addresses once the memory map is locked down,
368 // and can only set it once
369 //
370 if (!EfiAtRuntime () || mEfiVirtualMode) {
371 return EFI_UNSUPPORTED;
372 }
373 //
374 // Only understand the original descriptor format
375 //
376 if (DescriptorVersion != EFI_MEMORY_DESCRIPTOR_VERSION || DescriptorSize < sizeof (EFI_MEMORY_DESCRIPTOR)) {
377 return EFI_INVALID_PARAMETER;
378 }
379 //
380 // BugBug: Add code here to verify the memory map. We should
381 // cache a copy of the system memory map in the EFI System Table
382 // as a GUID pointer pair.
383 //
384 //
385 // Make sure all virtual translations are satisfied
386 //
387 mVirtualMapMaxIndex = MemoryMapSize / DescriptorSize;
388
389 //
390 // BugBug :The following code does not work hence commented out.
391 // Need to be replaced by something that works.
392 //
393 // VirtEntry = VirtualMap;
394 // for (Index = 0; Index < mVirtualMapMaxIndex; Index++) {
395 // if (((VirtEntry->Attribute & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME) &&
396 // (VirtEntry->VirtualStart != 0) ) {
397 // return EFI_NO_MAPPING;
398 // }
399 // VirtEntry = NextMemoryDescriptor(VirtEntry, DescriptorSize);
400 // }
401 //
402 // We are now committed to go to virtual mode, so lets get to it!
403 //
404 mEfiVirtualMode = TRUE;
405
406 //
407 // ConvertPointer() needs this mVirtualMap to do the conversion. So set up
408 // globals we need to parse the virtual address map.
409 //
410 mVirtualMapDescriptorSize = DescriptorSize;
411 mVirtualMap = VirtualMap;
412
413 //
414 // Signal all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE events.
415 // The core call RuntimeDriverRegisterEvent() for
416 // every runtime event and we stored them in the mEventList
417 //
418 //
419 // Currently the bug in StatusCode/RuntimeLib has been fixed, it will
420 // check whether in Runtime or not (this is judged by looking at
421 // mEfiAtRuntime global So this ReportStatusCode will work
422 //
423 REPORT_STATUS_CODE (
424 EFI_PROGRESS_CODE,
425 (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP)
426 );
427
428 //
429 // BugBug - Commented out for now because the status code driver is not
430 // ready for runtime yet. The Status Code driver calls data hub with does
431 // a bunch of Boot Service things (locks, AllocatePool) and hangs somewhere
432 // on the way.
433 //
434 // ReportStatusCode (
435 // EfiProgressCode, EfiMaxErrorSeverity,
436 // 0x03, 0x01, 12, // ReadyToBoot Progress code
437 // 0x00, 30, L"ConvertPointer"
438 // );
439 //
440 for (Link = mEventList.ForwardLink; Link != &mEventList; Link = Link->ForwardLink) {
441 RuntimeEvent = _CR (Link, RUNTIME_NOTIFY_EVENT_DATA, Link);
442 if ((RuntimeEvent->Type & EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) == EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
443 RuntimeEvent->NotifyFunction (
444 RuntimeEvent->Event,
445 RuntimeEvent->NotifyContext
446 );
447 }
448 }
449 //
450 // Relocate runtime images. Runtime images loaded before the runtime AP was
451 // started will not be relocated, since they would not have gotten registered.
452 // This includes the code in this file.
453 //
454 for (Link = mRelocationList.ForwardLink; Link != &mRelocationList; Link = Link->ForwardLink) {
455 RuntimeImage = _CR (Link, RUNTIME_IMAGE_RELOCATION_DATA, Link);
456 if (RuntimeImage->Valid) {
457 RelocatePeImageForRuntime (RuntimeImage);
458 }
459 }
460 //
461 // Convert all the Runtime Services except ConvertPointer() and SetVirtualAddressMap()
462 // and recompute the CRC-32
463 //
464 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetTime);
465 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetTime);
466 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetWakeupTime);
467 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetWakeupTime);
468 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->ResetSystem);
469 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextHighMonotonicCount);
470 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetVariable);
471 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetVariable);
472 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextVariableName);
473 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
474 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryVariableInfo);
475 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->UpdateCapsule);
476 RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryCapsuleCapabilities);
477 #endif
478 RuntimeDriverCalculateEfiHdrCrc (&gRT->Hdr);
479
480 //
481 // Convert the UGA OS Handoff Table if it is present in the Configuration Table
482 //
483 for (Index = 0; Index < gST->NumberOfTableEntries; Index++) {
484 if (CompareGuid (&mLocalEfiUgaIoProtocolGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {
485 DriverOsHandoffHeader = gST->ConfigurationTable[Index].VendorTable;
486 for (Index1 = 0; Index1 < DriverOsHandoffHeader->NumberOfEntries; Index1++) {
487 DriverOsHandoff = (EFI_DRIVER_OS_HANDOFF *)
488 (
489 (UINTN) DriverOsHandoffHeader +
490 DriverOsHandoffHeader->HeaderSize +
491 Index1 *
492 DriverOsHandoffHeader->SizeOfEntries
493 );
494 RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &DriverOsHandoff->DevicePath);
495 RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &DriverOsHandoff->PciRomImage);
496 }
497
498 RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));
499 }
500 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
501 if (CompareGuid (&mEfiCapsuleHeaderGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {
502 CapsuleTable = gST->ConfigurationTable[Index].VendorTable;
503 for (Index1 = 0; Index1 < CapsuleTable->CapsuleArrayNumber; Index1++) {
504 RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &CapsuleTable->CapsulePtr[Index1]);
505 }
506 RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));
507 }
508 #endif
509 }
510 //
511 // Convert the runtime fields of the EFI System Table and recompute the CRC-32
512 //
513 RuntimeDriverConvertInternalPointer ((VOID **) &gST->FirmwareVendor);
514 RuntimeDriverConvertInternalPointer ((VOID **) &gST->ConfigurationTable);
515 RuntimeDriverConvertInternalPointer ((VOID **) &gST->RuntimeServices);
516 RuntimeDriverCalculateEfiHdrCrc (&gST->Hdr);
517
518 //
519 // At this point, gRT and gST are physical pointers, but the contents of these tables
520 // have been converted to runtime.
521 //
522 //
523 // mVirtualMap is only valid during SetVirtualAddressMap() call
524 //
525 mVirtualMap = NULL;
526
527 return EFI_SUCCESS;
528 }
529
530 EFI_STATUS
531 EFIAPI
532 RuntimeDriverInitialize (
533 IN EFI_HANDLE ImageHandle,
534 IN EFI_SYSTEM_TABLE *SystemTable
535 )
536 /*++
537
538 Routine Description:
539 Install Runtime AP. This code includes the EfiDriverLib, but it functions at
540 RT in physical mode. The only Lib services are gBS, gRT, and the DEBUG and
541 ASSERT macros (they do ReportStatusCode).
542
543 Arguments:
544 (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
545
546 Returns:
547
548 EFI_SUCEESS - Runtime Driver Architectural Protocol Installed
549
550 Other - Return value from gBS->InstallMultipleProtocolInterfaces
551
552 --*/
553 {
554 EFI_STATUS Status;
555
556 //
557 // This image needs to be exclued from relocation for virtual mode, so cache
558 // a copy of the Loaded Image protocol to test later.
559 //
560 Status = gBS->HandleProtocol (
561 ImageHandle,
562 &gEfiLoadedImageProtocolGuid,
563 (VOID **) &mMyLoadedImage
564 );
565 ASSERT_EFI_ERROR (Status);
566
567 //
568 // Initialize the table used to compute 32-bit CRCs
569 //
570 RuntimeDriverInitializeCrc32Table ();
571
572 //
573 // Fill in the entries of the EFI Boot Services and EFI Runtime Services Tables
574 //
575 gBS->CalculateCrc32 = RuntimeDriverCalculateCrc32;
576 gRT->SetVirtualAddressMap = RuntimeDriverSetVirtualAddressMap;
577 gRT->ConvertPointer = RuntimeDriverConvertPointer;
578
579 //
580 // Install the Runtime Architectural Protocol onto a new handle
581 //
582 Status = gBS->InstallMultipleProtocolInterfaces (
583 &mRuntimeHandle,
584 &gEfiRuntimeArchProtocolGuid,
585 &mRuntime,
586 NULL
587 );
588 ASSERT_EFI_ERROR (Status);
589
590 mRuntimeImageNumber = 0;
591 mRuntimeEventNumber = 0;
592
593 return Status;
594 }