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