part_amiga.h 2.7 KB

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