iPXE
include
ipxe
efi
IndustryStandard
Mbr.h
Go to the documentation of this file.
1
/** @file
2
Legacy Master Boot Record Format Definition.
3
4
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5
SPDX-License-Identifier: BSD-2-Clause-Patent
6
7
**/
8
9
#pragma once
10
11
FILE_LICENCE
( BSD2_PATENT );
12
FILE_SECBOOT
( PERMITTED );
13
14
#define MBR_SIGNATURE 0xaa55
15
16
#define EXTENDED_DOS_PARTITION 0x05
17
#define EXTENDED_WINDOWS_PARTITION 0x0F
18
19
#define MAX_MBR_PARTITIONS 4
20
21
#define PMBR_GPT_PARTITION 0xEE
22
#define EFI_PARTITION 0xEF
23
24
#define MBR_SIZE 512
25
26
#pragma pack(1)
27
///
28
/// MBR Partition Entry
29
///
30
typedef
struct
{
31
UINT8
BootIndicator
;
32
UINT8
StartHead
;
33
UINT8
StartSector
;
34
UINT8
StartTrack
;
35
UINT8
OSIndicator
;
36
UINT8
EndHead
;
37
UINT8
EndSector
;
38
UINT8
EndTrack
;
39
UINT8
StartingLBA
[4];
40
UINT8
SizeInLBA
[4];
41
}
MBR_PARTITION_RECORD
;
42
43
///
44
/// MBR Partition Table
45
///
46
typedef
struct
{
47
UINT8
BootStrapCode
[440];
48
UINT8
UniqueMbrSignature
[4];
49
UINT8
Unknown
[2];
50
MBR_PARTITION_RECORD
Partition
[
MAX_MBR_PARTITIONS
];
51
UINT16
Signature
;
52
}
MASTER_BOOT_RECORD
;
53
54
#pragma pack()
UINT16
unsigned short UINT16
2-byte unsigned value.
Definition
ProcessorBind.h:100
UINT8
unsigned char UINT8
1-byte unsigned value.
Definition
ProcessorBind.h:104
MAX_MBR_PARTITIONS
#define MAX_MBR_PARTITIONS
Definition
Mbr.h:19
FILE_LICENCE
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition
compiler.h:921
FILE_SECBOOT
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition
compiler.h:951
MASTER_BOOT_RECORD
MBR Partition Table.
Definition
Mbr.h:46
MASTER_BOOT_RECORD::Unknown
UINT8 Unknown[2]
Definition
Mbr.h:49
MASTER_BOOT_RECORD::BootStrapCode
UINT8 BootStrapCode[440]
Definition
Mbr.h:47
MASTER_BOOT_RECORD::UniqueMbrSignature
UINT8 UniqueMbrSignature[4]
Definition
Mbr.h:48
MASTER_BOOT_RECORD::Partition
MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS]
Definition
Mbr.h:50
MASTER_BOOT_RECORD::Signature
UINT16 Signature
Definition
Mbr.h:51
MBR_PARTITION_RECORD
MBR Partition Entry.
Definition
Mbr.h:30
MBR_PARTITION_RECORD::OSIndicator
UINT8 OSIndicator
Definition
Mbr.h:35
MBR_PARTITION_RECORD::EndHead
UINT8 EndHead
Definition
Mbr.h:36
MBR_PARTITION_RECORD::StartTrack
UINT8 StartTrack
Definition
Mbr.h:34
MBR_PARTITION_RECORD::SizeInLBA
UINT8 SizeInLBA[4]
Definition
Mbr.h:40
MBR_PARTITION_RECORD::BootIndicator
UINT8 BootIndicator
Definition
Mbr.h:31
MBR_PARTITION_RECORD::EndTrack
UINT8 EndTrack
Definition
Mbr.h:38
MBR_PARTITION_RECORD::StartHead
UINT8 StartHead
Definition
Mbr.h:32
MBR_PARTITION_RECORD::EndSector
UINT8 EndSector
Definition
Mbr.h:37
MBR_PARTITION_RECORD::StartingLBA
UINT8 StartingLBA[4]
Definition
Mbr.h:39
MBR_PARTITION_RECORD::StartSector
UINT8 StartSector
Definition
Mbr.h:33
Generated by
1.14.0