TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _MEDIA_SANITIZE_PROTOCOL |
Macros | |
#define | MEDIA_SANITIZE_PROTOCOL_GUID |
#define | MEDIA_SANITIZE_PROTOCOL_REVISION 0x00010000 |
#define | PURGE_ACTION_NO_ACTION 0x00000000 |
#define | PURGE_ACTION_OVERWRITE 0x00000001 |
#define | PURGE_ACTION_BLOCK_ERASE 0x00000002 |
#define | PURGE_ACTION_CRYPTO_ERASE 0x00000004 |
#define | PURGE_ACTION_RESET_REQUIRED 0x00000008 |
#define | PURGE_ACTION_NO_DEALLOCATE 0x00000010 |
#define | PURGE_ACTION_INVERT_OW_PATTERN 0x00000020 |
#define | PURGE_ACTION_ALLOW_UNRESTRICTED_SANITIZE_EXIT 0x00000040 |
#define | FORMAT_SES_NO_SECURE_ERASE_REQUESTED 0x0 |
#define | FORMAT_SES_USER_DATA_ERASE 0x1 |
#define | FORMAT_SES_CRYPTOGRAPHIC_ERASE 0x2 |
Typedefs | |
typedef struct _MEDIA_SANITIZE_PROTOCOL | MEDIA_SANITIZE_PROTOCOL |
typedef EFI_STATUS(EFIAPI * | BLOCK_MEDIA_CLEAR) (IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 PassCount, IN VOID *SectorOwBuffer) |
typedef EFI_STATUS(EFIAPI * | BLOCK_MEDIA_PURGE) (IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 PurgeAction, IN UINT32 OverwritePattern) |
typedef EFI_STATUS(EFIAPI * | BLOCK_MEDIA_FORMAT) (IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 LbaSize, IN UINT32 SecureEraseAction) |
Variables | |
EFI_GUID | gMediaSanitizeProtocolGuid |
This file defines the Media Sanitize Protocol.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file MediaSanitize.h.
#define FORMAT_SES_CRYPTOGRAPHIC_ERASE 0x2 |
Definition at line 41 of file MediaSanitize.h.
#define FORMAT_SES_NO_SECURE_ERASE_REQUESTED 0x0 |
Secure erase action for media format operation
Definition at line 39 of file MediaSanitize.h.
#define FORMAT_SES_USER_DATA_ERASE 0x1 |
Definition at line 40 of file MediaSanitize.h.
#define MEDIA_SANITIZE_PROTOCOL_GUID |
Definition at line 12 of file MediaSanitize.h.
#define MEDIA_SANITIZE_PROTOCOL_REVISION 0x00010000 |
Definition at line 19 of file MediaSanitize.h.
#define PURGE_ACTION_ALLOW_UNRESTRICTED_SANITIZE_EXIT 0x00000040 |
Definition at line 34 of file MediaSanitize.h.
#define PURGE_ACTION_BLOCK_ERASE 0x00000002 |
Definition at line 29 of file MediaSanitize.h.
#define PURGE_ACTION_CRYPTO_ERASE 0x00000004 |
Definition at line 30 of file MediaSanitize.h.
#define PURGE_ACTION_INVERT_OW_PATTERN 0x00000020 |
Definition at line 33 of file MediaSanitize.h.
#define PURGE_ACTION_NO_ACTION 0x00000000 |
Sanitize actions for purge operation.
NOTE: First four actions (no action, overwrite, block erase, crypto erase) cannot be overlapped. All other fields may be overlapped as they apply.
Definition at line 27 of file MediaSanitize.h.
#define PURGE_ACTION_NO_DEALLOCATE 0x00000010 |
Definition at line 32 of file MediaSanitize.h.
#define PURGE_ACTION_OVERWRITE 0x00000001 |
Definition at line 28 of file MediaSanitize.h.
#define PURGE_ACTION_RESET_REQUIRED 0x00000008 |
Definition at line 31 of file MediaSanitize.h.
typedef EFI_STATUS(EFIAPI * BLOCK_MEDIA_CLEAR) (IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 PassCount, IN VOID *SectorOwBuffer) |
Clear Media utilizes transport native WRITE commands to write a fixed pattern of non-sensitive data. The size of the overwrite buffer shall be equal to the one sector/LBA (in bytes).
NOTE: This function must be called from TPL aaplication or callback.
[in] | This | Indicates a pointer to the calling context. |
[in] | MediaId | The media ID that the clear request is for. |
[in] | PassCount | Number of passes to write over the media. |
[in] | SectorOwBuffer | Pointer to overwrite pattern buffer. |
EFI_SUCCESS | The media clear request completed successfully on the device. |
EFI_WRITE_PROTECTED | The device can't be cleared due to write protection. |
EFI_DEVICE_ERROR | The device reported an error while attempting to perform the clear operation. |
EFI_INVALID_PARAMETER | The clear request contains parameters that are not valid. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
Definition at line 68 of file MediaSanitize.h.
typedef EFI_STATUS(EFIAPI * BLOCK_MEDIA_FORMAT) (IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 LbaSize, IN UINT32 SecureEraseAction) |
Format Media utilizes native format operations to modify sector/LBA size. Secure erase actions are used to define how latent user data is erased.
NOTE: This function must be called from TPL aaplication or callback.
[in] | This | Indicates a pointer to the calling context. |
[in] | MediaId | The media ID that the clear request is for. |
[in] | LbaSize | Size of LBA (in terms of power of two: 2^n). |
[in] | SecureEraseAction | Secure erase action, if any, to apply to format. |
EFI_SUCCESS | The media format request comopleted successfully on the device. |
EFI_WRITE_PROTECTED | The device can't be formatted due to write protection. |
EFI_DEVICE_ERROR | The device reported an error while attempting to perform the format operation. |
EFI_INVALID_PARAMETER | The format request contains parameters that are not valid. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
Definition at line 133 of file MediaSanitize.h.
typedef EFI_STATUS(EFIAPI * BLOCK_MEDIA_PURGE) (IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 PurgeAction, IN UINT32 OverwritePattern) |
Purge Media utilizes native Sanitize operations. Transport specific overwrite, block erase, or crypto erase functions shall be invoked based on transport.
NOTE: This function must be called from TPL aaplication or callback.
[in] | This | Indicates a pointer to the calling context. |
[in] | MediaId | The media ID that the clear request is for. |
[in] | PurgeAction | Purge action: overwrite, crypto or block erase. |
[in] | OverwritePattern | 32-bit pattern to overwrite on media. |
EFI_SUCCESS | The media purge request completed successfully on the device. |
EFI_WRITE_PROTECTED | The device can't be purged due to write protection. |
EFI_DEVICE_ERROR | The device reported an error while attempting to perform the purge operation. |
EFI_INVALID_PARAMETER | The purge request contains parameters that are not valid. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
Definition at line 101 of file MediaSanitize.h.
typedef struct _MEDIA_SANITIZE_PROTOCOL MEDIA_SANITIZE_PROTOCOL |
Definition at line 17 of file MediaSanitize.h.