199767f8919635c4928607450d9e0abb932109ceToomas Soome/* $FreeBSD$ */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _EFI_PART_H
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _EFI_PART_H
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/*++
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCopyright (c) 1999 - 2002 Intel Corporation. All rights reserved
199767f8919635c4928607450d9e0abb932109ceToomas SoomeThis software and associated documentation (if any) is furnished
199767f8919635c4928607450d9e0abb932109ceToomas Soomeunder a license and may only be used or copied in accordance
199767f8919635c4928607450d9e0abb932109ceToomas Soomewith the terms of the license. Except as permitted by such
199767f8919635c4928607450d9e0abb932109ceToomas Soomelicense, no part of this software or documentation may be
199767f8919635c4928607450d9e0abb932109ceToomas Soomereproduced, stored in a retrieval system, or transmitted in any
199767f8919635c4928607450d9e0abb932109ceToomas Soomeform or by any means without the express written consent of
199767f8919635c4928607450d9e0abb932109ceToomas SoomeIntel Corporation.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeModule Name:
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome efipart.h
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeAbstract:
199767f8919635c4928607450d9e0abb932109ceToomas Soome Info about disk partitions and Master Boot Records
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeRevision History
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome--*/
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome//
199767f8919635c4928607450d9e0abb932109ceToomas Soome//
199767f8919635c4928607450d9e0abb932109ceToomas Soome//
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PARTITION 0xef
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define MBR_SIZE 512
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#pragma pack(1)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef struct {
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 BootIndicator;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 StartHead;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 StartSector;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 StartTrack;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 OSIndicator;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 EndHead;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 EndSector;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 EndTrack;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 StartingLBA[4];
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 SizeInLBA[4];
199767f8919635c4928607450d9e0abb932109ceToomas Soome} MBR_PARTITION_RECORD;
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define MBR_SIGNATURE 0xaa55
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define MIN_MBR_DEVICE_SIZE 0x80000
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define MBR_ERRATA_PAD 0x40000 // 128 MB
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define MAX_MBR_PARTITIONS 4
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef struct {
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 BootStrapCode[440];
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 UniqueMbrSignature[4];
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT8 Unknown[2];
199767f8919635c4928607450d9e0abb932109ceToomas Soome MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT16 Signature;
199767f8919635c4928607450d9e0abb932109ceToomas Soome} MASTER_BOOT_RECORD;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#pragma pack()
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif