summaryrefslogtreecommitdiffstats
path: root/disk/part_amiga.h
diff options
context:
space:
mode:
authorwdenk <wdenk>2002-11-19 11:04:11 +0000
committerwdenk <wdenk>2002-11-19 11:04:11 +0000
commitc7de829c796978e519984df2f1c8cfcf921a39a4 (patch)
tree43e42aa9a09f5265783c1622a5cea080471ef50e /disk/part_amiga.h
parent2262cfeef91458b01a1bfe3812ccbbfdf8b82807 (diff)
downloadbootable_bootloader_goldelico_gta04-c7de829c796978e519984df2f1c8cfcf921a39a4.zip
bootable_bootloader_goldelico_gta04-c7de829c796978e519984df2f1c8cfcf921a39a4.tar.gz
bootable_bootloader_goldelico_gta04-c7de829c796978e519984df2f1c8cfcf921a39a4.tar.bz2
* Patch by Thomas Frieden, 13 Nov 2002:
Add code for AmigaOne board (preliminary merge to U-Boot, still WIP) * Patch by Jon Diekema, 12 Nov 2002: - Adding URL for IEEE OUI lookup - Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED being defined. - In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and root-on-nfs macros are designed to switch how the default boot method gets defined.
Diffstat (limited to 'disk/part_amiga.h')
-rw-r--r--disk/part_amiga.h157
1 files changed, 157 insertions, 0 deletions
diff --git a/disk/part_amiga.h b/disk/part_amiga.h
new file mode 100644
index 0000000..9e59be9
--- /dev/null
+++ b/disk/part_amiga.h
@@ -0,0 +1,157 @@
+/*
+ * (C) Copyright 2000
+ * Hans-Joerg Frieden, Hyperion Entertainment
+ * Hans-JoergF@hyperion-entertainment.com
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _DISK_PART_AMIGA_H
+#define _DISK_PART_AMIGA_H
+#include <common.h>
+
+#ifdef CONFIG_ISO_PARTITION
+/* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS
+ have 2048 byte blocks */
+#define DEFAULT_SECTOR_SIZE 2048
+#else
+#define DEFAULT_SECTOR_SIZE 512
+#endif
+
+
+#define AMIGA_BLOCK_LIMIT 16
+
+/*
+ * Amiga disks have a very open structure. The head for the partition table information
+ * is stored somewhere within the first 16 blocks on disk, and is called the
+ * "RigidDiskBlock".
+ */
+
+struct rigid_disk_block
+{
+ u32 id;
+ u32 summed_longs;
+ s32 chk_sum;
+ u32 host_id;
+ u32 block_bytes;
+ u32 flags;
+ u32 bad_block_list;
+ u32 partition_list;
+ u32 file_sys_header_list;
+ u32 drive_init;
+ u32 bootcode_block;
+ u32 reserved_1[5];
+
+ /* Physical drive geometry */
+ u32 cylinders;
+ u32 sectors;
+ u32 heads;
+ u32 interleave;
+ u32 park;
+ u32 reserved_2[3];
+ u32 write_pre_comp;
+ u32 reduced_write;
+ u32 step_rate;
+ u32 reserved_3[5];
+
+ /* logical drive geometry */
+ u32 rdb_blocks_lo;
+ u32 rdb_blocks_hi;
+ u32 lo_cylinder;
+ u32 hi_cylinder;
+ u32 cyl_blocks;
+ u32 auto_park_seconds;
+ u32 high_rdsk_block;
+ u32 reserved_4;
+
+ char disk_vendor[8];
+ char disk_product[16];
+ char disk_revision[4];
+ char controller_vendor[8];
+ char controller_product[16];
+ char controller_revision[4];
+
+ u32 reserved_5[10];
+};
+
+/*
+ * Each partition on this drive is defined by such a block
+ */
+
+struct partition_block
+{
+ u32 id;
+ u32 summed_longs;
+ s32 chk_sum;
+ u32 host_id;
+ u32 next;
+ u32 flags;
+ u32 reserved_1[2];
+ u32 dev_flags;
+ char drive_name[32];
+ u32 reserved_2[15];
+ u32 environment[17];
+ u32 reserved_3[15];
+};
+
+struct bootcode_block
+{
+ u32 id;
+ u32 summed_longs;
+ s32 chk_sum;
+ u32 host_id;
+ u32 next;
+ u32 load_data[123];
+};
+
+
+#define AMIGA_ID_RDISK 0x5244534B
+#define AMIGA_ID_PART 0x50415254
+#define AMIGA_ID_BOOT 0x424f4f54
+
+/*
+ * The environment array in the partition block
+ * describes the partition
+ */
+
+struct amiga_part_geometry
+{
+ u32 table_size;
+ u32 size_blocks;
+ u32 unused1;
+ u32 surfaces;
+ u32 sector_per_block;
+ u32 block_per_track;
+ u32 reserved;
+ u32 prealloc;
+ u32 interleave;
+ u32 low_cyl;
+ u32 high_cyl;
+ u32 num_buffers;
+ u32 buf_mem_type;
+ u32 max_transfer;
+ u32 mask;
+ s32 boot_priority;
+ u32 dos_type;
+ u32 baud;
+ u32 control;
+ u32 boot_blocks;
+};
+
+#endif /* _DISK_PART_AMIGA_H_ */