blob: 5f396c94089da0eb3378b6dbc0fa9ff3c9b7edaa [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
46
47#define MAC_PARTITION_MAGIC 0x504d
48
49/* type field value for A/UX or other Unix partitions */
50#define APPLE_AUX_TYPE "Apple_UNIX_SVR2"
51
52/*
53 * Each Partition Map entry (in blocks 1 ... N) has this format:
54 */
55typedef struct mac_partition {
56 __u16 signature; /* expected to be MAC_PARTITION_MAGIC */
57 __u16 sig_pad; /* reserved */
58 __u32 map_count; /* # blocks in partition map */
59 __u32 start_block; /* abs. starting block # of partition */
60 __u32 block_count; /* number of blocks in partition */
61 uchar name[32]; /* partition name */
62 uchar type[32]; /* string type description */
63 __u32 data_start; /* rel block # of first data block */
64 __u32 data_count; /* number of data blocks */
65 __u32 status; /* partition status bits */
66 __u32 boot_start; /* first block of boot code */
67 __u32 boot_size; /* size of boot code, in bytes */
68 __u32 boot_load; /* boot code load address */
69 __u32 boot_load2; /* reserved */
70 __u32 boot_entry; /* boot code entry point */
71 __u32 boot_entry2; /* reserved */
72 __u32 boot_cksum; /* boot code checksum */
73 uchar processor[16]; /* Type of Processor */
74 __u16 part_pad[188]; /* reserved */
Patrick Delaunay1acc0082017-01-27 11:00:38 +010075#if CONFIG_IS_ENABLED(ISO_PARTITION)
wdenk8bde7f72003-06-27 21:31:46 +000076 uchar iso_dummy[2048];/* Reservere enough room for an ISO partition block to fit */
wdenkc7de8292002-11-19 11:04:11 +000077#endif
wdenkfe8c2802002-11-03 00:38:21 +000078} mac_partition_t;
79
80#define MAC_STATUS_BOOTABLE 8 /* partition is bootable */
81
82#endif /* _DISK_PART_MAC_H */