part_mac.h 2.7 KB

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