1 #ifndef _DISK_PART_UEFI_H
2 #define _DISK_PART_UEFI_H
6 typedef enum _PARTITION_ATTR_TAG
13 //#define MAX_PARTITION_INFO (((PARTITION_TOTAL_COUNT + 3) / 4) * 4)
14 #define MAX_PARTITION_INFO 128
16 #define MAX_SIZE_FLAG 0xFFFFFFFF
18 #define MAX_PARTITION_NAME_SIZE (72) //72byte 36 utf-16le code units
19 #define MAX_UTF_PARTITION_NAME_LEN (36)
21 #define STARTING_LBA_OF_FIRST_PARTITION (0x800)
23 typedef struct _PARTITION_CFG
25 unsigned int partition_index;
26 unsigned int partition_size; //
27 unsigned int partition_attr;
28 unsigned int partition_offset;
30 In kernel #define PARTITION_META_INFO_VOLNAMELTH 64
31 In u-boot disk_partition name 32
32 gpt entry efi_char16_t partition_name[72 / sizeof(efi_char16_t)];
34 wchar_t partition_name[MAX_UTF_PARTITION_NAME_LEN];
35 } __attribute__ ((packed)) PARTITION_CFG,*PPARTITION_CFG;
38 unsigned int write_uefi_partition_table(PARTITION_CFG *p_partition_cfg);
40 #endif /* _DISK_PART_UEFI_H */