part_amiga.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /*
  2. * (C) Copyright 2000
  3. * Hans-Joerg Frieden, Hyperion Entertainment
  4. * Hans-JoergF@hyperion-entertainment.com
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef _DISK_PART_AMIGA_H
  9. #define _DISK_PART_AMIGA_H
  10. #include <common.h>
  11. #ifdef CONFIG_ISO_PARTITION
  12. /* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS
  13. have 2048 byte blocks */
  14. #define DEFAULT_SECTOR_SIZE 2048
  15. #else
  16. #define DEFAULT_SECTOR_SIZE 512
  17. #endif
  18. #define AMIGA_BLOCK_LIMIT 16
  19. /*
  20. * Amiga disks have a very open structure. The head for the partition table information
  21. * is stored somewhere within the first 16 blocks on disk, and is called the
  22. * "RigidDiskBlock".
  23. */
  24. struct rigid_disk_block
  25. {
  26. u32 id;
  27. u32 summed_longs;
  28. s32 chk_sum;
  29. u32 host_id;
  30. u32 block_bytes;
  31. u32 flags;
  32. u32 bad_block_list;
  33. u32 partition_list;
  34. u32 file_sys_header_list;
  35. u32 drive_init;
  36. u32 bootcode_block;
  37. u32 reserved_1[5];
  38. /* Physical drive geometry */
  39. u32 cylinders;
  40. u32 sectors;
  41. u32 heads;
  42. u32 interleave;
  43. u32 park;
  44. u32 reserved_2[3];
  45. u32 write_pre_comp;
  46. u32 reduced_write;
  47. u32 step_rate;
  48. u32 reserved_3[5];
  49. /* logical drive geometry */
  50. u32 rdb_blocks_lo;
  51. u32 rdb_blocks_hi;
  52. u32 lo_cylinder;
  53. u32 hi_cylinder;
  54. u32 cyl_blocks;
  55. u32 auto_park_seconds;
  56. u32 high_rdsk_block;
  57. u32 reserved_4;
  58. char disk_vendor[8];
  59. char disk_product[16];
  60. char disk_revision[4];
  61. char controller_vendor[8];
  62. char controller_product[16];
  63. char controller_revision[4];
  64. u32 reserved_5[10];
  65. };
  66. /*
  67. * Each partition on this drive is defined by such a block
  68. */
  69. struct partition_block
  70. {
  71. u32 id;
  72. u32 summed_longs;
  73. s32 chk_sum;
  74. u32 host_id;
  75. u32 next;
  76. u32 flags;
  77. u32 reserved_1[2];
  78. u32 dev_flags;
  79. char drive_name[32];
  80. u32 reserved_2[15];
  81. u32 environment[17];
  82. u32 reserved_3[15];
  83. };
  84. struct bootcode_block
  85. {
  86. u32 id;
  87. u32 summed_longs;
  88. s32 chk_sum;
  89. u32 host_id;
  90. u32 next;
  91. u32 load_data[123];
  92. };
  93. #define AMIGA_ID_RDISK 0x5244534B
  94. #define AMIGA_ID_PART 0x50415254
  95. #define AMIGA_ID_BOOT 0x424f4f54
  96. /*
  97. * The environment array in the partition block
  98. * describes the partition
  99. */
  100. struct amiga_part_geometry
  101. {
  102. u32 table_size;
  103. u32 size_blocks;
  104. u32 unused1;
  105. u32 surfaces;
  106. u32 sector_per_block;
  107. u32 block_per_track;
  108. u32 reserved;
  109. u32 prealloc;
  110. u32 interleave;
  111. u32 low_cyl;
  112. u32 high_cyl;
  113. u32 num_buffers;
  114. u32 buf_mem_type;
  115. u32 max_transfer;
  116. u32 mask;
  117. s32 boot_priority;
  118. u32 dos_type;
  119. u32 baud;
  120. u32 control;
  121. u32 boot_blocks;
  122. };
  123. #endif /* _DISK_PART_AMIGA_H_ */