/*
* VAS_EBOOT -- GRand Unified Bootloader
* Copyright (C) 2002,2005,2006,2007,2008 Free Software Foundation, Inc.
*
* VAS_EBOOT is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VAS_EBOOT is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VAS_EBOOT. If not, see .
*/
#ifndef VAS_EBOOT_GPT_PARTITION_HEADER
#define VAS_EBOOT_GPT_PARTITION_HEADER 1
#include
#include
#define VAS_EBOOT_GPT_PARTITION_TYPE_EMPTY \
{ 0x0, 0x0, 0x0, \
{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } \
}
#define VAS_EBOOT_GPT_PARTITION_TYPE_BIOS_BOOT \
{ VasEBoot_cpu_to_le32_compile_time (0x21686148), \
VasEBoot_cpu_to_le16_compile_time (0x6449), \
VasEBoot_cpu_to_le16_compile_time (0x6e6f), \
{ 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 } \
}
#define VAS_EBOOT_GPT_PARTITION_TYPE_LDM \
{ VasEBoot_cpu_to_le32_compile_time (0x5808C8AAU),\
VasEBoot_cpu_to_le16_compile_time (0x7E8F), \
VasEBoot_cpu_to_le16_compile_time (0x42E0), \
{ 0x85, 0xD2, 0xE1, 0xE9, 0x04, 0x34, 0xCF, 0xB3 } \
}
struct VasEBoot_gpt_header
{
VasEBoot_uint8_t magic[8];
VasEBoot_uint32_t version;
VasEBoot_uint32_t headersize;
VasEBoot_uint32_t crc32;
VasEBoot_uint32_t unused1;
VasEBoot_uint64_t primary;
VasEBoot_uint64_t backup;
VasEBoot_uint64_t start;
VasEBoot_uint64_t end;
VasEBoot_uint8_t guid[16];
VasEBoot_uint64_t partitions;
VasEBoot_uint32_t maxpart;
VasEBoot_uint32_t partentry_size;
VasEBoot_uint32_t partentry_crc32;
} VAS_EBOOT_PACKED;
struct VasEBoot_gpt_partentry
{
VasEBoot_guid_t type;
VasEBoot_guid_t guid;
VasEBoot_uint64_t start;
VasEBoot_uint64_t end;
VasEBoot_uint64_t attrib;
char name[72];
};
VasEBoot_err_t
VasEBoot_gpt_partition_map_iterate (VasEBoot_disk_t disk,
VasEBoot_partition_iterate_hook_t hook,
void *hook_data);
#endif /* ! VAS_EBOOT_GPT_PARTITION_HEADER */