2 Routines supporting partition discovery and
5 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials are licensed and made available
8 under the terms and conditions of the BSD License which accompanies this
9 distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include "FatLitePeim.h"
20 This function finds Eltorito partitions. Main algorithm
21 is ported from DXE partition driver.
23 @param[in] PrivateData The global memory map
24 @param[in] ParentBlockDevNo The parent block device
26 @retval TRUE New partitions are detected and logical block devices
27 are added to block device array
28 @retval FALSE No new partitions are added
32 FatFindEltoritoPartitions (
33 IN PEI_FAT_PRIVATE_DATA
*PrivateData
,
34 IN UINTN ParentBlockDevNo
38 This function finds Mbr partitions. Main algorithm
39 is ported from DXE partition driver.
41 @param[in] PrivateData The global memory map
42 @param[in] ParentBlockDevNo The parent block device
44 @retval TRUE New partitions are detected and logical block devices
45 are added to block device array
46 @retval FALSE No new partitions are added
50 FatFindMbrPartitions (
51 IN PEI_FAT_PRIVATE_DATA
*PrivateData
,
52 IN UINTN ParentBlockDevNo
56 This function finds partitions (logical devices) in physical block devices.
58 @param PrivateData Global memory map for accessing global variables.
63 IN PEI_FAT_PRIVATE_DATA
*PrivateData
72 for (Index
= 0; Index
< PrivateData
->BlockDeviceCount
; Index
++) {
73 if (!PrivateData
->BlockDevice
[Index
].PartitionChecked
) {
74 Found
= FatFindMbrPartitions (PrivateData
, Index
);
76 Found
= FatFindEltoritoPartitions (PrivateData
, Index
);
80 } while (Found
&& PrivateData
->BlockDeviceCount
<= PEI_FAT_MAX_BLOCK_DEVICE
);