This file defines common data structures, macro definitions and some module\r
internal function header files.\r
\r
- Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The 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
+ Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
\r
#include <Uefi.h>\r
\r
-#include <Guid/MemoryOverwriteControl.h>\r
#include <Protocol/AtaPassThru.h>\r
#include <Protocol/BlockIo.h>\r
#include <Protocol/BlockIo2.h>\r
#define ATA_SUB_TASK_SIGNATURE SIGNATURE_32 ('A', 'S', 'T', 'S')\r
#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) == 0)\r
\r
-#define ROUNDUP512(x) (((x) % 512 == 0) ? (x) : ((x) / 512 + 1) * 512)\r
-\r
-#define SECURITY_PROTOCOL_TCG 0x02\r
-#define SECURITY_PROTOCOL_IEEE1667 0xEE\r
-\r
-//\r
-// ATA Supported Security Protocols List Description.\r
-// Refer to ATA8-ACS Spec 7.57.6.2 Table 69.\r
-//\r
-typedef struct {\r
- UINT8 Reserved1[6];\r
- UINT8 SupportedSecurityListLength[2];\r
- UINT8 SupportedSecurityProtocol[1];\r
-} SUPPORTED_SECURITY_PROTOCOLS_PARAMETER_DATA;\r
-\r
//\r
// ATA bus data structure for ATA controller\r
//\r
@retval EFI_SUCCESS The device was started.\r
@retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
- @retval Others The driver failded to start the device.\r
+ @retval Others The driver failed to start the device.\r
\r
**/\r
EFI_STATUS\r
@retval EFI_SUCCESS The data was read correctly from the device.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the read.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
@retval EFI_WRITE_PROTECTED The device can not be written to.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
);\r
\r
/**\r
- Reset the Block Device throught Block I/O2 protocol.\r
+ Reset the Block Device through Block I/O2 protocol.\r
\r
@param[in] This Indicates a pointer to the calling context.\r
@param[in] ExtendedVerification Driver may perform diagnostics on reset.\r
@retval EFI_WRITE_PROTECTED The device can not be written to.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
Typically, there are 2 mechanism for resetting eDrive. They are:\r
1. TPer Reset through IEEE 1667 protocol.\r
2. TPer Reset through native TCG protocol.\r
- This routine will detect what protocol the attached eDrive comform to, TCG or\r
+ This routine will detect what protocol the attached eDrive conform to, TCG or\r
IEEE 1667 protocol. Then send out TPer Reset command separately.\r
\r
@param[in] AtaDevice ATA_DEVICE pointer.\r