18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  fs/partitions/mac.h
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#define MAC_PARTITION_MAGIC	0x504d
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci/* type field value for A/UX or other Unix partitions */
98c2ecf20Sopenharmony_ci#define APPLE_AUX_TYPE	"Apple_UNIX_SVR2"
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_cistruct mac_partition {
128c2ecf20Sopenharmony_ci	__be16	signature;	/* expected to be MAC_PARTITION_MAGIC */
138c2ecf20Sopenharmony_ci	__be16	res1;
148c2ecf20Sopenharmony_ci	__be32	map_count;	/* # blocks in partition map */
158c2ecf20Sopenharmony_ci	__be32	start_block;	/* absolute starting block # of partition */
168c2ecf20Sopenharmony_ci	__be32	block_count;	/* number of blocks in partition */
178c2ecf20Sopenharmony_ci	char	name[32];	/* partition name */
188c2ecf20Sopenharmony_ci	char	type[32];	/* string type description */
198c2ecf20Sopenharmony_ci	__be32	data_start;	/* rel block # of first data block */
208c2ecf20Sopenharmony_ci	__be32	data_count;	/* number of data blocks */
218c2ecf20Sopenharmony_ci	__be32	status;		/* partition status bits */
228c2ecf20Sopenharmony_ci	__be32	boot_start;
238c2ecf20Sopenharmony_ci	__be32	boot_size;
248c2ecf20Sopenharmony_ci	__be32	boot_load;
258c2ecf20Sopenharmony_ci	__be32	boot_load2;
268c2ecf20Sopenharmony_ci	__be32	boot_entry;
278c2ecf20Sopenharmony_ci	__be32	boot_entry2;
288c2ecf20Sopenharmony_ci	__be32	boot_cksum;
298c2ecf20Sopenharmony_ci	char	processor[16];	/* identifies ISA of boot */
308c2ecf20Sopenharmony_ci	/* there is more stuff after this that we don't need */
318c2ecf20Sopenharmony_ci};
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define MAC_STATUS_BOOTABLE	8	/* partition is bootable */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#define MAC_DRIVER_MAGIC	0x4552
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci/* Driver descriptor structure, in block 0 */
388c2ecf20Sopenharmony_cistruct mac_driver_desc {
398c2ecf20Sopenharmony_ci	__be16	signature;	/* expected to be MAC_DRIVER_MAGIC */
408c2ecf20Sopenharmony_ci	__be16	block_size;
418c2ecf20Sopenharmony_ci	__be32	block_count;
428c2ecf20Sopenharmony_ci    /* ... more stuff */
438c2ecf20Sopenharmony_ci};
448c2ecf20Sopenharmony_ci
45