part_mac.h 2.7 KB

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