--- /dev/null
+/** @file\r
+ Legacy Master Boot Record Format Definition.\r
+\r
+Copyright (c) 2006, Intel Corporation \r
+All rights reserved. This program and the accompanying materials \r
+are licensed and made available under the terms and conditions of the BSD License \r
+which accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php\r
+ \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+--*/\r
+\r
+#ifndef _MBR_H_\r
+#define _MBR_H_\r
+\r
+#define MBR_SIGNATURE 0xaa55\r
+#define MIN_MBR_DEVICE_SIZE 0x80000\r
+#define MBR_ERRATA_PAD 0x40000 // 128 MB\r
+\r
+#define EXTENDED_DOS_PARTITION 0x05\r
+#define EXTENDED_WINDOWS_PARTITION 0x0F\r
+\r
+#define MAX_MBR_PARTITIONS 4\r
+\r
+#define PMBR_GPT_PARTITION 0xEE\r
+#define EFI_PARTITION 0xEF\r
+\r
+#define MBR_SIZE 512\r
+\r
+#pragma pack(1)\r
+//\r
+// MBR Partition Entry\r
+//\r
+typedef struct {\r
+ UINT8 BootIndicator;\r
+ UINT8 StartHead;\r
+ UINT8 StartSector;\r
+ UINT8 StartTrack;\r
+ UINT8 OSIndicator;\r
+ UINT8 EndHead;\r
+ UINT8 EndSector;\r
+ UINT8 EndTrack;\r
+ UINT8 StartingLBA[4];\r
+ UINT8 SizeInLBA[4];\r
+} MBR_PARTITION_RECORD;\r
+\r
+//\r
+// MBR Partition table\r
+//\r
+typedef struct {\r
+ UINT8 BootStrapCode[440];\r
+ UINT8 UniqueMbrSignature[4];\r
+ UINT8 Unknown[2];\r
+ MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];\r
+ UINT16 Signature;\r
+} MASTER_BOOT_RECORD;\r
+\r
+#pragma pack()\r
+\r
+#endif\r