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