#include "Partition.h"\r
\r
\r
+/**\r
+ Install child handles if the Handle supports GPT partition structure.\r
+\r
+ @param[in] BlockIo Parent BlockIo interface\r
+ @param[in] DiskIo Disk Io protocol.\r
+ @param[in] Lba The starting Lba of the Partition Table\r
+ @param[out] PartHeader Stores the partition table that is read\r
+\r
+ @retval TRUE The partition table is valid\r
+ @retval FALSE The partition table is not valid\r
+\r
+**/\r
BOOLEAN\r
PartitionValidGptTable (\r
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r
);\r
\r
\r
+/**\r
+ Check if the CRC field in the Partition table header is valid\r
+ for Partition entry array.\r
+\r
+ @param[in] BlockIo Parent BlockIo interface\r
+ @param[in] DiskIo Disk Io Protocol.\r
+ @param[in] PartHeader Partition table header structure\r
+\r
+ @retval TRUE the CRC is valid\r
+ @retval FALSE the CRC is invalid\r
+\r
+**/\r
BOOLEAN\r
PartitionCheckGptEntryArrayCRC (\r
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r
);\r
\r
\r
+/**\r
+ Restore Partition Table to its alternate place\r
+ (Primary -> Backup or Backup -> Primary)\r
+\r
+ @param[in] BlockIo Parent BlockIo interface\r
+ @param[in] DiskIo Disk Io Protocol.\r
+ @param[in] PartHeader Partition table header structure\r
+\r
+ @retval TRUE Restoring succeeds\r
+ @retval FALSE Restoring failed\r
+\r
+**/\r
BOOLEAN\r
PartitionRestoreGptTable (\r
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r
);\r
\r
\r
+/**\r
+ Restore Partition Table to its alternate place\r
+ (Primary -> Backup or Backup -> Primary)\r
+\r
+ @param[in] PartHeader Partition table header structure\r
+ @param[in] PartEntry The partition entry array\r
+ @param[out] PEntryStatus the partition entry status array \r
+ recording the status of each partition\r
+\r
+**/\r
VOID\r
PartitionCheckGptEntry (\r
IN EFI_PARTITION_TABLE_HEADER *PartHeader,\r
);\r
\r
\r
+/**\r
+ Checks the CRC32 value in the table header\r
+\r
+ @param MaxSize Max Size limit\r
+ @param Size The size of the table\r
+ @param Hdr Table to check\r
+\r
+ @return TRUE CRC Valid\r
+ @return FALSE CRC Invalid\r
+\r
+**/\r
BOOLEAN\r
PartitionCheckCrcAltSize (\r
IN UINTN MaxSize,\r
);\r
\r
\r
+/**\r
+ Checks the CRC32 value in the table header\r
+\r
+ @param MaxSize Max Size limit\r
+ @param Hdr Table to check\r
+\r
+ @return TRUE CRC Valid\r
+ @return FALSE CRC Invalid\r
+\r
+**/\r
BOOLEAN\r
PartitionCheckCrc (\r
IN UINTN MaxSize,\r
);\r
\r
\r
+/**\r
+ Updates the CRC32 value in the table header\r
+\r
+ @param Size The size of the table\r
+ @param Hdr Table to update\r
+\r
+**/\r
VOID\r
PartitionSetCrcAltSize (\r
IN UINTN Size,\r
);\r
\r
\r
+/**\r
+ Updates the CRC32 value in the table header\r
+\r
+ @param Hdr Table to update\r
+\r
+**/\r
VOID\r
PartitionSetCrc (\r
IN OUT EFI_TABLE_HEADER *Hdr\r
@param[in] BlockIo Parent BlockIo interface\r
@param[in] DiskIo Disk Io protocol.\r
@param[in] Lba The starting Lba of the Partition Table\r
- @param[in] PartHeader Stores the partition table that is read\r
+ @param[out] PartHeader Stores the partition table that is read\r
\r
@retval TRUE The partition table is valid\r
@retval FALSE The partition table is not valid\r
@param[in] PartEntry The partition entry array\r
@param[out] PEntryStatus the partition entry status array \r
recording the status of each partition\r
+\r
**/\r
VOID\r
PartitionCheckGptEntry (\r
/**\r
Updates the CRC32 value in the table header\r
\r
- @param[in,out] Hdr Table to update\r
+ @param Hdr Table to update\r
\r
**/\r
VOID\r
/**\r
Updates the CRC32 value in the table header\r
\r
- @param[in] Size The size of the table\r
- @param[in,out] Hdr Table to update\r
+ @param Size The size of the table\r
+ @param Hdr Table to update\r
\r
**/\r
VOID\r
/**\r
Checks the CRC32 value in the table header\r
\r
- @param[in] MaxSize Max Size limit\r
- @param[in,out] Hdr Table to check\r
+ @param MaxSize Max Size limit\r
+ @param Hdr Table to check\r
\r
- @return TRUE CRC Valid\r
- @return FALSE CRC Invalid\r
+ @return TRUE CRC Valid\r
+ @return FALSE CRC Invalid\r
\r
**/\r
BOOLEAN\r
/**\r
Checks the CRC32 value in the table header\r
\r
- @param[in] MaxSize Max Size limit\r
- @param[in] Size The size of the table\r
- @param[in,out] Hdr Table to check\r
+ @param MaxSize Max Size limit\r
+ @param Size The size of the table\r
+ @param Hdr Table to check\r
\r
@return TRUE CRC Valid\r
@return FALSE CRC Invalid\r