]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.h
Initial import.
[mirror_edk2.git] / EdkModulePkg / Universal / Disk / Partition / Dxe / Mbr.h
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 Mbr.h\r
15 \r
16Abstract:\r
17\r
18 Data Structures required for detecting MBR Partitions\r
19 \r
20Revision History\r
21\r
22--*/\r
23\r
24#ifndef _MBR_H_\r
25#define _MBR_H_\r
26\r
27#pragma pack(1)\r
28\r
29#define MBR_SIGNATURE 0xaa55\r
30#define MIN_MBR_DEVICE_SIZE 0x80000\r
31#define MBR_ERRATA_PAD 0x40000 // 128 MB\r
32#define EXTENDED_DOS_PARTITION 0x05\r
33#define EXTENDED_WINDOWS_PARTITION 0x0F\r
34#define MAX_MBR_PARTITIONS 4\r
35\r
36#define EFI_PARTITION 0xef\r
37#define MBR_SIZE 512\r
38\r
39//\r
40// MBR Partition Entry\r
41//\r
42typedef struct {\r
43 UINT8 BootIndicator;\r
44 UINT8 StartHead;\r
45 UINT8 StartSector;\r
46 UINT8 StartTrack;\r
47 UINT8 OSIndicator;\r
48 UINT8 EndHead;\r
49 UINT8 EndSector;\r
50 UINT8 EndTrack;\r
51 UINT8 StartingLBA[4];\r
52 UINT8 SizeInLBA[4];\r
53} MBR_PARTITION_RECORD;\r
54\r
55//\r
56// MBR Partition table\r
57//\r
58typedef struct {\r
59 UINT8 BootStrapCode[440];\r
60 UINT8 UniqueMbrSignature[4];\r
61 UINT8 Unknown[2];\r
62 MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];\r
63 UINT16 Signature;\r
64} MASTER_BOOT_RECORD;\r
65\r
66#pragma pack()\r
67\r
68#endif\r