]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/Mbr.h
Import Pal.h and Sal.h.
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / Mbr.h
CommitLineData
a7ed1e2e 1/** @file\r
2 Legacy Master Boot Record Format Definition.\r
3\r
4Copyright (c) 2006, Intel Corporation \r
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
13--*/\r
14\r
15#ifndef _MBR_H_\r
16#define _MBR_H_\r
17\r
18#define MBR_SIGNATURE 0xaa55\r
19#define MIN_MBR_DEVICE_SIZE 0x80000\r
20#define MBR_ERRATA_PAD 0x40000 // 128 MB\r
21\r
22#define EXTENDED_DOS_PARTITION 0x05\r
23#define EXTENDED_WINDOWS_PARTITION 0x0F\r
24\r
25#define MAX_MBR_PARTITIONS 4\r
26\r
27#define PMBR_GPT_PARTITION 0xEE\r
28#define EFI_PARTITION 0xEF\r
29\r
30#define MBR_SIZE 512\r
31\r
32#pragma pack(1)\r
33//\r
34// MBR Partition Entry\r
35//\r
36typedef struct {\r
37 UINT8 BootIndicator;\r
38 UINT8 StartHead;\r
39 UINT8 StartSector;\r
40 UINT8 StartTrack;\r
41 UINT8 OSIndicator;\r
42 UINT8 EndHead;\r
43 UINT8 EndSector;\r
44 UINT8 EndTrack;\r
45 UINT8 StartingLBA[4];\r
46 UINT8 SizeInLBA[4];\r
47} MBR_PARTITION_RECORD;\r
48\r
49//\r
50// MBR Partition table\r
51//\r
52typedef struct {\r
53 UINT8 BootStrapCode[440];\r
54 UINT8 UniqueMbrSignature[4];\r
55 UINT8 Unknown[2];\r
56 MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];\r
57 UINT16 Signature;\r
58} MASTER_BOOT_RECORD;\r
59\r
60#pragma pack()\r
61\r
62#endif\r