--- /dev/null
+/** @file\r
+ HDD Password common header file.\r
+\r
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
+\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions\r
+ of the BSD License which accompanies this distribution. The\r
+ full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _HDD_PASSWORD_COMMON_H_\r
+#define _HDD_PASSWORD_COMMON_H_\r
+\r
+//\r
+// The payload length of HDD related ATA commands\r
+//\r
+#define HDD_PAYLOAD 512\r
+\r
+#define ATA_SECURITY_SET_PASSWORD_CMD 0xF1\r
+#define ATA_SECURITY_UNLOCK_CMD 0xF2\r
+#define ATA_SECURITY_FREEZE_LOCK_CMD 0xF5\r
+#define ATA_SECURITY_DIS_PASSWORD_CMD 0xF6\r
+\r
+//\r
+// The max retry count specified in ATA 8 spec.\r
+//\r
+#define MAX_HDD_PASSWORD_RETRY_COUNT 5\r
+\r
+//\r
+// According to ATA spec, the max length of hdd password is 32 bytes\r
+//\r
+#define HDD_PASSWORD_MAX_LENGTH 32\r
+\r
+#define HDD_PASSWORD_DEVICE_INFO_GUID { 0x96d877ad, 0x48af, 0x4b39, { 0x9b, 0x27, 0x4d, 0x97, 0x43, 0x9, 0xae, 0x47 } }\r
+\r
+typedef struct {\r
+ UINT8 Bus;\r
+ UINT8 Device;\r
+ UINT8 Function;\r
+ UINT8 Reserved;\r
+ UINT16 Port;\r
+ UINT16 PortMultiplierPort;\r
+} HDD_PASSWORD_DEVICE;\r
+\r
+//\r
+// It will be used to unlock HDD password for S3.\r
+//\r
+typedef struct {\r
+ HDD_PASSWORD_DEVICE Device;\r
+ CHAR8 Password[HDD_PASSWORD_MAX_LENGTH];\r
+ UINT32 DevicePathLength;\r
+ EFI_DEVICE_PATH_PROTOCOL DevicePath[];\r
+} HDD_PASSWORD_DEVICE_INFO;\r
+\r
+#endif // _HDD_PASSWORD_COMMON_H_\r