]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Tools/Source/BootsectImage/mbr.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / BootsectImage / mbr.h
1 /*++
2
3 Copyright 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 mbr.h
15
16 Abstract:
17
18 Revision History
19
20 --*/
21
22 #ifndef _MBR_H_
23 #define _MBR_H_
24
25 #include "Tiano.h"
26
27 #pragma pack(1)
28
29 #define MAX_MBR_PARTITIONS 4
30
31 //
32 // MBR Partition Entry
33 //
34 typedef struct {
35 UINT8 BootIndicator;
36 UINT8 StartHead;
37 UINT8 StartSector;
38 UINT8 StartTrack;
39 UINT8 OSType;
40 UINT8 EndHead;
41 UINT8 EndSector;
42 UINT8 EndTrack;
43 UINT32 StartingLBA;
44 UINT32 SizeInLBA;
45 } MBR_PARTITION_RECORD;
46
47 //
48 // MBR Partition table
49 //
50 typedef struct {
51 UINT8 BootCode[440];
52 UINT32 UniqueMbrSignature;
53 UINT16 Unknown;
54 MBR_PARTITION_RECORD PartitionRecord[MAX_MBR_PARTITIONS];
55 UINT16 Signature;
56 } MASTER_BOOT_RECORD;
57
58 #pragma pack()
59
60 #define MBR_SIGNATURE 0xAA55
61 #define EXTENDED_DOS_PARTITION 0x05
62 #define EXTENDED_WINDOWS_PARTITION 0x0F
63
64 #endif