TianoCore EDK2 master
Loading...
Searching...
No Matches
MediaSanitize.h
Go to the documentation of this file.
1
9#ifndef MEDIA_SANITIZE_PROTOCOL_H_
10#define MEDIA_SANITIZE_PROTOCOL_H_
11
12#define MEDIA_SANITIZE_PROTOCOL_GUID \
13 { \
14 0x0d799a99, 0x25af, 0x429e, { 0x92, 0x72, 0xd0, 0xb2, 0x7d, 0x6d, 0x5f, 0x14 } \
15 }
16
18
19#define MEDIA_SANITIZE_PROTOCOL_REVISION 0x00010000
20
27#define PURGE_ACTION_NO_ACTION 0x00000000 // No purge action requested
28#define PURGE_ACTION_OVERWRITE 0x00000001 // Overwrite with 32-bit pattern
29#define PURGE_ACTION_BLOCK_ERASE 0x00000002 // Erase Blocks with indeterminate pattern
30#define PURGE_ACTION_CRYPTO_ERASE 0x00000004 // Delete encryption keys only
31#define PURGE_ACTION_RESET_REQUIRED 0x00000008 // Reset required after purge
32#define PURGE_ACTION_NO_DEALLOCATE 0x00000010 // Do no deallocate (trim) flash medai after sanitize
33#define PURGE_ACTION_INVERT_OW_PATTERN 0x00000020 // Invert overwrite pattern between passes
34#define PURGE_ACTION_ALLOW_UNRESTRICTED_SANITIZE_EXIT 0x00000040 // Allow exit without restrictions
35
39#define FORMAT_SES_NO_SECURE_ERASE_REQUESTED 0x0 // No secure erase operation requested
40#define FORMAT_SES_USER_DATA_ERASE 0x1 // User Data Erase
41#define FORMAT_SES_CRYPTOGRAPHIC_ERASE 0x2 // Cryptographic Erase
42
67typedef
69(EFIAPI *BLOCK_MEDIA_CLEAR)(
71 IN UINT32 MediaId,
72 IN UINT32 PassCount,
73 IN VOID *SectorOwBuffer
74 );
75
100typedef
102(EFIAPI *BLOCK_MEDIA_PURGE)(
104 IN UINT32 MediaId,
105 IN UINT32 PurgeAction,
106 IN UINT32 OverwritePattern
107 );
108
132typedef
134(EFIAPI *BLOCK_MEDIA_FORMAT)(
136 IN UINT32 MediaId,
137 IN UINT32 LbaSize,
138 IN UINT32 SecureEraseAction
139 );
140
152 UINT64 Revision;
153
159
165
166 BLOCK_MEDIA_CLEAR MediaClear;
167 BLOCK_MEDIA_PURGE MediaPurge;
168 BLOCK_MEDIA_FORMAT MediaFormat;
169};
170
171extern EFI_GUID gMediaSanitizeProtocolGuid;
172
173#endif
#define IN
Definition: Base.h:279
EFI_STATUS(EFIAPI * BLOCK_MEDIA_PURGE)(IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 PurgeAction, IN UINT32 OverwritePattern)
EFI_STATUS(EFIAPI * BLOCK_MEDIA_FORMAT)(IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 LbaSize, IN UINT32 SecureEraseAction)
EFI_STATUS(EFIAPI * BLOCK_MEDIA_CLEAR)(IN MEDIA_SANITIZE_PROTOCOL *This, IN UINT32 MediaId, IN UINT32 PassCount, IN VOID *SectorOwBuffer)
Definition: MediaSanitize.h:69
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
EFI_BLOCK_IO_MEDIA * Media
Definition: Base.h:213