]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h
IntelSiliconPkg/IntelVTdDxe: Do global invalidation before boot
[mirror_edk2.git] / IntelSiliconPkg / Feature / VTd / IntelVTdDxe / DmaProtection.h
index 2ec92fe523c395a1b964a73e0e1cbd95395af193..a3331db8f76b8f65aeaff346e51d4d55c7e96dfe 100644 (file)
@@ -1,13 +1,7 @@
 /** @file\r
 \r
-  Copyright (c) 2017 - 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
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -28,6 +22,7 @@
 #include <Library/CacheMaintenanceLib.h>\r
 #include <Library/PerformanceLib.h>\r
 #include <Library/PrintLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
 \r
 #include <Guid/EventGroup.h>\r
 #include <Guid/Acpi.h>\r
@@ -173,6 +168,36 @@ DisableDmar (
   VOID\r
   );\r
 \r
+/**\r
+  Flush VTd engine write buffer.\r
+\r
+  @param[in]  VtdIndex          The index used to identify a VTd engine.\r
+**/\r
+VOID\r
+FlushWriteBuffer (\r
+  IN UINTN  VtdIndex\r
+  );\r
+\r
+/**\r
+  Invalidate VTd context cache.\r
+\r
+  @param[in]  VtdIndex          The index used to identify a VTd engine.\r
+**/\r
+EFI_STATUS\r
+InvalidateContextCache (\r
+  IN UINTN  VtdIndex\r
+  );\r
+\r
+/**\r
+  Invalidate VTd IOTLB.\r
+\r
+  @param[in]  VtdIndex          The index used to identify a VTd engine.\r
+**/\r
+EFI_STATUS\r
+InvalidateIOTLB (\r
+  IN UINTN  VtdIndex\r
+  );\r
+\r
 /**\r
   Invalid VTd global IOTLB.\r
 \r