#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
//\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
IN OUT LIST_ENTRY *BdsBootOptionList\r
);\r
\r
-//\r
-// Bds misc lib functions\r
-//\r
-/**\r
- Get boot mode by looking up the configuration table and parsing the HOB list.\r
-\r
- @param BootMode The boot mode from PEI handoff HOB.\r
-\r
- @retval EFI_SUCCESS Successfully got boot mode.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-BdsLibGetBootMode (\r
- OUT EFI_BOOT_MODE *BootMode\r
- );\r
-\r
\r
/**\r
The function will go through the driver option link list, and then load and start\r
\r
**/\r
VOID *\r
-EFIAPI\r
BdsLibGetVariableAndSize (\r
IN CHAR16 *Name,\r
IN EFI_GUID *VendorGuid,\r
@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
\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
\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
+// Bds connect and disconnect driver lib funcions\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
+ This function connects all system drivers with the corresponding controllers. \r
\r
-**/\r
+ **/\r
VOID\r
EFIAPI\r
-BdsLibConnectAllConsoles (\r
- VOID\r
- );\r
-\r
+BdsLibConnectAllDriversToAllControllers (\r
+ VOID\r
+);\r
\r
/**\r
This function will connect console device based on the console\r
IN EFI_DEVICE_PATH_PROTOCOL *DevPath\r
);\r
\r
+#ifdef __MAKEWITH_TIANO\r
//\r
// Internal definitions\r
//\r
UINTN Len;\r
UINTN Maxlen;\r
} POOL_PRINT;\r
+#endif\r
\r
typedef\r
VOID\r
\r
**/\r
EFI_STATUS\r
-EFIAPI\r
BdsDeleteAllInvalidLegacyBootOptions (\r
VOID\r
);\r
@return Other value LegacyBoot options are not added.\r
**/\r
EFI_STATUS\r
-EFIAPI\r
BdsAddNonExistingLegacyBootOptions (\r
VOID\r
);\r
@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
@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