Home | History | Annotate | Line # | Download | only in inc
efipart.h revision 1.1.1.1.10.2
      1  1.1.1.1.10.2  tls /*	$NetBSD: efipart.h,v 1.1.1.1.10.2 2014/08/20 00:04:23 tls Exp $	*/
      2  1.1.1.1.10.2  tls 
      3  1.1.1.1.10.2  tls #ifndef _EFI_PART_H
      4  1.1.1.1.10.2  tls #define _EFI_PART_H
      5  1.1.1.1.10.2  tls 
      6  1.1.1.1.10.2  tls /*++
      7  1.1.1.1.10.2  tls 
      8  1.1.1.1.10.2  tls Copyright (c) 1998  Intel Corporation
      9  1.1.1.1.10.2  tls 
     10  1.1.1.1.10.2  tls Module Name:
     11  1.1.1.1.10.2  tls 
     12  1.1.1.1.10.2  tls     efipart.h
     13  1.1.1.1.10.2  tls 
     14  1.1.1.1.10.2  tls Abstract:
     15  1.1.1.1.10.2  tls     Info about disk partitions and Master Boot Records
     16  1.1.1.1.10.2  tls 
     17  1.1.1.1.10.2  tls 
     18  1.1.1.1.10.2  tls 
     19  1.1.1.1.10.2  tls 
     20  1.1.1.1.10.2  tls Revision History
     21  1.1.1.1.10.2  tls 
     22  1.1.1.1.10.2  tls --*/
     23  1.1.1.1.10.2  tls 
     24  1.1.1.1.10.2  tls //
     25  1.1.1.1.10.2  tls //
     26  1.1.1.1.10.2  tls //
     27  1.1.1.1.10.2  tls 
     28  1.1.1.1.10.2  tls #define EFI_PARTITION   0xef
     29  1.1.1.1.10.2  tls #define MBR_SIZE        512
     30  1.1.1.1.10.2  tls 
     31  1.1.1.1.10.2  tls #pragma pack(1)
     32  1.1.1.1.10.2  tls 
     33  1.1.1.1.10.2  tls typedef struct {
     34  1.1.1.1.10.2  tls     UINT8       BootIndicator;
     35  1.1.1.1.10.2  tls     UINT8       StartHead;
     36  1.1.1.1.10.2  tls     UINT8       StartSector;
     37  1.1.1.1.10.2  tls     UINT8       StartTrack;
     38  1.1.1.1.10.2  tls     UINT8       OSIndicator;
     39  1.1.1.1.10.2  tls     UINT8       EndHead;
     40  1.1.1.1.10.2  tls     UINT8       EndSector;
     41  1.1.1.1.10.2  tls     UINT8       EndTrack;
     42  1.1.1.1.10.2  tls     UINT8       StartingLBA[4];
     43  1.1.1.1.10.2  tls     UINT8       SizeInLBA[4];
     44  1.1.1.1.10.2  tls } MBR_PARTITION_RECORD;
     45  1.1.1.1.10.2  tls 
     46  1.1.1.1.10.2  tls #define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
     47  1.1.1.1.10.2  tls 
     48  1.1.1.1.10.2  tls #define MBR_SIGNATURE           0xaa55
     49  1.1.1.1.10.2  tls #define MIN_MBR_DEVICE_SIZE     0x80000
     50  1.1.1.1.10.2  tls #define MBR_ERRATA_PAD          0x40000 // 128 MB
     51  1.1.1.1.10.2  tls 
     52  1.1.1.1.10.2  tls #define MAX_MBR_PARTITIONS  4
     53  1.1.1.1.10.2  tls typedef struct {
     54  1.1.1.1.10.2  tls     UINT8                   BootStrapCode[440];
     55  1.1.1.1.10.2  tls     UINT8                   UniqueMbrSignature[4];
     56  1.1.1.1.10.2  tls     UINT8                   Unknown[2];
     57  1.1.1.1.10.2  tls     MBR_PARTITION_RECORD    Partition[MAX_MBR_PARTITIONS];
     58  1.1.1.1.10.2  tls     UINT16                  Signature;
     59  1.1.1.1.10.2  tls } MASTER_BOOT_RECORD;
     60  1.1.1.1.10.2  tls #pragma pack()
     61  1.1.1.1.10.2  tls 
     62  1.1.1.1.10.2  tls 
     63  1.1.1.1.10.2  tls #endif
     64