]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Sample/Tools/Source/BootsectImage/mbr.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / BootsectImage / mbr.h
CommitLineData
3eb9473e 1/*++\r
2\r
3Copyright 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
18Revision History\r
19\r
20--*/\r
21\r
22#ifndef _MBR_H_\r
23#define _MBR_H_\r
24\r
25#include "Tiano.h"\r
26\r
27#pragma pack(1)\r
28\r
29#define MAX_MBR_PARTITIONS 4\r
30\r
31//\r
32// MBR Partition Entry\r
33//\r
34typedef struct {\r
35 UINT8 BootIndicator;\r
36 UINT8 StartHead;\r
37 UINT8 StartSector;\r
38 UINT8 StartTrack;\r
39 UINT8 OSType;\r
40 UINT8 EndHead;\r
41 UINT8 EndSector;\r
42 UINT8 EndTrack;\r
43 UINT32 StartingLBA;\r
44 UINT32 SizeInLBA;\r
45} MBR_PARTITION_RECORD;\r
46\r
47//\r
48// MBR Partition table\r
49//\r
50typedef struct {\r
51 UINT8 BootCode[440];\r
52 UINT32 UniqueMbrSignature;\r
53 UINT16 Unknown;\r
54 MBR_PARTITION_RECORD PartitionRecord[MAX_MBR_PARTITIONS];\r
55 UINT16 Signature;\r
56} MASTER_BOOT_RECORD;\r
57\r
58#pragma pack()\r
59\r
60#define MBR_SIGNATURE 0xAA55\r
61#define EXTENDED_DOS_PARTITION 0x05\r
62#define EXTENDED_WINDOWS_PARTITION 0x0F\r
63\r
64#endif\r