2 * Creation Date: <1999/07/06 15:45:12 samuel>
3 * Time-stamp: <2002/10/20 16:31:48 samuel>
7 * Headers describing the partition table
9 * Copyright (C) 1999, 2002 Samuel Rydh (samuel@ibrium.se)
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation
17 #ifndef _H_PARTITION_TABLE
18 #define _H_PARTITION_TABLE
20 /* This information is based upon IM vol V. */
22 #define DESC_MAP_SIGNATURE 0x4552
23 #define DESC_PART_SIGNATURE 0x504d
26 kPartitionAUXIsValid
= 0x00000001,
27 kPartitionAUXIsAllocated
= 0x00000002,
28 kPartitionAUXIsInUse
= 0x00000004,
29 kPartitionAUXIsBootValid
= 0x00000008,
30 kPartitionAUXIsReadable
= 0x00000010,
31 kPartitionAUXIsWriteable
= 0x00000020,
32 kPartitionAUXIsBootCodePositionIndependent
= 0x00000040,
33 kPartitionISMountedAtStartup
= 0x40000000,
34 kPartitionIsStartup
= 0x80000000,
35 kPartitionIsChainCompatible
= 0x00000100,
36 kPartitionIsRealDeviceDriver
= 0x00000200,
37 kPartitionCanChainToNext
= 0x00000400,
41 u32 ddBlock
; /* first block of driver */
42 u16 ddSize
; /* driver size in blocks */
43 s16 ddType
; /* 1 & -1 for SCSI */
46 typedef struct { /* Block 0 of a device */
47 u16 sbSig
; /* always 0x4552 */
48 u16 sbBlockSize
; /* 512 */
49 s32 sbBlkCount
; /* #blocks on device */
50 u16 sbDevType
; /* 0 */
53 s16 sbDrvrCount
; /* #driver descriptors */
55 /* driver entries goes here */
56 driver_entry_t drivers
[61] __attribute__ ((packed
));
62 typedef struct { /* Partition descriptor */
63 u16 pmSig
; /* always 0x504d 'PM' */
65 u32 pmMapBlkCnt
; /* #blocks in partition map */
66 u32 pmPyPartStart
; /* first physical block of part. */
67 u32 pmPartBlkCnt
; /* #blocks in partition */
68 char pmPartName
[32]; /* partition name */
69 char pmPartType
[32]; /* partition type */
71 /* these fields may or may not be used */
84 char filler
[376]; /* might contain extra information */
88 #endif /* _H_PARTITION_TABLE */