part_amiga.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. * (C) Copyright 2000
  3. * Hans-Joerg Frieden, Hyperion Entertainment
  4. * Hans-JoergF@hyperion-entertainment.com
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #ifndef _DISK_PART_AMIGA_H
  25. #define _DISK_PART_AMIGA_H
  26. #include <common.h>
  27. #ifdef CONFIG_ISO_PARTITION
  28. /* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS
  29. have 2048 byte blocks */
  30. #define DEFAULT_SECTOR_SIZE 2048
  31. #else
  32. #define DEFAULT_SECTOR_SIZE 512
  33. #endif
  34. #define AMIGA_BLOCK_LIMIT 16
  35. /*
  36. * Amiga disks have a very open structure. The head for the partition table information
  37. * is stored somewhere within the first 16 blocks on disk, and is called the
  38. * "RigidDiskBlock".
  39. */
  40. struct rigid_disk_block
  41. {
  42. u32 id;
  43. u32 summed_longs;
  44. s32 chk_sum;
  45. u32 host_id;
  46. u32 block_bytes;
  47. u32 flags;
  48. u32 bad_block_list;
  49. u32 partition_list;
  50. u32 file_sys_header_list;
  51. u32 drive_init;
  52. u32 bootcode_block;
  53. u32 reserved_1[5];
  54. /* Physical drive geometry */
  55. u32 cylinders;
  56. u32 sectors;
  57. u32 heads;
  58. u32 interleave;
  59. u32 park;
  60. u32 reserved_2[3];
  61. u32 write_pre_comp;
  62. u32 reduced_write;
  63. u32 step_rate;
  64. u32 reserved_3[5];
  65. /* logical drive geometry */
  66. u32 rdb_blocks_lo;
  67. u32 rdb_blocks_hi;
  68. u32 lo_cylinder;
  69. u32 hi_cylinder;
  70. u32 cyl_blocks;
  71. u32 auto_park_seconds;
  72. u32 high_rdsk_block;
  73. u32 reserved_4;
  74. char disk_vendor[8];
  75. char disk_product[16];
  76. char disk_revision[4];
  77. char controller_vendor[8];
  78. char controller_product[16];
  79. char controller_revision[4];
  80. u32 reserved_5[10];
  81. };
  82. /*
  83. * Each partition on this drive is defined by such a block
  84. */
  85. struct partition_block
  86. {
  87. u32 id;
  88. u32 summed_longs;
  89. s32 chk_sum;
  90. u32 host_id;
  91. u32 next;
  92. u32 flags;
  93. u32 reserved_1[2];
  94. u32 dev_flags;
  95. char drive_name[32];
  96. u32 reserved_2[15];
  97. u32 environment[17];
  98. u32 reserved_3[15];
  99. };
  100. struct bootcode_block
  101. {
  102. u32 id;
  103. u32 summed_longs;
  104. s32 chk_sum;
  105. u32 host_id;
  106. u32 next;
  107. u32 load_data[123];
  108. };
  109. #define AMIGA_ID_RDISK 0x5244534B
  110. #define AMIGA_ID_PART 0x50415254
  111. #define AMIGA_ID_BOOT 0x424f4f54
  112. /*
  113. * The environment array in the partition block
  114. * describes the partition
  115. */
  116. struct amiga_part_geometry
  117. {
  118. u32 table_size;
  119. u32 size_blocks;
  120. u32 unused1;
  121. u32 surfaces;
  122. u32 sector_per_block;
  123. u32 block_per_track;
  124. u32 reserved;
  125. u32 prealloc;
  126. u32 interleave;
  127. u32 low_cyl;
  128. u32 high_cyl;
  129. u32 num_buffers;
  130. u32 buf_mem_type;
  131. u32 max_transfer;
  132. u32 mask;
  133. s32 boot_priority;
  134. u32 dos_type;
  135. u32 baud;
  136. u32 control;
  137. u32 boot_blocks;
  138. };
  139. #endif /* _DISK_PART_AMIGA_H_ */