The internal header file includes the common header files, defines internal structure and functions used by FTW module.
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FaultTolerantWriteSmmDxe.h.
Allocates space for the protocol to maintain information about writes. Since writes must be completed in a fault-tolerant manner and multiple writes require more resources to be successful, this function enables the protocol to ensure that enough space exists to track information about upcoming writes.
- Parameters
-
[in] | This | A pointer to the calling context. |
[in] | CallerId | The GUID identifying the write. |
[in] | PrivateDataSize | The size of the caller's private data that must be recorded for each write. |
[in] | NumberOfWrites | The number of fault tolerant block writes that will need to occur. |
- Return values
-
EFI_SUCCESS | The function completed successfully |
EFI_ABORTED | The function could not complete successfully. |
EFI_ACCESS_DENIED | Not all allocated writes have been completed. All writes must be completed or aborted before another fault tolerant write can occur. |
Allocates space for the protocol to maintain information about writes. Since writes must be completed in a fault tolerant manner and multiple updates will require more resources to be successful, this function enables the protocol to ensure that enough space exists to track information about the upcoming writes.
All writes must be completed or aborted before another fault tolerant write can occur.
- Parameters
-
This | The pointer to this protocol instance. |
CallerId | The GUID identifying the write. |
PrivateDataSize | The size of the caller's private data that must be recorded for each write. |
NumberOfWrites | The number of fault tolerant block writes that will need to occur. |
- Returns
- EFI_SUCCESS The function completed successfully
- Return values
-
EFI_ABORTED | The function could not complete successfully. |
EFI_ACCESS_DENIED | All allocated writes have not been completed. |
Definition at line 71 of file FaultTolerantWrite.c.
Starts a target block update. This function records information about the write in fault-tolerant storage and completes the write in a recoverable manner, ensuring at all times that either the original contents or the modified contents are available.
- Parameters
-
[in] | This | Indicates a pointer to the calling context. |
[out] | CallerId | The GUID identifying the last write. |
[out] | Lba | The logical block address of the last write. |
[out] | Offset | The offset within the block of the last write. |
[out] | Length | The length of the last write. |
[in,out] | PrivateDataSize | On input, the size of the PrivateData buffer. On output, the size of the private data stored for this write. |
[out] | PrivateData | A pointer to a buffer. The function will copy PrivateDataSize bytes from the private data stored for this write. |
[out] | Complete | A Boolean value with TRUE indicating that the write was completed. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | The function could not complete successfully. |
EFI_NOT_FOUND | No allocated writes exist. |
Starts a target block update. This records information about the write in fault tolerant storage and will complete the write in a recoverable manner, ensuring at all times that either the original contents or the modified contents are available.
- Parameters
-
This | The pointer to this protocol instance. |
CallerId | The GUID identifying the last write. |
Lba | The logical block address of the last write. |
Offset | The offset within the block of the last write. |
Length | The length of the last write. |
PrivateDataSize | bytes from the private data stored for this write. |
PrivateData | A pointer to a buffer. The function will copy |
Complete | A Boolean value with TRUE indicating that the write was completed. |
- Return values
-
EFI_SUCCESS | The function completed successfully |
EFI_ABORTED | The function could not complete successfully |
EFI_NOT_FOUND | No allocated writes exist |
EFI_BUFFER_TOO_SMALL | Input buffer is not larget enough |
Definition at line 819 of file FaultTolerantWrite.c.
Starts a target block update. This records information about the write in fault tolerant storage, and will complete the write in a recoverable manner, ensuring at all times that either the original contents or the modified contents are available.
- Parameters
-
[in] | This | The calling context. |
[in] | Lba | The logical block address of the target block. |
[in] | Offset | The offset within the target block to place the data. |
[in] | Length | The number of bytes to write to the target block. |
[in] | PrivateData | A pointer to private data that the caller requires to complete any pending writes in the event of a fault. |
[in] | FvBlockHandle | The handle of FVB protocol that provides services for reading, writing, and erasing the target block. |
[in] | Buffer | The data to write. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | The function could not complete successfully. |
EFI_BAD_BUFFER_SIZE | The write would span a block boundary, which is not a valid action. |
EFI_ACCESS_DENIED | No writes have been allocated. |
EFI_NOT_READY | The last write has not been completed. Restart() must be called to complete it. |
Starts a target block update. This function will record data about write in fault tolerant storage and will complete the write in a recoverable manner, ensuring at all times that either the original contents or the modified contents are available.
- Parameters
-
This | The pointer to this protocol instance. |
Lba | The logical block address of the target block. |
Offset | The offset within the target block to place the data. |
Length | The number of bytes to write to the target block. |
PrivateData | A pointer to private data that the caller requires to complete any pending writes in the event of a fault. |
FvBlockHandle | The handle of FVB protocol that provides services for reading, writing, and erasing the target block. |
Buffer | The data to write. |
- Return values
-
EFI_SUCCESS | The function completed successfully |
EFI_ABORTED | The function could not complete successfully. |
EFI_BAD_BUFFER_SIZE | The input data can't fit within the spare block. Offset + *NumBytes > SpareAreaLength. |
EFI_ACCESS_DENIED | No writes have been allocated. |
EFI_OUT_OF_RESOURCES | Cannot allocate enough memory resource. |
EFI_NOT_FOUND | Cannot find FVB protocol by handle. |
Definition at line 313 of file FaultTolerantWrite.c.