]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/QemuFwCfgLib: move InternalQemuFwCfgIsAvailable() to lib instances
authorLaszlo Ersek <lersek@redhat.com>
Wed, 30 Nov 2016 09:22:30 +0000 (10:22 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Mon, 5 Dec 2016 18:44:34 +0000 (19:44 +0100)
InternalQemuFwCfgIsAvailable() is an API that is incorrectly exposed by
the "OvmfPkg/Include/Library/QemuFwCfgLib.h" library class header; the API
is meant to be used internally to library instances (if it's needed at
all).

In OvmfPkg, we have two lib instances (for SEC and PEI/DXE); they provide
different implementations of InternalQemuFwCfgIsAvailable(), for the
shared file "OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c". Move the API
declaration to a new internal header called "QemuFwCfgLibInternal.h", and
drop EFIAPI in the process.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/Include/Library/QemuFwCfgLib.h
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h [new file with mode: 0644]
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPeiDxe.c
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf

index baaa257d6188ece06ef4cd7815fd265e8cc946ff..7c29422fbd722c0d3b7c41e1b3f99fc0c23cb350 100644 (file)
@@ -205,22 +205,6 @@ QemuFwCfgFindFile (
   );\r
 \r
 \r
-/**\r
-  Returns a boolean indicating if the firmware configuration interface is\r
-  available for library-internal purposes.\r
-\r
-  This function never changes fw_cfg state.\r
-\r
-  @retval    TRUE   The interface is available internally.\r
-  @retval    FALSE  The interface is not available internally.\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-InternalQemuFwCfgIsAvailable (\r
-  VOID\r
-  );\r
-\r
-\r
 /**\r
   Determine if S3 support is explicitly enabled.\r
 \r
index 5c96d2af2532aafd2cb9b73f5c9ce1a0a28a1d9c..804d5b0e42be372c284836584e5b243a8c184678 100644 (file)
@@ -22,6 +22,8 @@
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 \r
+#include "QemuFwCfgLibInternal.h"\r
+\r
 \r
 /**\r
   Reads an 8-bit I/O port fifo into a block of memory.\r
index a95e1e730c2c130ecb18954e586e3cecc409f5cf..66ac778509151954b47bf09bd666cd82fbdb923a 100644 (file)
@@ -32,6 +32,7 @@
 #\r
 \r
 [Sources]\r
+  QemuFwCfgLibInternal.h\r
   QemuFwCfgLib.c\r
   QemuFwCfgPeiDxe.c\r
 \r
diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
new file mode 100644 (file)
index 0000000..5b162bf
--- /dev/null
@@ -0,0 +1,33 @@
+/** @file\r
+  Internal interfaces specific to the QemuFwCfgLib instances in OvmfPkg.\r
+\r
+  Copyright (C) 2016, Red Hat, Inc.\r
+\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  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, WITHOUT\r
+  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __QEMU_FW_CFG_LIB_INTERNAL_H__\r
+#define __QEMU_FW_CFG_LIB_INTERNAL_H__\r
+\r
+/**\r
+  Returns a boolean indicating if the firmware configuration interface is\r
+  available for library-internal purposes.\r
+\r
+  This function never changes fw_cfg state.\r
+\r
+  @retval    TRUE   The interface is available internally.\r
+  @retval    FALSE  The interface is not available internally.\r
+**/\r
+BOOLEAN\r
+InternalQemuFwCfgIsAvailable (\r
+  VOID\r
+  );\r
+\r
+#endif\r
index f693cff29e012c03a960e274f57ae4e52047690f..88d88c0edf69ef67dc5f10fd87249fc021f0f83c 100644 (file)
@@ -17,6 +17,8 @@
 #include <Library/DebugLib.h>\r
 #include <Library/QemuFwCfgLib.h>\r
 \r
+#include "QemuFwCfgLibInternal.h"\r
+\r
 STATIC BOOLEAN mQemuFwCfgSupported = FALSE;\r
 \r
 \r
@@ -83,7 +85,6 @@ QemuFwCfgInitialize (
   @retval    FALSE  The interface is not available internally.\r
 **/\r
 BOOLEAN\r
-EFIAPI\r
 InternalQemuFwCfgIsAvailable (\r
   VOID\r
   )\r
index 88c32ce89a72a7e23f61bdca8f573919041a7721..56c59ca3f01d6b6b33876163a895643741dfa916 100644 (file)
@@ -19,6 +19,7 @@
 #include <Library/DebugLib.h>\r
 #include <Library/QemuFwCfgLib.h>\r
 \r
+#include "QemuFwCfgLibInternal.h"\r
 \r
 /**\r
   Returns a boolean indicating if the firmware configuration interface\r
@@ -67,7 +68,6 @@ QemuFwCfgIsAvailable (
   @retval    FALSE  The interface is not available internally.\r
 **/\r
 BOOLEAN\r
-EFIAPI\r
 InternalQemuFwCfgIsAvailable (\r
   VOID\r
   )\r
index 03a659c9b082f0be81891a16ce9fb061b85bf41f..c1d6a54b1a399c1452ff8c29b49080fa478dc7e2 100644 (file)
@@ -30,6 +30,7 @@
 #\r
 \r
 [Sources]\r
+  QemuFwCfgLibInternal.h\r
   QemuFwCfgLib.c\r
   QemuFwCfgSec.c\r
 \r