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