]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
Fix BDS limitation of two "EFI DVD/CDROM" options appear after plug two CD-ROM.
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Library / GenericBdsLib.h
index f7224f60c88a07e28a965cdf6344ee0d6091d8f3..c1cc82de2bba23b8597287c11cd24860db4614cc 100644 (file)
@@ -768,6 +768,26 @@ SetupResetReminder (
   VOID\r
   );\r
 \r
+\r
+//\r
+// Define the boot option default description \r
+// NOTE: This is not defined in UEFI spec.\r
+//\r
+#define DESCRIPTION_FLOPPY        L"EFI Floppy"\r
+#define DESCRIPTION_FLOPPY_NUM    L"EFI Floppy %d"\r
+#define DESCRIPTION_DVD           L"EFI DVD/CDROM"\r
+#define DESCRIPTION_DVD_NUM       L"EFI DVD/CDROM %d"\r
+#define DESCRIPTION_USB           L"EFI USB Device"\r
+#define DESCRIPTION_USB_NUM       L"EFI USB Device %d"\r
+#define DESCRIPTION_SCSI          L"EFI SCSI Device"\r
+#define DESCRIPTION_SCSI_NUM      L"EFI SCSI Device %d"\r
+#define DESCRIPTION_MISC          L"EFI Misc Device"\r
+#define DESCRIPTION_MISC_NUM      L"EFI Misc Device %d"\r
+#define DESCRIPTION_NETWORK       L"EFI Network"\r
+#define DESCRIPTION_NETWORK_NUM   L"EFI Network %d"       \r
+#define DESCRIPTION_NON_BLOCK     L"EFI Non-Block Boot Device"\r
+#define DESCRIPTION_NON_BLOCK_NUM L"EFI Non-Block Boot Device %d"\r
+\r
 //\r
 // Define the boot type which to classify the boot option type\r
 // Different boot option type could have different boot behavior\r
@@ -785,6 +805,7 @@ SetupResetReminder (
 #define  BDS_EFI_MESSAGE_ATAPI_BOOT       0x0301 // Type 03; Sub-Type 01\r
 #define  BDS_EFI_MESSAGE_SCSI_BOOT        0x0302 // Type 03; Sub-Type 02\r
 #define  BDS_EFI_MESSAGE_USB_DEVICE_BOOT  0x0305 // Type 03; Sub-Type 05\r
+#define  BDS_EFI_MESSAGE_SATA_BOOT        0x0318 // Type 03; Sub-Type 18\r
 #define  BDS_EFI_MESSAGE_MISC_BOOT        0x03FF\r
 //\r
 // Media boot type\r
@@ -881,7 +902,30 @@ BdsLibIsValidEFIBootOptDevicePath (
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath,\r
   IN BOOLEAN                      CheckMedia\r
   );\r
-  \r
+\r
+/**\r
+  Check whether the Device path in a boot option point to a valid bootable device,\r
+  And if CheckMedia is true, check the device is ready to boot now.\r
+  If Description is not NULL and the device path point to a fixed BlockIo\r
+  device, check the description whether conflict with other auto-created\r
+  boot options.\r
+\r
+  @param  DevPath     the Device path in a boot option\r
+  @param  CheckMedia  if true, check the device is ready to boot now.\r
+  @param  Description the description in a boot option\r
+\r
+  @retval TRUE        the Device path  is valid\r
+  @retval FALSE       the Device path  is invalid .\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+BdsLibIsValidEFIBootOptDevicePathExt (\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *DevPath,\r
+  IN BOOLEAN                      CheckMedia,\r
+  IN CHAR16                       *Description\r
+  );\r
+\r
 /**\r
   For a bootable Device path, return its boot type.\r
 \r