IN UINTN ParentBlockDevNo\r
);\r
\r
+/**\r
+ This function is used for finding GPT partition on block device.\r
+ As follow UEFI spec we should check protective MBR first and then\r
+ try to check both primary/backup GPT structures.\r
+\r
+ @param[in] PrivateData The global memory map\r
+ @param[in] ParentBlockDevNo The parent block device\r
+\r
+ @retval TRUE New partitions are detected and logical block devices\r
+ are added to block device array\r
+ @retval FALSE No new partitions are added\r
+\r
+**/\r
+BOOLEAN\r
+FatFindGptPartitions (\r
+ IN PEI_FAT_PRIVATE_DATA *PrivateData,\r
+ IN UINTN ParentBlockDevNo\r
+ );\r
+\r
/**\r
This function finds partitions (logical devices) in physical block devices.\r
\r
\r
for (Index = 0; Index < PrivateData->BlockDeviceCount; Index++) {\r
if (!PrivateData->BlockDevice[Index].PartitionChecked) {\r
- Found = FatFindMbrPartitions (PrivateData, Index);\r
- if (!Found) {\r
- Found = FatFindEltoritoPartitions (PrivateData, Index);\r
+ if (FatFindGptPartitions (PrivateData, Index)) {\r
+ Found = TRUE;\r
+ continue;\r
+ }\r
+\r
+ if (FatFindMbrPartitions (PrivateData, Index)) {\r
+ Found = TRUE;\r
+ continue;\r
+ }\r
+\r
+ if (FatFindEltoritoPartitions (PrivateData, Index)) {\r
+ Found = TRUE;\r
+ continue;\r
}\r
}\r
}\r
} while (Found && PrivateData->BlockDeviceCount <= PEI_FAT_MAX_BLOCK_DEVICE);\r
}\r
-\r