2008-12-11 20:30:53 +00:00
|
|
|
/*
|
2006-04-26 15:08:19 +00:00
|
|
|
* Creation Date: <1999/07/06 15:45:12 samuel>
|
|
|
|
|
* Time-stamp: <2002/10/20 16:31:48 samuel>
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
* <partition_table.h>
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
* Headers describing the partition table
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
* Copyright (C) 1999, 2002 Samuel Rydh (samuel@ibrium.se)
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _H_PARTITION_TABLE
|
|
|
|
|
#define _H_PARTITION_TABLE
|
|
|
|
|
|
|
|
|
|
/* This information is based upon IM vol V. */
|
|
|
|
|
|
|
|
|
|
#define DESC_MAP_SIGNATURE 0x4552
|
2009-08-08 22:00:10 +00:00
|
|
|
#define DESC_PART_SIGNATURE 0x504d
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
kPartitionAUXIsValid = 0x00000001,
|
|
|
|
|
kPartitionAUXIsAllocated = 0x00000002,
|
|
|
|
|
kPartitionAUXIsInUse = 0x00000004,
|
|
|
|
|
kPartitionAUXIsBootValid = 0x00000008,
|
|
|
|
|
kPartitionAUXIsReadable = 0x00000010,
|
|
|
|
|
kPartitionAUXIsWriteable = 0x00000020,
|
|
|
|
|
kPartitionAUXIsBootCodePositionIndependent = 0x00000040,
|
|
|
|
|
kPartitionISMountedAtStartup = 0x40000000,
|
|
|
|
|
kPartitionIsStartup = 0x80000000,
|
|
|
|
|
kPartitionIsChainCompatible = 0x00000100,
|
|
|
|
|
kPartitionIsRealDeviceDriver = 0x00000200,
|
|
|
|
|
kPartitionCanChainToNext = 0x00000400,
|
|
|
|
|
};
|
2006-04-26 15:08:19 +00:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
long ddBlock; /* first block of driver */
|
|
|
|
|
short ddSize; /* driver size in blocks */
|
|
|
|
|
short ddType; /* 1 & -1 for SCSI */
|
|
|
|
|
} driver_entry_t;
|
|
|
|
|
|
|
|
|
|
typedef struct { /* Block 0 of a device */
|
|
|
|
|
short sbSig; /* always 0x4552 */
|
|
|
|
|
short sbBlockSize; /* 512 */
|
|
|
|
|
long sbBlkCount; /* #blocks on device */
|
|
|
|
|
short sbDevType; /* 0 */
|
|
|
|
|
short sbDevID; /* 0 */
|
|
|
|
|
long sbData; /* 0 */
|
|
|
|
|
short sbDrvrCount; /* #driver descriptors */
|
|
|
|
|
|
|
|
|
|
/* driver entries goes here */
|
|
|
|
|
driver_entry_t drivers[61] __attribute__ ((packed));
|
|
|
|
|
|
|
|
|
|
short filler1;
|
|
|
|
|
long filler2;
|
|
|
|
|
} desc_map_t;
|
|
|
|
|
|
|
|
|
|
typedef struct { /* Partition descriptor */
|
|
|
|
|
short pmSig; /* always 0x504d 'PM' */
|
|
|
|
|
short pmSigPad; /* 0 */
|
|
|
|
|
ulong pmMapBlkCnt; /* #blocks in partition map */
|
|
|
|
|
ulong pmPyPartStart; /* first physical block of part. */
|
|
|
|
|
ulong pmPartBlkCnt; /* #blocks in partition */
|
|
|
|
|
char pmPartName[32]; /* partition name */
|
|
|
|
|
char pmPartType[32]; /* partition type */
|
2008-12-11 20:30:53 +00:00
|
|
|
|
2006-04-26 15:08:19 +00:00
|
|
|
/* these fields may or may not be used */
|
|
|
|
|
ulong pmLgDataStart;
|
|
|
|
|
ulong pmDataCnt;
|
|
|
|
|
ulong pmPartStatus;
|
|
|
|
|
ulong pmLgBootStart;
|
|
|
|
|
ulong pmBootSize;
|
|
|
|
|
ulong pmBootLoad;
|
|
|
|
|
ulong pmBootLoad2;
|
|
|
|
|
ulong pmBootEntry;
|
|
|
|
|
ulong pmBootEntry2;
|
|
|
|
|
ulong pmBootCksum;
|
|
|
|
|
char pmProcessor[16];
|
|
|
|
|
|
|
|
|
|
char filler[376]; /* might contain extra information */
|
|
|
|
|
} part_entry_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _H_PARTITION_TABLE */
|