Subversion Repositories HelenOS

Rev

Rev 2726 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2726 Rev 4687
1
#ifndef _EFI_PART_H
1
#ifndef _EFI_PART_H
2
#define _EFI_PART_H
2
#define _EFI_PART_H
3
 
3
 
4
/*++
4
/*++
5
 
5
 
6
Copyright (c) 1998  Intel Corporation
6
Copyright (c) 1998  Intel Corporation
7
 
7
 
8
Module Name:
8
Module Name:
9
 
9
 
10
    efipart.h
10
    efipart.h
11
   
11
   
12
Abstract:  
12
Abstract:  
13
    Info about disk partitions and Master Boot Records
13
    Info about disk partitions and Master Boot Records
14
 
14
 
15
 
15
 
16
 
16
 
17
 
17
 
18
Revision History
18
Revision History
19
 
19
 
20
--*/
20
--*/
21
 
21
 
22
//
22
//
23
//
23
//
24
//
24
//
25
 
25
 
26
#define EFI_PARTITION   0xef
26
#define EFI_PARTITION   0xef
27
#define MBR_SIZE        512
27
#define MBR_SIZE        512
28
 
28
 
29
#pragma pack(1)
29
#pragma pack(1)
30
 
30
 
31
typedef struct {
31
typedef struct {
32
    UINT8       BootIndicator;
32
    UINT8       BootIndicator;
33
    UINT8       StartHead;
33
    UINT8       StartHead;
34
    UINT8       StartSector;
34
    UINT8       StartSector;
35
    UINT8       StartTrack;
35
    UINT8       StartTrack;
36
    UINT8       OSIndicator;
36
    UINT8       OSIndicator;
37
    UINT8       EndHead;
37
    UINT8       EndHead;
38
    UINT8       EndSector;
38
    UINT8       EndSector;
39
    UINT8       EndTrack;
39
    UINT8       EndTrack;
40
    UINT8       StartingLBA[4];
40
    UINT8       StartingLBA[4];
41
    UINT8       SizeInLBA[4];
41
    UINT8       SizeInLBA[4];
42
} MBR_PARTITION_RECORD;
42
} MBR_PARTITION_RECORD;
43
 
43
 
44
#define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
44
#define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
45
 
45
 
46
#define MBR_SIGNATURE           0xaa55
46
#define MBR_SIGNATURE           0xaa55
47
#define MIN_MBR_DEVICE_SIZE     0x80000
47
#define MIN_MBR_DEVICE_SIZE     0x80000
48
#define MBR_ERRATA_PAD          0x40000 // 128 MB
48
#define MBR_ERRATA_PAD          0x40000 // 128 MB
49
 
49
 
50
#define MAX_MBR_PARTITIONS  4   
50
#define MAX_MBR_PARTITIONS  4   
51
typedef struct {
51
typedef struct {
52
    UINT8                   BootStrapCode[440];
52
    UINT8                   BootStrapCode[440];
53
    UINT8                   UniqueMbrSignature[4];
53
    UINT8                   UniqueMbrSignature[4];
54
    UINT8                   Unknown[2];
54
    UINT8                   Unknown[2];
55
    MBR_PARTITION_RECORD    Partition[MAX_MBR_PARTITIONS];
55
    MBR_PARTITION_RECORD    Partition[MAX_MBR_PARTITIONS];
56
    UINT16                  Signature;
56
    UINT16                  Signature;
57
} MASTER_BOOT_RECORD;
57
} MASTER_BOOT_RECORD;
58
#pragma pack()
58
#pragma pack()
59
 
59
 
60
 
60
 
61
#endif
61
#endif
62
 
62