Root/
Source at commit 1580 created 12 years 9 months ago. By blackosx, Attempted to enable 'exclusive' choices in auto generated boot options, but it's not working at present. I've added notes to remind me to look again at some point. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * This file contains Original Code and/or Modifications of Original Code␊ |
7 | * as defined in and that are subject to the Apple Public Source License␊ |
8 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
9 | * compliance with the License. Please obtain a copy of the License at␊ |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
11 | * file.␊ |
12 | * ␊ |
13 | * The Original Code and all software distributed under the License are␊ |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
18 | * Please see the License for the specific language governing rights and␊ |
19 | * limitations under the License.␊ |
20 | * ␊ |
21 | * @APPLE_LICENSE_HEADER_END@␊ |
22 | */␊ |
23 | ␊ |
24 | /*␊ |
25 | * This header contains the IOApplePartitionScheme class definition.␊ |
26 | */␊ |
27 | ␊ |
28 | #ifndef _IOAPPLEPARTITIONSCHEME_H␊ |
29 | #define _IOAPPLEPARTITIONSCHEME_H␊ |
30 | ␊ |
31 | #include <IOKit/IOTypes.h>␊ |
32 | ␊ |
33 | /*␊ |
34 | * kIOApplePartitionSchemeClass is the name of the IOApplePartitionScheme class.␊ |
35 | */␊ |
36 | ␊ |
37 | #define kIOApplePartitionSchemeClass "IOApplePartitionScheme"␊ |
38 | ␊ |
39 | /*␊ |
40 | * Apple Partition Map Definitions␊ |
41 | */␊ |
42 | ␊ |
43 | #pragma pack(push, 1) /* (enable 8-bit struct packing) */␊ |
44 | ␊ |
45 | /* Structure constants. */␊ |
46 | ␊ |
47 | #define DPISTRLEN 32␊ |
48 | ␊ |
49 | /* Partition map entry, as found in blocks 1 to dpme_map_entries of the disk. */␊ |
50 | ␊ |
51 | typedef struct dpme␊ |
52 | {␊ |
53 | UInt16 dpme_signature; /* (unique value for partition entry, 'PM') */␊ |
54 | UInt16 dpme_reserved_1; /* (reserved for future use) */␊ |
55 | UInt32 dpme_map_entries; /* (number of partition entries) */␊ |
56 | UInt32 dpme_pblock_start; /* (physical block start of partition) */␊ |
57 | UInt32 dpme_pblocks; /* (physical block count of partition) */␊ |
58 | char dpme_name[DPISTRLEN]; /* (name of partition) */␊ |
59 | char dpme_type[DPISTRLEN]; /* (type of partition, eg. Apple_HFS) */␊ |
60 | UInt32 dpme_lblock_start; /* (logical block start of partition) */␊ |
61 | UInt32 dpme_lblocks; /* (logical block count of partition) */␊ |
62 | UInt32 dpme_flags; /* (partition flags, see defines below) */␊ |
63 | UInt32 dpme_boot_block; /* (logical block start of boot code) */␊ |
64 | UInt32 dpme_boot_bytes; /* (byte count of boot code) */␊ |
65 | UInt32 dpme_load_addr; /* (load address in memory of boot code) */␊ |
66 | UInt32 dpme_load_addr_2; /* (reserved for future use) */␊ |
67 | UInt32 dpme_goto_addr; /* (jump address in memory of boot code) */␊ |
68 | UInt32 dpme_goto_addr_2; /* (reserved for future use) */␊ |
69 | UInt32 dpme_checksum; /* (checksum of boot code) */␊ |
70 | UInt8 dpme_process_id[16]; /* (processor type) */␊ |
71 | UInt32 dpme_reserved_2[32]; /* (reserved for future use) */␊ |
72 | UInt32 dpme_reserved_3[62]; /* (reserved for future use) */␊ |
73 | } DPME;␊ |
74 | ␊ |
75 | /* Driver descriptor map entry. */␊ |
76 | ␊ |
77 | typedef struct DDMap␊ |
78 | {␊ |
79 | UInt32 ddBlock; /* (driver's block start, sbBlkSize-blocks) */␊ |
80 | UInt16 ddSize; /* (driver's block count, 512-blocks) */␊ |
81 | UInt16 ddType; /* (driver's system type) */␊ |
82 | } DDMap;␊ |
83 | ␊ |
84 | /* Driver descriptor map, as found in block zero of the disk. */␊ |
85 | ␊ |
86 | typedef struct Block0␊ |
87 | {␊ |
88 | UInt16 sbSig; /* (unique value for block zero, 'ER') */␊ |
89 | UInt16 sbBlkSize; /* (block size for this device) */␊ |
90 | UInt32 sbBlkCount; /* (block count for this device) */␊ |
91 | UInt16 sbDevType; /* (device type) */␊ |
92 | UInt16 sbDevId; /* (device id) */␊ |
93 | UInt32 sbDrvrData; /* (driver data) */␊ |
94 | UInt16 sbDrvrCount; /* (driver descriptor count) */␊ |
95 | DDMap sbDrvrMap[8]; /* (driver descriptor table) */␊ |
96 | UInt8 sbReserved[430]; /* (reserved for future use) */␊ |
97 | } Block0;␊ |
98 | ␊ |
99 | /* Partition map signature (sbSig). */␊ |
100 | ␊ |
101 | #define BLOCK0_SIGNATURE 0x4552␊ |
102 | ␊ |
103 | /* Partition map entry signature (dpme_signature). */␊ |
104 | ␊ |
105 | #define DPME_SIGNATURE 0x504D␊ |
106 | ␊ |
107 | /* Partition map entry flags (dpme_flags). */␊ |
108 | ␊ |
109 | #define DPME_FLAGS_VALID 0x00000001 /* (bit 0) */␊ |
110 | #define DPME_FLAGS_ALLOCATED 0x00000002 /* (bit 1) */␊ |
111 | #define DPME_FLAGS_IN_USE 0x00000004 /* (bit 2) */␊ |
112 | #define DPME_FLAGS_BOOTABLE 0x00000008 /* (bit 3) */␊ |
113 | #define DPME_FLAGS_READABLE 0x00000010 /* (bit 4) */␊ |
114 | #define DPME_FLAGS_WRITABLE 0x00000020 /* (bit 5) */␊ |
115 | #define DPME_FLAGS_OS_PIC_CODE 0x00000040 /* (bit 6) */␊ |
116 | #define DPME_FLAGS_OS_SPECIFIC_2 0x00000080 /* (bit 7) */␊ |
117 | #define DPME_FLAGS_OS_SPECIFIC_1 0x00000100 /* (bit 8) */␊ |
118 | #define DPME_FLAGS_RESERVED_2 0xFFFFFE00 /* (bit 9..31) */␊ |
119 | ␊ |
120 | #pragma pack(pop) /* (reset to default struct packing) */␊ |
121 | ␊ |
122 | #endif /* !_IOAPPLEPARTITIONSCHEME_H */␊ |
123 |