EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions

MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c File Reference

#include "Partition.h"

Go to the source code of this file.

Functions

BOOLEAN PartitionValidGptTable (IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_DISK_IO_PROTOCOL *DiskIo, IN EFI_LBA Lba, OUT EFI_PARTITION_TABLE_HEADER *PartHeader)
BOOLEAN PartitionCheckGptEntryArrayCRC (IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_DISK_IO_PROTOCOL *DiskIo, IN EFI_PARTITION_TABLE_HEADER *PartHeader)
BOOLEAN PartitionRestoreGptTable (IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_DISK_IO_PROTOCOL *DiskIo, IN EFI_PARTITION_TABLE_HEADER *PartHeader)
VOID PartitionCheckGptEntry (IN EFI_PARTITION_TABLE_HEADER *PartHeader, IN EFI_PARTITION_ENTRY *PartEntry, OUT EFI_PARTITION_ENTRY_STATUS *PEntryStatus)
BOOLEAN PartitionCheckCrcAltSize (IN UINTN MaxSize, IN UINTN Size, IN OUT EFI_TABLE_HEADER *Hdr)
BOOLEAN PartitionCheckCrc (IN UINTN MaxSize, IN OUT EFI_TABLE_HEADER *Hdr)
VOID PartitionSetCrcAltSize (IN UINTN Size, IN OUT EFI_TABLE_HEADER *Hdr)
VOID PartitionSetCrc (IN OUT EFI_TABLE_HEADER *Hdr)
EFI_STATUS PartitionInstallGptChildHandles (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Handle, IN EFI_DISK_IO_PROTOCOL *DiskIo, IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_BLOCK_IO2_PROTOCOL *BlockIo2, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)

Detailed Description

Decode a hard disk partitioned with the GPT scheme in the UEFI 2.0 specification.

Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file Gpt.c.


Function Documentation

BOOLEAN PartitionCheckCrc ( IN UINTN  MaxSize,
IN OUT EFI_TABLE_HEADER Hdr 
)

Checks the CRC32 value in the table header.

Parameters:
MaxSizeMax Size limit
HdrTable to check
Returns:
TRUE CRC Valid
FALSE CRC Invalid

Definition at line 759 of file Gpt.c.

BOOLEAN PartitionCheckCrcAltSize ( IN UINTN  MaxSize,
IN UINTN  Size,
IN OUT EFI_TABLE_HEADER Hdr 
)

Checks the CRC32 value in the table header.

Parameters:
MaxSizeMax Size limit
SizeThe size of the table
HdrTable to check
Returns:
TRUE CRC Valid
FALSE CRC Invalid

Definition at line 780 of file Gpt.c.

VOID PartitionCheckGptEntry ( IN EFI_PARTITION_TABLE_HEADER PartHeader,
IN EFI_PARTITION_ENTRY PartEntry,
OUT EFI_PARTITION_ENTRY_STATUS PEntryStatus 
)

Restore Partition Table to its alternate place. (Primary -> Backup or Backup -> Primary)

Parameters:
[in]PartHeaderPartition table header structure
[in]PartEntryThe partition entry array
[out]PEntryStatusthe partition entry status array recording the status of each partition

Definition at line 652 of file Gpt.c.

BOOLEAN PartitionCheckGptEntryArrayCRC ( IN EFI_BLOCK_IO_PROTOCOL BlockIo,
IN EFI_DISK_IO_PROTOCOL DiskIo,
IN EFI_PARTITION_TABLE_HEADER PartHeader 
)

Check if the CRC field in the Partition table header is valid for Partition entry array.

Parameters:
[in]BlockIoParent BlockIo interface
[in]DiskIoDisk Io Protocol.
[in]PartHeaderPartition table header structure
Return values:
TRUEthe CRC is valid
FALSEthe CRC is invalid

Definition at line 492 of file Gpt.c.

EFI_STATUS PartitionInstallGptChildHandles ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Handle,
IN EFI_DISK_IO_PROTOCOL DiskIo,
IN EFI_BLOCK_IO_PROTOCOL BlockIo,
IN EFI_BLOCK_IO2_PROTOCOL BlockIo2,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

Install child handles if the Handle supports GPT partition structure.

Parameters:
[in]ThisCalling context.
[in]HandleParent Handle.
[in]DiskIoParent DiskIo interface.
[in]BlockIoParent BlockIo interface.
[in]BlockIo2Parent BlockIo2 interface.
[in]DevicePathParent Device Path.
Return values:
EFI_SUCCESSValid GPT disk.
EFI_MEDIA_CHANGEDMedia changed Detected.
otherNot a valid GPT disk.

Definition at line 174 of file Gpt.c.

BOOLEAN PartitionRestoreGptTable ( IN EFI_BLOCK_IO_PROTOCOL BlockIo,
IN EFI_DISK_IO_PROTOCOL DiskIo,
IN EFI_PARTITION_TABLE_HEADER PartHeader 
)

Restore Partition Table to its alternate place (Primary -> Backup or Backup -> Primary).

Parameters:
[in]BlockIoParent BlockIo interface.
[in]DiskIoDisk Io Protocol.
[in]PartHeaderPartition table header structure.
Return values:
TRUERestoring succeeds
FALSERestoring failed

Definition at line 552 of file Gpt.c.

VOID PartitionSetCrc ( IN OUT EFI_TABLE_HEADER Hdr)

Updates the CRC32 value in the table header.

Parameters:
HdrTable to update

Definition at line 719 of file Gpt.c.

VOID PartitionSetCrcAltSize ( IN UINTN  Size,
IN OUT EFI_TABLE_HEADER Hdr 
)

Updates the CRC32 value in the table header.

Parameters:
SizeThe size of the table
HdrTable to update

Definition at line 735 of file Gpt.c.

BOOLEAN PartitionValidGptTable ( IN EFI_BLOCK_IO_PROTOCOL BlockIo,
IN EFI_DISK_IO_PROTOCOL DiskIo,
IN EFI_LBA  Lba,
OUT EFI_PARTITION_TABLE_HEADER PartHeader 
)

Install child handles if the Handle supports GPT partition structure.

Parameters:
[in]BlockIoParent BlockIo interface.
[in]DiskIoDisk Io protocol.
[in]LbaThe starting Lba of the Partition Table
[out]PartHeaderStores the partition table that is read
Return values:
TRUEThe partition table is valid
FALSEThe partition table is not valid

Definition at line 424 of file Gpt.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines