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