Home | History | Annotate | Download | only in Uefi
      1 /** @file
      2   EFI Guid Partition Table Format Definition.
      3 
      4   Copyright (c) 2006 - 2008, Intel Corporation
      5   All rights reserved. This program and the accompanying materials
      6   are licensed and made available under the terms and conditions of the BSD License
      7   which accompanies this distribution.  The full text of the license may be found at
      8   http://opensource.org/licenses/bsd-license.php
      9 
     10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12 
     13 **/
     14 
     15 #ifndef __UEFI_GPT_H__
     16 #define __UEFI_GPT_H__
     17 
     18 ///
     19 /// The primary GUID Partition Table Header must be
     20 /// located in LBA 1 (i.e., the second logical block).
     21 ///
     22 #define PRIMARY_PART_HEADER_LBA 1
     23 
     24 ///
     25 /// EFI Partition Table Signature: "EFI PART"
     26 ///
     27 #define EFI_PTAB_HEADER_ID      0x5452415020494645ULL
     28 
     29 #pragma pack(1)
     30 
     31 ///
     32 /// GPT Partition Table Header
     33 ///
     34 typedef struct {
     35   EFI_TABLE_HEADER  Header;
     36   EFI_LBA           MyLBA;
     37   EFI_LBA           AlternateLBA;
     38   EFI_LBA           FirstUsableLBA;
     39   EFI_LBA           LastUsableLBA;
     40   EFI_GUID          DiskGUID;
     41   EFI_LBA           PartitionEntryLBA;
     42   UINT32            NumberOfPartitionEntries;
     43   UINT32            SizeOfPartitionEntry;
     44   UINT32            PartitionEntryArrayCRC32;
     45 } EFI_PARTITION_TABLE_HEADER;
     46 
     47 ///
     48 /// GPT Partition Entry
     49 ///
     50 typedef struct {
     51   EFI_GUID  PartitionTypeGUID;
     52   EFI_GUID  UniquePartitionGUID;
     53   EFI_LBA   StartingLBA;
     54   EFI_LBA   EndingLBA;
     55   UINT64    Attributes;
     56   CHAR16    PartitionName[36];
     57 } EFI_PARTITION_ENTRY;
     58 
     59 #pragma pack()
     60 #endif
     61 
     62 
     63