Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
efi.h File Reference
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/genhd.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/efi.h>

Go to the source code of this file.

Data Structures

struct  _gpt_header
 
struct  _gpt_entry_attributes
 
struct  _gpt_entry
 
struct  _legacy_mbr
 

Macros

#define MSDOS_MBR_SIGNATURE   0xaa55
 
#define EFI_PMBR_OSTYPE_EFI   0xEF
 
#define EFI_PMBR_OSTYPE_EFI_GPT   0xEE
 
#define GPT_HEADER_SIGNATURE   0x5452415020494645ULL
 
#define GPT_HEADER_REVISION_V1   0x00010000
 
#define GPT_PRIMARY_PARTITION_TABLE_LBA   1
 
#define PARTITION_SYSTEM_GUID
 
#define LEGACY_MBR_PARTITION_GUID
 
#define PARTITION_MSFT_RESERVED_GUID
 
#define PARTITION_BASIC_DATA_GUID
 
#define PARTITION_LINUX_RAID_GUID
 
#define PARTITION_LINUX_SWAP_GUID
 
#define PARTITION_LINUX_LVM_GUID
 

Functions

struct _gpt_header __attribute__ ((packed)) gpt_header
 
int efi_partition (struct parsed_partitions *state)
 

Variables

__le64 signature
 
__le32 revision
 
__le32 header_size
 
__le32 header_crc32
 
__le32 reserved1
 
__le64 my_lba
 
__le64 alternate_lba
 
__le64 first_usable_lba
 
__le64 last_usable_lba
 
efi_guid_t disk_guid
 
__le64 partition_entry_lba
 
__le32 num_partition_entries
 
__le32 sizeof_partition_entry
 
__le32 partition_entry_array_crc32
 
u64 required_to_function
 
u64 reserved
 
u64 type_guid_specific
 
efi_guid_t partition_type_guid
 
efi_guid_t unique_partition_guid
 
__le64 starting_lba
 
__le64 ending_lba
 
gpt_entry_attributes attributes
 
efi_char16_t partition_name [72/sizeof(efi_char16_t)]
 
u8 boot_code [440]
 
__le32 unique_mbr_signature
 
__le16 unknown
 
struct partition partition_record [4]
 

Macro Definition Documentation

#define EFI_PMBR_OSTYPE_EFI   0xEF

Definition at line 37 of file efi.h.

#define EFI_PMBR_OSTYPE_EFI_GPT   0xEE

Definition at line 38 of file efi.h.

#define GPT_HEADER_REVISION_V1   0x00010000

Definition at line 41 of file efi.h.

#define GPT_HEADER_SIGNATURE   0x5452415020494645ULL

Definition at line 40 of file efi.h.

#define GPT_PRIMARY_PARTITION_TABLE_LBA   1

Definition at line 42 of file efi.h.

#define LEGACY_MBR_PARTITION_GUID
Value:
EFI_GUID( 0x024DEE41, 0x33E7, 0x11d3, \
0x9D, 0x69, 0x00, 0x08, 0xC7, 0x81, 0xF3, 0x9F)

Definition at line 47 of file efi.h.

#define MSDOS_MBR_SIGNATURE   0xaa55

Definition at line 36 of file efi.h.

#define PARTITION_BASIC_DATA_GUID
Value:
EFI_GUID( 0xEBD0A0A2, 0xB9E5, 0x4433, \
0x87, 0xC0, 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7)

Definition at line 53 of file efi.h.

#define PARTITION_LINUX_LVM_GUID
Value:
EFI_GUID( 0xe6d6d379, 0xf507, 0x44c2, \
0xa2, 0x3c, 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28)

Definition at line 62 of file efi.h.

#define PARTITION_LINUX_RAID_GUID
Value:
EFI_GUID( 0xa19d880f, 0x05fc, 0x4d3b, \
0xa0, 0x06, 0x74, 0x3f, 0x0f, 0x84, 0x91, 0x1e)

Definition at line 56 of file efi.h.

#define PARTITION_LINUX_SWAP_GUID
Value:
EFI_GUID( 0x0657fd6d, 0xa4ab, 0x43c4, \
0x84, 0xe5, 0x09, 0x33, 0xc8, 0x4b, 0x4f, 0x4f)

Definition at line 59 of file efi.h.

#define PARTITION_MSFT_RESERVED_GUID
Value:
EFI_GUID( 0xE3C9E316, 0x0B5C, 0x4DB8, \
0x81, 0x7D, 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE)

Definition at line 50 of file efi.h.

#define PARTITION_SYSTEM_GUID
Value:
EFI_GUID( 0xC12A7328, 0xF81F, 0x11d2, \
0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B)

Definition at line 44 of file efi.h.

Function Documentation

struct _gpt_header __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

int efi_partition ( struct parsed_partitions state)

efi_partition(struct parsed_partitions *state)

Description: called from check.c, if the disk contains GPT partitions, sets up partition entries in the kernel.

If the first block on the disk is a legacy MBR, it will get handled by msdos_partition(). If it's a Protective MBR, we'll handle it here.

We do not create a Linux partition for GPT, but only for the actual data partitions. Returns: -1 if unable to read the partition table 0 if this isn't our partition table 1 if successful

Definition at line 617 of file efi.c.

Variable Documentation

__le64 alternate_lba

Definition at line 94 of file efi.h.

__le32 attributes

Definition at line 107 of file efi.h.

u8 boot_code[440]

Definition at line 111 of file efi.h.

efi_guid_t disk_guid

Definition at line 97 of file efi.h.

__le64 ending_lba

Definition at line 106 of file efi.h.

__le64 first_usable_lba

Definition at line 95 of file efi.h.

__le32 header_crc32

Definition at line 91 of file efi.h.

__le32 header_size

Definition at line 90 of file efi.h.

__le64 last_usable_lba

Definition at line 96 of file efi.h.

__le64 my_lba

Definition at line 93 of file efi.h.

__le32 num_partition_entries

Definition at line 99 of file efi.h.

__le32 partition_entry_array_crc32

Definition at line 101 of file efi.h.

__le64 partition_entry_lba

Definition at line 98 of file efi.h.

Definition at line 108 of file efi.h.

struct partition partition_record[4]

Definition at line 114 of file efi.h.

efi_guid_t partition_type_guid

Definition at line 103 of file efi.h.

u64 required_to_function

Definition at line 94 of file efi.h.

u64 reserved

Definition at line 95 of file efi.h.

__le32 reserved1

Definition at line 92 of file efi.h.

Definition at line 89 of file efi.h.

__le16 signature

Definition at line 88 of file efi.h.

__le32 sizeof_partition_entry

Definition at line 100 of file efi.h.

__le64 starting_lba

Definition at line 105 of file efi.h.

u64 type_guid_specific

Definition at line 96 of file efi.h.

__le32 unique_mbr_signature

Definition at line 112 of file efi.h.

efi_guid_t unique_partition_guid

Definition at line 104 of file efi.h.

uint8_t unknown

Definition at line 113 of file efi.h.