blob: 7b754e16a97c0a063bedb45defde6559c2c2e199 [file] [log] [blame]
wdenkfe8c2802002-11-03 00:38:21 +00001/*
2 * (C) Copyright 2000
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkfe8c2802002-11-03 00:38:21 +00006 */
7
8/*
9 * See also Linux sources, fs/partitions/mac.h
10 *
11 * This file describes structures and values related to the standard
12 * Apple SCSI disk partitioning scheme. For more information see:
13 * http://developer.apple.com/techpubs/mac/Devices/Devices-126.html#MARKER-14-92
14 */
15
16#ifndef _DISK_PART_MAC_H
17#define _DISK_PART_MAC_H
18
19#define MAC_DRIVER_MAGIC 0x4552
20
21/*
22 * Driver Descriptor Structure, in block 0.
23 * This block is (and shall remain) 512 bytes long.
24 * Note that there is an alignment problem for the driver descriptor map!
25 */
26typedef struct mac_driver_desc {
27 __u16 signature; /* expected to be MAC_DRIVER_MAGIC */
28 __u16 blk_size; /* block size of device */
29 __u32 blk_count; /* number of blocks on device */
30 __u16 dev_type; /* device type */
31 __u16 dev_id; /* device id */
32 __u32 data; /* reserved */
33 __u16 drvr_cnt; /* number of driver descriptor entries */
34 __u16 drvr_map[247]; /* driver descriptor map */
35} mac_driver_desc_t;
36
37/*
38 * Device Driver Entry
39 * (Cannot be included in mac_driver_desc because of alignment problems)
40 */
41typedef struct mac_driver_entry {
42 __u32 block; /* block number of starting block */
43 __u16 size; /* size of driver, in 512 byte blocks */
44 __u16 type; /* OS Type */
45} mac_driver_entry_t;
46
47
48#define MAC_PARTITION_MAGIC 0x504d
49
50/* type field value for A/UX or other Unix partitions */
51#define APPLE_AUX_TYPE "Apple_UNIX_SVR2"
52
53/*
54 * Each Partition Map entry (in blocks 1 ... N) has this format:
55 */
56typedef struct mac_partition {
57 __u16 signature; /* expected to be MAC_PARTITION_MAGIC */
58 __u16 sig_pad; /* reserved */
59 __u32 map_count; /* # blocks in partition map */
60 __u32 start_block; /* abs. starting block # of partition */
61 __u32 block_count; /* number of blocks in partition */
62 uchar name[32]; /* partition name */
63 uchar type[32]; /* string type description */
64 __u32 data_start; /* rel block # of first data block */
65 __u32 data_count; /* number of data blocks */
66 __u32 status; /* partition status bits */
67 __u32 boot_start; /* first block of boot code */
68 __u32 boot_size; /* size of boot code, in bytes */
69 __u32 boot_load; /* boot code load address */
70 __u32 boot_load2; /* reserved */
71 __u32 boot_entry; /* boot code entry point */
72 __u32 boot_entry2; /* reserved */
73 __u32 boot_cksum; /* boot code checksum */
74 uchar processor[16]; /* Type of Processor */
75 __u16 part_pad[188]; /* reserved */
wdenkc7de8292002-11-19 11:04:11 +000076#ifdef CONFIG_ISO_PARTITION
wdenk8bde7f72003-06-27 21:31:46 +000077 uchar iso_dummy[2048];/* Reservere enough room for an ISO partition block to fit */
wdenkc7de8292002-11-19 11:04:11 +000078#endif
wdenkfe8c2802002-11-03 00:38:21 +000079} mac_partition_t;
80
81#define MAC_STATUS_BOOTABLE 8 /* partition is bootable */
82
83#endif /* _DISK_PART_MAC_H */