]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/BootSectImage/mbr.h
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / C / BootSectImage / mbr.h
CommitLineData
30fdf114
LG
1/** @file\r
2\r
3 MBR Partition Entry and Table structure defintions.\r
4\r
f7496d71
LG
5Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
30fdf114
LG
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
28typedef 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
44typedef 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