]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/SmmIoLib: Add header file.
authorJiewen Yao <jiewen.yao@intel.com>
Wed, 15 Mar 2017 09:23:01 +0000 (17:23 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Wed, 26 Apr 2017 01:22:17 +0000 (09:22 +0800)
This SmmIoLib is used to check if an IO resource
is valid in SMM.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
MdePkg/Include/Library/SmmIoLib.h [new file with mode: 0644]

diff --git a/MdePkg/Include/Library/SmmIoLib.h b/MdePkg/Include/Library/SmmIoLib.h
new file mode 100644 (file)
index 0000000..7820f1e
--- /dev/null
@@ -0,0 +1,42 @@
+/** @file\r
+  Provides services for SMM IO Operation.\r
+\r
+  The SMM IO Library provides function for checking if IO resource is accessible inside of SMM.\r
+\r
+  Copyright (c) 2017, 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
+\r
+**/\r
+\r
+#ifndef _SMM_IO_LIB_H_\r
+#define _SMM_IO_LIB_H_\r
+\r
+/**\r
+  This function check if the MMIO resource is valid per processor architecture and\r
+  valid per platform design.\r
+\r
+  @param BaseAddress  The MMIO start address to be checked.\r
+  @param Length       The MMIO length to be checked.\r
+  @param Owner        A GUID representing the owner of the resource.\r
+                      This GUID may be used by producer to correlate the device ownership of the resource.\r
+                      NULL means no specific owner.\r
+\r
+  @retval TRUE  This MMIO resource is valid per processor architecture and valid per platform design.\r
+  @retval FALSE This MMIO resource is not valid per processor architecture or valid per platform design.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+SmmIsMmioValid (\r
+  IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
+  IN UINT64                Length,\r
+  IN EFI_GUID              *Owner  OPTIONAL\r
+  );\r
+\r
+#endif\r
+\r