part_mac.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * (C) Copyright 2000
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. /*
  24. * See also Linux sources, fs/partitions/mac.h
  25. *
  26. * This file describes structures and values related to the standard
  27. * Apple SCSI disk partitioning scheme. For more information see:
  28. * http://developer.apple.com/techpubs/mac/Devices/Devices-126.html#MARKER-14-92
  29. */
  30. #ifndef _DISK_PART_MAC_H
  31. #define _DISK_PART_MAC_H
  32. #define MAC_DRIVER_MAGIC 0x4552
  33. /*
  34. * Driver Descriptor Structure, in block 0.
  35. * This block is (and shall remain) 512 bytes long.
  36. * Note that there is an alignment problem for the driver descriptor map!
  37. */
  38. typedef struct mac_driver_desc {
  39. __u16 signature; /* expected to be MAC_DRIVER_MAGIC */
  40. __u16 blk_size; /* block size of device */
  41. __u32 blk_count; /* number of blocks on device */
  42. __u16 dev_type; /* device type */
  43. __u16 dev_id; /* device id */
  44. __u32 data; /* reserved */
  45. __u16 drvr_cnt; /* number of driver descriptor entries */
  46. __u16 drvr_map[247]; /* driver descriptor map */
  47. } mac_driver_desc_t;
  48. /*
  49. * Device Driver Entry
  50. * (Cannot be included in mac_driver_desc because of alignment problems)
  51. */
  52. typedef struct mac_driver_entry {
  53. __u32 block; /* block number of starting block */
  54. __u16 size; /* size of driver, in 512 byte blocks */
  55. __u16 type; /* OS Type */
  56. } mac_driver_entry_t;
  57. #define MAC_PARTITION_MAGIC 0x504d
  58. /* type field value for A/UX or other Unix partitions */
  59. #define APPLE_AUX_TYPE "Apple_UNIX_SVR2"
  60. /*
  61. * Each Partition Map entry (in blocks 1 ... N) has this format:
  62. */
  63. typedef struct mac_partition {
  64. __u16 signature; /* expected to be MAC_PARTITION_MAGIC */
  65. __u16 sig_pad; /* reserved */
  66. __u32 map_count; /* # blocks in partition map */
  67. __u32 start_block; /* abs. starting block # of partition */
  68. __u32 block_count; /* number of blocks in partition */
  69. uchar name[32]; /* partition name */
  70. uchar type[32]; /* string type description */
  71. __u32 data_start; /* rel block # of first data block */
  72. __u32 data_count; /* number of data blocks */
  73. __u32 status; /* partition status bits */
  74. __u32 boot_start; /* first block of boot code */
  75. __u32 boot_size; /* size of boot code, in bytes */
  76. __u32 boot_load; /* boot code load address */
  77. __u32 boot_load2; /* reserved */
  78. __u32 boot_entry; /* boot code entry point */
  79. __u32 boot_entry2; /* reserved */
  80. __u32 boot_cksum; /* boot code checksum */
  81. uchar processor[16]; /* Type of Processor */
  82. __u16 part_pad[188]; /* reserved */
  83. #ifdef CONFIG_ISO_PARTITION
  84. uchar iso_dummy[2048];/* Reservere enough room for an ISO partition block to fit */
  85. #endif
  86. } mac_partition_t;
  87. #define MAC_STATUS_BOOTABLE 8 /* partition is bootable */
  88. #endif /* _DISK_PART_MAC_H */