Subversion Repositories HelenOS

Rev

Rev 2726 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2726 vana 1
#ifndef _EFI_PART_H
2
#define _EFI_PART_H
3
 
4
/*++
5
 
6
Copyright (c) 1998  Intel Corporation
7
 
8
Module Name:
9
 
10
    efipart.h
11
 
12
Abstract:  
13
    Info about disk partitions and Master Boot Records
14
 
15
 
16
 
17
 
18
Revision History
19
 
20
--*/
21
 
22
//
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