Adding upstream version 6.03~pre2+dfsg.
[syslinux-debian/hramrach.git] / efi32 / include / efi / efipart.h
blobd4c557319abe6d0c8a5937f110eceb03df3da0db
1 #ifndef _EFI_PART_H
2 #define _EFI_PART_H
4 /*++
6 Copyright (c) 1998 Intel Corporation
8 Module Name:
10 efipart.h
12 Abstract:
13 Info about disk partitions and Master Boot Records
18 Revision History
20 --*/
26 #define EFI_PARTITION 0xef
27 #define MBR_SIZE 512
29 #pragma pack(1)
31 typedef struct {
32 UINT8 BootIndicator;
33 UINT8 StartHead;
34 UINT8 StartSector;
35 UINT8 StartTrack;
36 UINT8 OSIndicator;
37 UINT8 EndHead;
38 UINT8 EndSector;
39 UINT8 EndTrack;
40 UINT8 StartingLBA[4];
41 UINT8 SizeInLBA[4];
42 } MBR_PARTITION_RECORD;
44 #define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
46 #define MBR_SIGNATURE 0xaa55
47 #define MIN_MBR_DEVICE_SIZE 0x80000
48 #define MBR_ERRATA_PAD 0x40000 // 128 MB
50 #define MAX_MBR_PARTITIONS 4
51 typedef struct {
52 UINT8 BootStrapCode[440];
53 UINT8 UniqueMbrSignature[4];
54 UINT8 Unknown[2];
55 MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];
56 UINT16 Signature;
57 } MASTER_BOOT_RECORD;
58 #pragma pack()
61 #endif