]>
Commit | Line | Data |
---|---|---|
30fdf114 LG |
1 | /** @file\r |
2 | \r | |
3 | MBR Partition Entry and Table structure defintions.\r | |
4 | \r | |
40d841f6 LG |
5 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r |
6 | This program and the accompanying materials \r | |
30fdf114 LG |
7 | are licensed and made available under the terms and conditions of the BSD License \r |
8 | which accompanies this distribution. The full text of the license may be found at \r | |
9 | http://opensource.org/licenses/bsd-license.php \r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef _MBR_H_\r | |
17 | #define _MBR_H_\r | |
18 | \r | |
19 | #include "CommonLib.h"\r | |
20 | \r | |
21 | #pragma pack(1)\r | |
22 | \r | |
23 | #define MAX_MBR_PARTITIONS 4\r | |
24 | \r | |
25 | //\r | |
26 | // MBR Partition Entry\r | |
27 | //\r | |
28 | typedef struct {\r | |
29 | UINT8 BootIndicator;\r | |
30 | UINT8 StartHead;\r | |
31 | UINT8 StartSector;\r | |
32 | UINT8 StartTrack;\r | |
33 | UINT8 OSType;\r | |
34 | UINT8 EndHead;\r | |
35 | UINT8 EndSector;\r | |
36 | UINT8 EndTrack;\r | |
37 | UINT32 StartingLBA;\r | |
38 | UINT32 SizeInLBA;\r | |
39 | } MBR_PARTITION_RECORD;\r | |
40 | \r | |
41 | //\r | |
42 | // MBR Partition table\r | |
43 | //\r | |
44 | typedef struct {\r | |
45 | UINT8 BootCode[440];\r | |
46 | UINT32 UniqueMbrSignature;\r | |
47 | UINT16 Unknown;\r | |
48 | MBR_PARTITION_RECORD PartitionRecord[MAX_MBR_PARTITIONS];\r | |
49 | UINT16 Signature;\r | |
50 | } MASTER_BOOT_RECORD;\r | |
51 | \r | |
52 | #pragma pack()\r | |
53 | \r | |
54 | #define MBR_SIGNATURE 0xAA55\r | |
55 | #define EXTENDED_DOS_PARTITION 0x05\r | |
56 | #define EXTENDED_WINDOWS_PARTITION 0x0F\r | |
57 | \r | |
58 | #endif\r |