]> code.delx.au - refind/blobdiff - EfiLib/GenericBdsLib.h
BIOS-mode boot support now works when compiled with GNU-EFI
[refind] / EfiLib / GenericBdsLib.h
index b4c9225daaf8d94c6964fddc3cf8283a565c1535..d4958c4ec00f48bb5ba3969f30e2f71e1c919848 100644 (file)
@@ -18,7 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef _GENERIC_BDS_LIB_H_\r
 #define _GENERIC_BDS_LIB_H_\r
 \r
-#include <Protocol/UserManager.h>\r
+#ifdef __MAKEWITH_GNUEFI\r
+#include "gnuefi-helper.h"\r
+#endif\r
+\r
+//#include <Protocol/UserManager.h>\r
 \r
 ///\r
 /// Constants which are variable names used to access variables.\r
@@ -70,7 +74,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // This data structure is the part of BDS_CONNECT_ENTRY\r
 //\r
+#ifdef __MAKEWITH_TIANO\r
 #define BDS_LOAD_OPTION_SIGNATURE SIGNATURE_32 ('B', 'd', 'C', 'O')\r
+#else\r
+#define BDS_LOAD_OPTION_SIGNATURE EFI_SIGNATURE_32 ('B', 'd', 'C', 'O')\r
+#endif\r
 \r
 typedef struct {\r
 \r
@@ -290,7 +298,6 @@ BdsLibBuildOptionFromVar (
 \r
 **/\r
 VOID *\r
-EFIAPI\r
 BdsLibGetVariableAndSize (\r
   IN  CHAR16              *Name,\r
   IN  EFI_GUID            *VendorGuid,\r
@@ -309,12 +316,12 @@ BdsLibGetVariableAndSize (
   @retval EFI_STATUS            Return the status of the ConOut->OutputString ().\r
 \r
 **/\r
-EFI_STATUS\r
-EFIAPI\r
-BdsLibOutputStrings (\r
-  IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *ConOut,\r
-  ...\r
-  );\r
+// EFI_STATUS\r
+// EFIAPI\r
+// BdsLibOutputStrings (\r
+//   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *ConOut,\r
+//   ...\r
+//   );\r
 \r
 /**\r
   Build the boot#### or driver#### option from the VariableName. The\r
@@ -330,60 +337,11 @@ BdsLibOutputStrings (
 \r
 **/\r
 BDS_COMMON_OPTION *\r
-EFIAPI\r
 BdsLibVariableToOption (\r
   IN OUT LIST_ENTRY                   *BdsCommonOptionList,\r
   IN  CHAR16                          *VariableName\r
   );\r
 \r
-/**\r
-  This function registers the new boot#### or driver#### option based on\r
-  the VariableName. The new registered boot#### or driver#### will be linked\r
-  to BdsOptionList and also update to the VariableName. After the boot#### or\r
-  driver#### updated, the BootOrder or DriverOrder will also be updated.\r
-\r
-  @param  BdsOptionList         The header of the boot#### or driver#### link list.\r
-  @param  DevicePath            The device path that the boot#### or driver####\r
-                                option present.\r
-  @param  String                The description of the boot#### or driver####.\r
-  @param  VariableName          Indicate if the boot#### or driver#### option.\r
-\r
-  @retval EFI_SUCCESS           The boot#### or driver#### have been successfully\r
-                                registered.\r
-  @retval EFI_STATUS            Return the status of gRS->SetVariable ().\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-BdsLibRegisterNewOption (\r
-  IN  LIST_ENTRY                     *BdsOptionList,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL       *DevicePath,\r
-  IN  CHAR16                         *String,\r
-  IN  CHAR16                         *VariableName\r
-  );\r
-\r
-//\r
-// Bds connect and disconnect driver lib funcions\r
-//\r
-/**\r
-  This function connects all system drivers with the corresponding controllers. \r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-BdsLibConnectAllDriversToAllControllers (\r
-  VOID\r
-  );\r
-\r
-/**\r
-  This function connects all system drivers to controllers.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-BdsLibConnectAll (\r
-  VOID\r
-  );\r
 \r
 /**\r
   This function creates all handles associated with the given device\r
@@ -400,55 +358,10 @@ BdsLibConnectAll (
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 BdsLibConnectDevicePath (\r
   IN EFI_DEVICE_PATH_PROTOCOL  *DevicePathToConnect\r
   );\r
 \r
-/**\r
-  This function will connect all current system handles recursively.     \r
-  gBS->ConnectController() service is invoked for each handle exist in system handler buffer.  \r
-  If the handle is bus type handler, all childrens also will be connected recursively  by gBS->ConnectController().\r
-  \r
-  @retval EFI_SUCCESS           All handles and child handles have been\r
-                                connected.  \r
-  @retval EFI_STATUS            Return the status of gBS->LocateHandleBuffer().\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-BdsLibConnectAllEfi (\r
-  VOID\r
-  );\r
-\r
-/**\r
-  This function will disconnect all current system handles.     \r
-  gBS->DisconnectController() is invoked for each handle exists in system handle buffer.  \r
-  If handle is a bus type handle, all childrens also are disconnected recursively by  gBS->DisconnectController().\r
-  \r
-  @retval EFI_SUCCESS           All handles have been disconnected.\r
-  @retval EFI_STATUS            Error status returned by of gBS->LocateHandleBuffer().\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-BdsLibDisconnectAllEfi (\r
-  VOID\r
-  );\r
-\r
-//\r
-// Bds console related lib functions\r
-//\r
-/**\r
-  This function will search every simpletxt device in the current system,\r
-  and make every simpletxt device a potential console device.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-BdsLibConnectAllConsoles (\r
-  VOID\r
-  );\r
-\r
 \r
 /**\r
   This function will connect console device based on the console\r
@@ -568,6 +481,7 @@ DevicePathToStr (
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   );\r
 \r
+#ifdef __MAKEWITH_TIANO\r
 //\r
 // Internal definitions\r
 //\r
@@ -576,6 +490,7 @@ typedef struct {
   UINTN   Len;\r
   UINTN   Maxlen;\r
 } POOL_PRINT;\r
+#endif\r
 \r
 typedef\r
 VOID\r
@@ -627,7 +542,6 @@ typedef struct {
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 BdsDeleteAllInvalidLegacyBootOptions (\r
   VOID\r
   );\r
@@ -642,7 +556,6 @@ BdsDeleteAllInvalidLegacyBootOptions (
   @return Other value          LegacyBoot options are not added.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 BdsAddNonExistingLegacyBootOptions (\r
   VOID\r
   );\r
@@ -691,7 +604,6 @@ BdsRefreshBbsTableForBoot (
   @retval  EFI_NOT_FOUND         The Boot Option Variable was not found.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 BdsDeleteBootOption (\r
   IN UINTN                       OptionNumber,\r
   IN OUT UINT16                  *BootOrder,\r
@@ -964,11 +876,11 @@ BdsLibSaveMemoryTypeInformation (
   @retval EFI_ACCESS_DENIED   The user was not successfully identified.\r
 \r
 **/\r
-EFI_STATUS\r
-EFIAPI\r
-BdsLibUserIdentify (\r
-  OUT EFI_USER_PROFILE_HANDLE         *User\r
-  );  \r
+// EFI_STATUS\r
+// EFIAPI\r
+// BdsLibUserIdentify (\r
+//   OUT EFI_USER_PROFILE_HANDLE         *User\r
+//   );  \r
 \r
 /**\r
   This function checks if a Fv file device path is valid, according to a file GUID. If it is invalid,\r