diff options
author | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-12 10:19:50 +0000 |
---|---|---|
committer | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-12 10:19:50 +0000 |
commit | 90398d5558431b733a97ba7e3a2fddcd5f0858f5 (patch) | |
tree | f0a70ef3f45f114bf6a1d119741ac01d2f1b89e4 /MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h | |
parent | ad84df72c7520dba175bafd246bebd5288456544 (diff) | |
download | edk2-90398d5558431b733a97ba7e3a2fddcd5f0858f5.tar.gz edk2-90398d5558431b733a97ba7e3a2fddcd5f0858f5.tar.bz2 edk2-90398d5558431b733a97ba7e3a2fddcd5f0858f5.zip |
Add Tper Reset Logic by using MOR bit.
Signed-off-by: Ouyang, Qian <Qian.Ouyang@intel.com>
Reviewed-by: Tian, Feng <feng.tian@intel.com>
Dong, Guo <Guo.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13727 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h')
-rw-r--r-- | MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h index b64a3d3928..d6b0ff8f08 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h @@ -20,6 +20,7 @@ #include <Uefi.h>
+#include <Guid/MemoryOverwriteControl.h>
#include <Protocol/AtaPassThru.h>
#include <Protocol/BlockIo.h>
#include <Protocol/BlockIo2.h>
@@ -35,6 +36,7 @@ #include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DevicePathLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/TimerLib.h>
#include <IndustryStandard/Atapi.h>
@@ -82,6 +84,21 @@ #define ATA_SUB_TASK_SIGNATURE SIGNATURE_32 ('A', 'S', 'T', 'S')
#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) == 0)
+#define ROUNDUP512(x) (((x) % 512 == 0) ? (x) : ((x) / 512 + 1) * 512)
+
+#define SECURITY_PROTOCOL_TCG 0x02
+#define SECURITY_PROTOCOL_IEEE1667 0xEE
+
+//
+// ATA Supported Security Protocols List Description.
+// Refer to ATA8-ACS Spec 7.57.6.2 Table 69.
+//
+typedef struct {
+ UINT8 Reserved1[6];
+ UINT8 SupportedSecurityListLength[2];
+ UINT8 SupportedSecurityProtocol[1];
+} SUPPORTED_SECURITY_PROTOCOLS_PARAMETER_DATA;
+
//
// ATA bus data structure for ATA controller
//
@@ -1042,4 +1059,20 @@ AtaStorageSecuritySendData ( IN VOID *PayloadBuffer
);
+/**
+ Send TPer Reset command to reset eDrive to lock all protected bands.
+ Typically, there are 2 mechanism for resetting eDrive. They are:
+ 1. TPer Reset through IEEE 1667 protocol.
+ 2. TPer Reset through native TCG protocol.
+ This routine will detect what protocol the attached eDrive comform to, TCG or
+ IEEE 1667 protocol. Then send out TPer Reset command separately.
+
+ @param[in] AtaDevice ATA_DEVICE pointer.
+
+**/
+VOID
+InitiateTPerReset (
+ IN ATA_DEVICE *AtaDevice
+ );
+
#endif
|