]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
Add BdsLibUserIdentify API in GenericBdsLib
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Library / GenericBdsLib.h
index e2142db1902a003d46271864b2536dc7a12b89bd..8a0311597a98ab7efa6fb0eb03cfaf37a2b08418 100644 (file)
@@ -4,7 +4,7 @@
     2) BDS boot device connect interface\r
     3) BDS Misc interfaces for mainting boot variable, ouput string.\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. <BR>\r
 All rights reserved. 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
@@ -18,6 +18,7 @@ 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
 extern EFI_HANDLE mBdsImageHandle;\r
 \r
 ///\r
@@ -109,8 +110,7 @@ BdsLibBootNext (
   );\r
 \r
 /**\r
-  Process the boot option follow the UEFI specification and\r
-  special treat the legacy boot option with BBS_DEVICE_PATH.\r
+  Process the boot option according to the UEFI specification. The legacy boot option device path includes BBS_DEVICE_PATH.\r
 \r
   @param  Option                 The boot option to be processed\r
   @param  DevicePath             The device path describing where to load the\r
@@ -255,7 +255,8 @@ BdsLibLoadDrivers (
 \r
 \r
 /**\r
-  Process BootOrder, or DriverOrder variables, by calling\r
+  This function processes BootOrder or DriverOrder variables, by calling\r
+\r
   BdsLibVariableToOption () for each UINT16 in the variables.\r
 \r
   @param  BdsCommonOptionList   The header of the option list base on variable\r
@@ -384,7 +385,7 @@ BdsLibConnectAll (
   );\r
 \r
 /**\r
-  This function creates all handles associated with every device\r
+  This function creates all handles associated with the given device\r
   path node. If the handle associated with one device path node can not\r
   be created, then it tries to execute the dispatch to load the missing drivers.  \r
 \r
@@ -430,7 +431,7 @@ BdsLibDisconnectAllEfi (
 //\r
 /**\r
   This function will search every simpletxt device in the current system,\r
-  and make every simpletxt device as pertantial console device.\r
+  and make every simpletxt device a potential console device.\r
 \r
 **/\r
 VOID\r
@@ -566,10 +567,17 @@ typedef struct {
   UINTN   Maxlen;\r
 } POOL_PRINT;\r
 \r
+typedef\r
+VOID\r
+(*DEV_PATH_FUNCTION) (\r
+  IN OUT POOL_PRINT       *Str,\r
+  IN VOID                 *DevPath\r
+  );\r
+\r
 typedef struct {\r
-  UINT8 Type;\r
-  UINT8 SubType;\r
-  VOID (*Function) (POOL_PRINT *, VOID *);\r
+  UINT8             Type;\r
+  UINT8             SubType;\r
+  DEV_PATH_FUNCTION Function;\r
 } DEVICE_PATH_STRING_TABLE;\r
 \r
 extern EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid;\r
@@ -671,7 +679,7 @@ BdsUpdateLegacyDevOrder (
   );\r
 \r
 /**\r
-  Set the boot priority for BBS entries based on boot option entry and boot order.\r
+  Refresh the boot priority for BBS entries based on boot option entry and boot order.\r
 \r
   @param  Entry             The boot option is to be checked for refresh BBS table.\r
   \r
@@ -686,7 +694,7 @@ BdsRefreshBbsTableForBoot (
   );\r
 \r
 /**\r
-  Deletete the Boot Option from EFI Variable. The Boot Order Arrray\r
+  Delete the Boot Option from EFI Variable. The Boot Order Arrray\r
   is also updated.\r
 \r
   @param OptionNumber    The number of Boot option want to be deleted.\r
@@ -822,12 +830,6 @@ SetupResetReminder (
 \r
 #define  BDS_EFI_UNSUPPORT                0xFFFF\r
 \r
-///\r
-/// USB host controller Programming Interface.\r
-///\r
-#define  PCI_CLASSC_PI_UHCI               0x00\r
-#define  PCI_CLASSC_PI_EHCI               0x20\r
-\r
 /**\r
   Check whether an instance in BlockIoDevicePath has the same partition node as the HardDriveDevicePath device path\r
 \r
@@ -849,11 +851,11 @@ MatchPartitionDevicePathNode (
 \r
 /**\r
   Expand a device path that starts with a hard drive media device path node to be a\r
-  full device path that includes the full hardware path to the device. We need\r
-  to do this so it can be booted. As an optimizaiton the front match (the part point\r
-  to the partition node. E.g. ACPI() /PCI()/ATA()/Partition() ) is saved in a variable\r
-  so a connect all is not required on every boot. All successful history device path\r
-  which point to partition node (the front part) will be saved.\r
+  full device path that includes the full hardware path to the device. This function enables the device to boot. \r
+  To avoid requiring a connect on every boot, the front match is saved in a variable (the part point\r
+  to the partition node. E.g. ACPI() /PCI()/ATA()/Partition() ).\r
+  All successful history device paths\r
+  that point to the front part of the partition node will be saved.\r
 \r
   @param  HardDriveDevicePath    EFI Device Path to boot, if it starts with a hard\r
                                  drive media device path.\r
@@ -951,6 +953,21 @@ BdsLibSaveMemoryTypeInformation (
   VOID\r
   );\r
   \r
+/**\r
+  Identify a user and, if authenticated, returns the current user profile handle.\r
+\r
+  @param[out]  User           Point to user profile handle.\r
+  \r
+  @retval EFI_SUCCESS         User is successfully identified, or user identification\r
+                              is not supported.\r
+  @retval EFI_ACCESS_DENIED   User is not successfully identified\r
+\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