]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/Mbr.h
1, Add <Library/DevicePathLib.h> for all source that use device path utility macros
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / Mbr.h
CommitLineData
a7ed1e2e 1/** @file\r
2 Legacy Master Boot Record Format Definition.\r
3\r
000f6a28 4Copyright (c) 2006 - 2008, Intel Corporation \r
a7ed1e2e 5All rights reserved. This program and the accompanying materials \r
6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php\r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
67e66cd5 13**/\r
a7ed1e2e 14\r
15#ifndef _MBR_H_\r
16#define _MBR_H_\r
17\r
18#define MBR_SIGNATURE 0xaa55\r
a7ed1e2e 19\r
20#define EXTENDED_DOS_PARTITION 0x05\r
21#define EXTENDED_WINDOWS_PARTITION 0x0F\r
22\r
23#define MAX_MBR_PARTITIONS 4\r
24\r
25#define PMBR_GPT_PARTITION 0xEE\r
26#define EFI_PARTITION 0xEF\r
27\r
28#define MBR_SIZE 512\r
29\r
54569f0f 30///\r
31/// MBR Partition Entry\r
32///\r
a7ed1e2e 33typedef struct {\r
34 UINT8 BootIndicator;\r
35 UINT8 StartHead;\r
36 UINT8 StartSector;\r
37 UINT8 StartTrack;\r
38 UINT8 OSIndicator;\r
39 UINT8 EndHead;\r
40 UINT8 EndSector;\r
41 UINT8 EndTrack;\r
42 UINT8 StartingLBA[4];\r
43 UINT8 SizeInLBA[4];\r
44} MBR_PARTITION_RECORD;\r
45\r
1bc5d021 46///\r
47/// MBR Partition table\r
48///\r
a7ed1e2e 49typedef struct {\r
50 UINT8 BootStrapCode[440];\r
51 UINT8 UniqueMbrSignature[4];\r
52 UINT8 Unknown[2];\r
53 MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];\r
54 UINT16 Signature;\r
55} MASTER_BOOT_RECORD;\r
56\r
a7ed1e2e 57#endif\r