]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.h
PcdIoBlockBaseAddressForIpf is required by IPF platform so need add it back
[mirror_edk2.git] / MdeModulePkg / Universal / FirmwareVolume / FaultTolerantWriteDxe / FtwLite.h
CommitLineData
d7dec593 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 FtwLite.h\r
16\r
17Abstract:\r
18\r
19 This is a simple fault tolerant write driver, based on PlatformFd library.\r
20 And it only supports write BufferSize <= SpareAreaLength.\r
21\r
22 This boot service only protocol provides fault tolerant write capability for \r
23 block devices. The protocol has internal non-volatile intermediate storage \r
24 of the data and private information. It should be able to recover \r
25 automatically from a critical fault, such as power failure. \r
26\r
27--*/\r
28\r
29#ifndef _EFI_FAULT_TOLERANT_WRITE_LITE_H_\r
30#define _EFI_FAULT_TOLERANT_WRITE_LITE_H_\r
31\r
32//\r
33// The package level header files this module uses\r
34//\r
35#include <PiDxe.h>\r
36//\r
37// The protocols, PPI and GUID defintions for this module\r
38//\r
39#include <Protocol/PciRootBridgeIo.h>\r
40#include <Guid/SystemNvDataGuid.h>\r
41#include <Protocol/FaultTolerantWriteLite.h>\r
42#include <Protocol/FirmwareVolumeBlock.h>\r
43//\r
44// The Library classes this module consumes\r
45//\r
46#include <Library/PcdLib.h>\r
47#include <Library/DebugLib.h>\r
48#include <Library/UefiDriverEntryPoint.h>\r
49#include <Library/BaseMemoryLib.h>\r
50#include <Library/MemoryAllocationLib.h>\r
51#include <Library/UefiBootServicesTableLib.h>\r
52\r
53#include <Common/WorkingBlockHeader.h>\r
54\r
55#define EFI_D_FTW_LITE EFI_D_ERROR\r
56#define EFI_D_FTW_INFO EFI_D_INFO\r
57\r
58//\r
59// Flash erase polarity is 1\r
60//\r
61#define FTW_ERASE_POLARITY 1\r
62\r
63#define FTW_VALID_STATE 0\r
64#define FTW_INVALID_STATE 1\r
65\r
66#define FTW_ERASED_BYTE ((UINT8) (255))\r
67#define FTW_POLARITY_REVERT ((UINT8) (255))\r
68\r
69typedef struct {\r
70 UINT8 WriteAllocated : 1;\r
71 UINT8 SpareCompleted : 1;\r
72 UINT8 WriteCompleted : 1;\r
73 UINT8 Reserved : 5;\r
74#define WRITE_ALLOCATED 0x1\r
75#define SPARE_COMPLETED 0x2\r
76#define WRITE_COMPLETED 0x4\r
77\r
78 EFI_DEV_PATH DevPath;\r
79 EFI_LBA Lba;\r
80 UINTN Offset;\r
81 UINTN NumBytes;\r
82 //\r
83 // UINTN SpareAreaOffset;\r
84 //\r
85} EFI_FTW_LITE_RECORD;\r
86\r
87#define FTW_LITE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('F', 'T', 'W', 'L')\r
88\r
89//\r
90// MACRO for Block size.\r
91// Flash Erasing will do in block granularity.\r
92//\r
93#ifdef FV_BLOCK_SIZE\r
94#define FTW_BLOCK_SIZE FV_BLOCK_SIZE\r
95#else\r
96#define FV_BLOCK_SIZE 0x10000\r
97#define FTW_BLOCK_SIZE FV_BLOCK_SIZE\r
98#endif\r
99//\r
100// MACRO for FTW WORK SPACE Base & Size\r
101//\r
102#ifdef EFI_FTW_WORKING_OFFSET\r
103#define FTW_WORK_SPACE_BASE EFI_FTW_WORKING_OFFSET\r
104#else\r
105#define FTW_WORK_SPACE_BASE 0x00E000\r
106#endif\r
107\r
108#ifdef EFI_FTW_WORKING_LENGTH\r
109#define FTW_WORK_SPACE_SIZE EFI_FTW_WORKING_LENGTH\r
110#else\r
111#define FTW_WORK_SPACE_SIZE 0x002000\r
112#endif\r
113//\r
114// MACRO for FTW header and record\r
115//\r
116#define FTW_WORKING_QUEUE_SIZE (FTW_WORK_SPACE_SIZE - sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER))\r
117#define FTW_LITE_RECORD_SIZE (sizeof (EFI_FTW_LITE_RECORD))\r
118#define WRITE_TOTAL_SIZE FTW_LITE_RECORD_SIZE\r
119\r
120//\r
121// EFI Fault tolerant protocol private data structure\r
122//\r
123typedef struct {\r
124 UINTN Signature;\r
125 EFI_HANDLE Handle;\r
126 EFI_FTW_LITE_PROTOCOL FtwLiteInstance;\r
127 EFI_PHYSICAL_ADDRESS WorkSpaceAddress;\r
128 UINTN WorkSpaceLength;\r
129 EFI_PHYSICAL_ADDRESS SpareAreaAddress;\r
130 UINTN SpareAreaLength;\r
131 UINTN NumberOfSpareBlock; // Number of the blocks in spare block\r
132 UINTN SizeOfSpareBlock; // Block size in bytes of the blocks in spare block\r
133 EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER *FtwWorkSpaceHeader;\r
134 EFI_FTW_LITE_RECORD *FtwLastRecord;\r
135 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FtwFvBlock; // FVB of working block\r
136 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FtwBackupFvb; // FVB of spare block\r
137 EFI_LBA FtwSpareLba;\r
138 EFI_LBA FtwWorkBlockLba; // Start LBA of working block\r
139 EFI_LBA FtwWorkSpaceLba; // Start LBA of working space\r
140 UINTN FtwWorkSpaceBase; // Offset from LBA start addr\r
141 UINTN FtwWorkSpaceSize;\r
142 UINT8 *FtwWorkSpace;\r
143 //\r
144 // Following a buffer of FtwWorkSpace[FTW_WORK_SPACE_SIZE],\r
145 // Allocated with EFI_FTW_LITE_DEVICE.\r
146 //\r
147} EFI_FTW_LITE_DEVICE;\r
148\r
149#define FTW_LITE_CONTEXT_FROM_THIS(a) CR (a, EFI_FTW_LITE_DEVICE, FtwLiteInstance, FTW_LITE_DEVICE_SIGNATURE)\r
150\r
151//\r
152// Driver entry point\r
153//\r
154EFI_STATUS\r
155EFIAPI\r
156InitializeFtwLite (\r
157 IN EFI_HANDLE ImageHandle,\r
158 IN EFI_SYSTEM_TABLE *SystemTable\r
159 )\r
160/*++\r
161\r
162Routine Description:\r
163 This function is the entry point of the Fault Tolerant Write driver.\r
164\r
165Arguments:\r
166 ImageHandle - EFI_HANDLE: A handle for the image that is initializing \r
167 this driver\r
168 SystemTable - EFI_SYSTEM_TABLE: A pointer to the EFI system table\r
169\r
170Returns:\r
171 EFI_SUCCESS - FTW has finished the initialization\r
172 EFI_ABORTED - FTW initialization error\r
173\r
174--*/\r
175;\r
176\r
177//\r
178// Fault Tolerant Write Protocol API\r
179//\r
180EFI_STATUS\r
181EFIAPI\r
182FtwLiteWrite (\r
183 IN EFI_FTW_LITE_PROTOCOL *This,\r
184 IN EFI_HANDLE FvbHandle,\r
185 IN EFI_LBA Lba,\r
186 IN UINTN Offset,\r
187 IN UINTN *NumBytes,\r
188 IN VOID *Buffer\r
189 )\r
190/*++\r
191\r
192Routine Description:\r
193 Starts a target block update. This function will record data about write \r
194 in fault tolerant storage and will complete the write in a recoverable \r
195 manner, ensuring at all times that either the original contents or \r
196 the modified contents are available.\r
197\r
198Arguments:\r
199 This - Calling context\r
200 FvbHandle - The handle of FVB protocol that provides services for \r
201 reading, writing, and erasing the target block.\r
202 Lba - The logical block address of the target block. \r
203 Offset - The offset within the target block to place the data.\r
204 NumBytes - The number of bytes to write to the target block.\r
205 Buffer - The data to write.\r
206\r
207Returns:\r
208 EFI_SUCCESS - The function completed successfully\r
209 EFI_BAD_BUFFER_SIZE - The write would span a target block, which is not \r
210 a valid action.\r
211 EFI_ACCESS_DENIED - No writes have been allocated.\r
212 EFI_NOT_FOUND - Cannot find FVB by handle.\r
213 EFI_OUT_OF_RESOURCES - Cannot allocate memory.\r
214 EFI_ABORTED - The function could not complete successfully.\r
215\r
216--*/\r
217;\r
218\r
219//\r
220// Internal functions\r
221//\r
222EFI_STATUS\r
223FtwRestart (\r
224 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice\r
225 )\r
226/*++\r
227\r
228Routine Description:\r
229 Restarts a previously interrupted write. The caller must provide the \r
230 block protocol needed to complete the interrupted write.\r
231\r
232Arguments:\r
233 FtwLiteDevice - The private data of FTW_LITE driver\r
234 FvbHandle - The handle of FVB protocol that provides services for \r
235 reading, writing, and erasing the target block.\r
236\r
237Returns:\r
238 EFI_SUCCESS - The function completed successfully\r
239 EFI_ACCESS_DENIED - No pending writes exist\r
240 EFI_NOT_FOUND - FVB protocol not found by the handle\r
241 EFI_ABORTED - The function could not complete successfully\r
242\r
243--*/\r
244;\r
245\r
246EFI_STATUS\r
247FtwAbort (\r
248 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice\r
249 )\r
250/*++\r
251\r
252Routine Description:\r
253 Aborts all previous allocated writes.\r
254\r
255Arguments:\r
256 FtwLiteDevice - The private data of FTW_LITE driver\r
257\r
258Returns:\r
259 EFI_SUCCESS - The function completed successfully\r
260 EFI_ABORTED - The function could not complete successfully.\r
261 EFI_NOT_FOUND - No allocated writes exist.\r
262\r
263--*/\r
264;\r
265\r
266\r
267EFI_STATUS\r
268FtwWriteRecord (\r
269 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
270 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb\r
271 )\r
272/*++\r
273\r
274Routine Description:\r
275 Write a record with fault tolerant mannaer.\r
276 Since the content has already backuped in spare block, the write is \r
277 guaranteed to be completed with fault tolerant manner.\r
278\r
279Arguments:\r
280 FtwLiteDevice - The private data of FTW_LITE driver\r
281 Fvb - The FVB protocol that provides services for \r
282 reading, writing, and erasing the target block.\r
283\r
284Returns:\r
285 EFI_SUCCESS - The function completed successfully\r
286 EFI_ABORTED - The function could not complete successfully\r
287\r
288--*/\r
289;\r
290\r
291EFI_STATUS\r
292FtwEraseBlock (\r
293 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
294 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvBlock,\r
295 EFI_LBA Lba\r
296 )\r
297/*++\r
298\r
299Routine Description:\r
300 To Erase one block. The size is FTW_BLOCK_SIZE\r
301\r
302Arguments:\r
303 FtwLiteDevice - Calling context\r
304 FvBlock - FVB Protocol interface\r
305 Lba - Lba of the firmware block\r
306\r
307Returns:\r
308 EFI_SUCCESS - Block LBA is Erased successfully\r
309 Others - Error occurs\r
310\r
311--*/\r
312;\r
313\r
314EFI_STATUS\r
315FtwEraseSpareBlock (\r
316 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice\r
317 )\r
318/*++\r
319\r
320Routine Description:\r
321\r
322 Erase spare block.\r
323\r
324Arguments:\r
325\r
326 FtwLiteDevice - Calling context\r
327\r
328Returns:\r
329\r
330 Status code\r
331\r
332--*/\r
333;\r
334\r
335EFI_STATUS\r
336FtwGetFvbByHandle (\r
337 IN EFI_HANDLE FvBlockHandle,\r
338 OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL **FvBlock\r
339 )\r
340/*++\r
341\r
342Routine Description:\r
343 Retrive the proper FVB protocol interface by HANDLE.\r
344\r
345Arguments:\r
346 FvBlockHandle - The handle of FVB protocol that provides services for \r
347 reading, writing, and erasing the target block.\r
348 FvBlock - The interface of FVB protocol\r
349\r
350Returns:\r
351 EFI_SUCCESS - The function completed successfully\r
352 EFI_ABORTED - The function could not complete successfully\r
353--*/\r
354;\r
355\r
356EFI_STATUS\r
357GetFvbByAddress (\r
358 IN EFI_PHYSICAL_ADDRESS Address,\r
359 OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL **FvBlock\r
360 )\r
361/*++\r
362\r
363Routine Description:\r
364\r
365 Get firmware block by address.\r
366\r
367Arguments:\r
368\r
369 Address - Address specified the block\r
370 FvBlock - The block caller wanted\r
371\r
372Returns:\r
373\r
374 Status code\r
375\r
376 EFI_NOT_FOUND - Block not found\r
377\r
378--*/\r
379;\r
380\r
381BOOLEAN\r
382IsInWorkingBlock (\r
383 EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
384 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvBlock,\r
385 EFI_LBA Lba\r
386 )\r
387/*++\r
388\r
389Routine Description:\r
390\r
391 Is it in working block?\r
392\r
393Arguments:\r
394\r
395 FtwLiteDevice - Calling context\r
396 FvBlock - Fvb protocol instance\r
397 Lba - The block specified\r
398\r
399Returns:\r
400\r
401 In working block or not\r
402\r
403--*/\r
404;\r
405\r
406BOOLEAN\r
407IsBootBlock (\r
408 EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
409 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvBlock,\r
410 EFI_LBA Lba\r
411 )\r
412/*++\r
413\r
414Routine Description:\r
415\r
416 Check whether the block is a boot block.\r
417\r
418Arguments:\r
419\r
420 FtwLiteDevice - Calling context\r
421 FvBlock - Fvb protocol instance\r
422 Lba - Lba value\r
423\r
424Returns:\r
425\r
426 Is a boot block or not\r
427\r
428--*/\r
429;\r
430\r
431EFI_STATUS\r
432FlushSpareBlockToTargetBlock (\r
433 EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
434 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvBlock,\r
435 EFI_LBA Lba\r
436 )\r
437/*++\r
438\r
439Routine Description:\r
440 Copy the content of spare block to a target block. Size is FTW_BLOCK_SIZE.\r
441 Spare block is accessed by FTW backup FVB protocol interface. LBA is \r
442 FtwLiteDevice->FtwSpareLba.\r
443 Target block is accessed by FvBlock protocol interface. LBA is Lba.\r
444\r
445Arguments:\r
446 FtwLiteDevice - The private data of FTW_LITE driver\r
447 FvBlock - FVB Protocol interface to access target block\r
448 Lba - Lba of the target block\r
449\r
450Returns:\r
451 EFI_SUCCESS - Spare block content is copied to target block\r
452 EFI_INVALID_PARAMETER - Input parameter error\r
453 EFI_OUT_OF_RESOURCES - Allocate memory error\r
454 EFI_ABORTED - The function could not complete successfully\r
455\r
456--*/\r
457;\r
458\r
459EFI_STATUS\r
460FlushSpareBlockToWorkingBlock (\r
461 EFI_FTW_LITE_DEVICE *FtwLiteDevice\r
462 )\r
463/*++\r
464\r
465Routine Description:\r
466 Copy the content of spare block to working block. Size is FTW_BLOCK_SIZE.\r
467 Spare block is accessed by FTW backup FVB protocol interface. LBA is \r
468 FtwLiteDevice->FtwSpareLba.\r
469 Working block is accessed by FTW working FVB protocol interface. LBA is \r
470 FtwLiteDevice->FtwWorkBlockLba.\r
471\r
472Arguments:\r
473 FtwLiteDevice - The private data of FTW_LITE driver\r
474\r
475Returns:\r
476 EFI_SUCCESS - Spare block content is copied to target block\r
477 EFI_OUT_OF_RESOURCES - Allocate memory error\r
478 EFI_ABORTED - The function could not complete successfully\r
479\r
480Notes:\r
481 Since the working block header is important when FTW initializes, the \r
482 state of the operation should be handled carefully. The Crc value is \r
483 calculated without STATE element. \r
484\r
485--*/\r
486;\r
487\r
488EFI_STATUS\r
489FlushSpareBlockToBootBlock (\r
490 EFI_FTW_LITE_DEVICE *FtwLiteDevice\r
491 )\r
492/*++\r
493\r
494Routine Description:\r
495 Copy the content of spare block to a boot block. Size is FTW_BLOCK_SIZE.\r
496 Spare block is accessed by FTW backup FVB protocol interface. LBA is \r
497 FtwLiteDevice->FtwSpareLba.\r
498 Boot block is accessed by BootFvb protocol interface. LBA is 0.\r
499\r
500Arguments:\r
501 FtwLiteDevice - The private data of FTW_LITE driver\r
502\r
503Returns:\r
504 EFI_SUCCESS - Spare block content is copied to boot block\r
505 EFI_INVALID_PARAMETER - Input parameter error\r
506 EFI_OUT_OF_RESOURCES - Allocate memory error\r
507 EFI_ABORTED - The function could not complete successfully\r
508\r
509Notes:\r
510\r
511--*/\r
512;\r
513\r
514EFI_STATUS\r
515FtwUpdateFvState (\r
516 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvBlock,\r
517 IN EFI_LBA Lba,\r
518 IN UINTN Offset,\r
519 IN UINT8 NewBit\r
520 )\r
521/*++\r
522\r
523Routine Description:\r
524 Update a bit of state on a block device. The location of the bit is \r
525 calculated by the (Lba, Offset, bit). Here bit is determined by the \r
526 the name of a certain bit.\r
527\r
528Arguments:\r
529 FvBlock - FVB Protocol interface to access SrcBlock and DestBlock\r
530 Lba - Lba of a block\r
531 Offset - Offset on the Lba\r
532 NewBit - New value that will override the old value if it can be change\r
533\r
534Returns:\r
535 EFI_SUCCESS - A state bit has been updated successfully\r
536 Others - Access block device error.\r
537\r
538Notes:\r
539 Assume all bits of State are inside the same BYTE. \r
540\r
541 EFI_ABORTED - Read block fail\r
542--*/\r
543;\r
544\r
545EFI_STATUS\r
546FtwGetLastRecord (\r
547 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
548 OUT EFI_FTW_LITE_RECORD **FtwLastRecord\r
549 )\r
550/*++\r
551\r
552Routine Description:\r
553 Get the last Write record pointer. \r
554 The last record is the record whose 'complete' state hasn't been set.\r
555 After all, this header may be a EMPTY header entry for next Allocate. \r
556\r
557Arguments:\r
558 FtwLiteDevice - Private data of this driver\r
559 FtwLastRecord - Pointer to retrieve the last write record\r
560\r
561Returns:\r
562 EFI_SUCCESS - Get the last write record successfully\r
563 EFI_ABORTED - The FTW work space is damaged\r
564\r
565--*/\r
566;\r
567\r
568BOOLEAN\r
569IsErasedFlashBuffer (\r
570 IN BOOLEAN Polarity,\r
571 IN UINT8 *Buffer,\r
572 IN UINTN BufferSize\r
573 )\r
574/*++\r
575\r
576Routine Description:\r
577\r
578 Check whether a flash buffer is erased.\r
579\r
580Arguments:\r
581\r
582 Polarity - All 1 or all 0\r
583 Buffer - Buffer to check\r
584 BufferSize - Size of the buffer\r
585\r
586Returns:\r
587\r
588 Erased or not.\r
589\r
590--*/\r
591;\r
592\r
593EFI_STATUS\r
594InitWorkSpaceHeader (\r
595 IN EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER *WorkingHeader\r
596 )\r
597/*++\r
598\r
599Routine Description:\r
600 Initialize a work space when there is no work space.\r
601\r
602Arguments:\r
603 WorkingHeader - Pointer of working block header \r
604\r
605Returns:\r
606 EFI_SUCCESS - The function completed successfully\r
607 EFI_ABORTED - The function could not complete successfully.\r
608\r
609--*/\r
610;\r
611\r
612EFI_STATUS\r
613WorkSpaceRefresh (\r
614 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice\r
615 )\r
616/*++\r
617\r
618Routine Description:\r
619 Read from working block to refresh the work space in memory.\r
620\r
621Arguments:\r
622 FtwLiteDevice - Point to private data of FTW driver\r
623\r
624Returns:\r
625 EFI_SUCCESS - The function completed successfully\r
626 EFI_ABORTED - The function could not complete successfully.\r
627\r
628--*/\r
629;\r
630\r
631BOOLEAN\r
632IsValidWorkSpace (\r
633 IN EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER *WorkingHeader\r
634 )\r
635/*++\r
636\r
637Routine Description:\r
638 Check to see if it is a valid work space.\r
639\r
640Arguments:\r
641 WorkingHeader - Pointer of working block header \r
642\r
643Returns:\r
644 EFI_SUCCESS - The function completed successfully\r
645 EFI_ABORTED - The function could not complete successfully.\r
646\r
647--*/\r
648;\r
649\r
650EFI_STATUS\r
651CleanupWorkSpace (\r
652 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
653 IN OUT UINT8 *BlockBuffer,\r
654 IN UINTN BufferSize\r
655 )\r
656/*++\r
657\r
658Routine Description:\r
659 Reclaim the work space. Get rid of all the completed write records\r
660 and write records in the Fault Tolerant work space.\r
661\r
662Arguments:\r
663 FtwLiteDevice - Point to private data of FTW driver\r
664 FtwSpaceBuffer - Buffer to contain the reclaimed clean data\r
665 BufferSize - Size of the FtwSpaceBuffer\r
666\r
667Returns:\r
668 EFI_SUCCESS - The function completed successfully\r
669 EFI_BUFFER_TOO_SMALL - The FtwSpaceBuffer is too small\r
670 EFI_ABORTED - The function could not complete successfully.\r
671\r
672--*/\r
673;\r
674\r
675EFI_STATUS\r
676FtwReclaimWorkSpace (\r
677 IN EFI_FTW_LITE_DEVICE *FtwLiteDevice\r
678 )\r
679/*++\r
680\r
681Routine Description:\r
682 Reclaim the work space on the working block.\r
683\r
684Arguments:\r
685 FtwLiteDevice - Point to private data of FTW driver\r
686\r
687Returns:\r
688 EFI_SUCCESS - The function completed successfully\r
689 EFI_OUT_OF_RESOURCES - Allocate memory error\r
690 EFI_ABORTED - The function could not complete successfully\r
691\r
692--*/\r
693;\r
694\r
695#endif\r