wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | /* |
| 25 | * See also Linux sources, fs/partitions/mac.h |
| 26 | * |
| 27 | * This file describes structures and values related to the standard |
| 28 | * Apple SCSI disk partitioning scheme. For more information see: |
| 29 | * http://developer.apple.com/techpubs/mac/Devices/Devices-126.html#MARKER-14-92 |
| 30 | */ |
| 31 | |
| 32 | #ifndef _DISK_PART_MAC_H |
| 33 | #define _DISK_PART_MAC_H |
| 34 | |
| 35 | #define MAC_DRIVER_MAGIC 0x4552 |
| 36 | |
| 37 | /* |
| 38 | * Driver Descriptor Structure, in block 0. |
| 39 | * This block is (and shall remain) 512 bytes long. |
| 40 | * Note that there is an alignment problem for the driver descriptor map! |
| 41 | */ |
| 42 | typedef struct mac_driver_desc { |
| 43 | __u16 signature; /* expected to be MAC_DRIVER_MAGIC */ |
| 44 | __u16 blk_size; /* block size of device */ |
| 45 | __u32 blk_count; /* number of blocks on device */ |
| 46 | __u16 dev_type; /* device type */ |
| 47 | __u16 dev_id; /* device id */ |
| 48 | __u32 data; /* reserved */ |
| 49 | __u16 drvr_cnt; /* number of driver descriptor entries */ |
| 50 | __u16 drvr_map[247]; /* driver descriptor map */ |
| 51 | } mac_driver_desc_t; |
| 52 | |
| 53 | /* |
| 54 | * Device Driver Entry |
| 55 | * (Cannot be included in mac_driver_desc because of alignment problems) |
| 56 | */ |
| 57 | typedef struct mac_driver_entry { |
| 58 | __u32 block; /* block number of starting block */ |
| 59 | __u16 size; /* size of driver, in 512 byte blocks */ |
| 60 | __u16 type; /* OS Type */ |
| 61 | } mac_driver_entry_t; |
| 62 | |
| 63 | |
| 64 | #define MAC_PARTITION_MAGIC 0x504d |
| 65 | |
| 66 | /* type field value for A/UX or other Unix partitions */ |
| 67 | #define APPLE_AUX_TYPE "Apple_UNIX_SVR2" |
| 68 | |
| 69 | /* |
| 70 | * Each Partition Map entry (in blocks 1 ... N) has this format: |
| 71 | */ |
| 72 | typedef struct mac_partition { |
| 73 | __u16 signature; /* expected to be MAC_PARTITION_MAGIC */ |
| 74 | __u16 sig_pad; /* reserved */ |
| 75 | __u32 map_count; /* # blocks in partition map */ |
| 76 | __u32 start_block; /* abs. starting block # of partition */ |
| 77 | __u32 block_count; /* number of blocks in partition */ |
| 78 | uchar name[32]; /* partition name */ |
| 79 | uchar type[32]; /* string type description */ |
| 80 | __u32 data_start; /* rel block # of first data block */ |
| 81 | __u32 data_count; /* number of data blocks */ |
| 82 | __u32 status; /* partition status bits */ |
| 83 | __u32 boot_start; /* first block of boot code */ |
| 84 | __u32 boot_size; /* size of boot code, in bytes */ |
| 85 | __u32 boot_load; /* boot code load address */ |
| 86 | __u32 boot_load2; /* reserved */ |
| 87 | __u32 boot_entry; /* boot code entry point */ |
| 88 | __u32 boot_entry2; /* reserved */ |
| 89 | __u32 boot_cksum; /* boot code checksum */ |
| 90 | uchar processor[16]; /* Type of Processor */ |
| 91 | __u16 part_pad[188]; /* reserved */ |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 92 | #ifdef CONFIG_ISO_PARTITION |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 93 | uchar iso_dummy[2048];/* Reservere enough room for an ISO partition block to fit */ |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 94 | #endif |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 95 | } mac_partition_t; |
| 96 | |
| 97 | #define MAC_STATUS_BOOTABLE 8 /* partition is bootable */ |
| 98 | |
| 99 | #endif /* _DISK_PART_MAC_H */ |