Merge from vendor branch CVS:
[dragonfly.git] / sys / boot / efi / include / efipart.h
1 /*
2  * $FreeBSD: src/sys/boot/efi/include/efipart.h,v 1.2 2002/05/19 03:17:20 marcel Exp $
3  * $DragonFly: src/sys/boot/efi/include/efipart.h,v 1.1 2003/11/10 06:08:32 dillon Exp $
4  */
5 #ifndef _EFI_PART_H
6 #define _EFI_PART_H
7
8 /*++
9
10 Copyright (c) 1998  Intel Corporation
11
12 Module Name:
13
14     efipart.h
15     
16 Abstract:   
17     Info about disk partitions and Master Boot Records
18
19
20
21
22 Revision History
23
24 --*/
25
26 #define EFI_PARTITION   0xef
27 #define MBR_SIZE        512
28
29 #pragma pack(1)
30
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;
43
44 #define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
45
46 #define MBR_SIGNATURE           0xaa55
47 #define MIN_MBR_DEVICE_SIZE     0x80000
48 #define MBR_ERRATA_PAD          0x40000 /* 128 MB */
49
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()
59
60
61 #endif