]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.h
MdePkg: introduce standalone MM entry point library implementation
[mirror_edk2.git] / SecurityPkg / Tcg / MemoryOverwriteControl / TcgMor.h
index bfad2cf2f0da107f92420a93cd8d04dcd140651f..d717362ffd6efc45fbbe228a604162567ef99b79 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The header file for TcgMor.\r
 \r
-Copyright (c) 2009, 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
+Copyright (c) 2009 - 2018, 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
+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
@@ -20,8 +20,29 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/MemoryOverwriteControl.h>\r
 \r
 #include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/DebugLib.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+\r
+#include <Protocol/StorageSecurityCommand.h>\r
+#include <Protocol/BlockIo.h>\r
+\r
+//\r
+// Supported Security Protocols List Description.\r
+// Refer to ATA8-ACS Spec 7.57.6.2 Table 69 or SPC4 7.7.1.3 Table 511.\r
+//\r
+typedef struct  {\r
+  UINT8                            Reserved1[6];\r
+  UINT8                            SupportedSecurityListLength[2];\r
+  UINT8                            SupportedSecurityProtocol[1];\r
+} SUPPORTED_SECURITY_PROTOCOLS_PARAMETER_DATA;\r
+\r
+#define SECURITY_PROTOCOL_TCG      0x02\r
+#define SECURITY_PROTOCOL_IEEE1667 0xEE\r
+\r
+#define ROUNDUP512(x) (((x) % 512 == 0) ? (x) : ((x) / 512 + 1) * 512)\r
 \r
 #endif\r
 \r