|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: /* ! 26: * Copyright (c) 1997 Apple Computer, Inc. ! 27: * ! 28: * disk.h ! 29: * Apple partition map definitions and data structures ! 30: * ! 31: * DPME = Disk Partition Map Entry ! 32: * ! 33: * Each entry is (and shall remain) 512 bytes long. ! 34: * For more information see: ! 35: * "Inside Macintosh: Devices" pages 3-12 to 3-15. ! 36: * "Inside Macintosh - Volume V" pages V-576 to V-582 ! 37: * "Inside Macintosh - Volume IV" page IV-292 ! 38: * ! 39: * HISTORY ! 40: * ! 41: * 11 Jun 97 Dieter Siegmund at Apple. ! 42: * Taken from Eryk Vershen's dpme.h. ! 43: */ ! 44: /* ! 45: * Copyright 1996 by Apple Computer, Inc. ! 46: * All Rights Reserved ! 47: * ! 48: * Permission to use, copy, modify, and distribute this software and ! 49: * its documentation for any purpose and without fee is hereby granted, ! 50: * provided that the above copyright notice appears in all copies and ! 51: * that both the copyright notice and this permission notice appear in ! 52: * supporting documentation. ! 53: * ! 54: * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE ! 55: * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! 56: * FOR A PARTICULAR PURPOSE. ! 57: * ! 58: * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR ! 59: * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM ! 60: * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, ! 61: * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION ! 62: * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ! 63: */ ! 64: ! 65: #define BLOCK0_SIGNATURE 0x4552 /* Signature value. */ ! 66: #define DPISTRLEN 32 ! 67: #define DPME_SIGNATURE 0x504D ! 68: ! 69: #define RHAPSODY_PART_TYPE "Apple_Rhapsody_UFS" /* native partition type */ ! 70: ! 71: typedef unsigned char u8; ! 72: typedef unsigned short u16; ! 73: typedef unsigned long u32; ! 74: ! 75: // Physical block zero of the disk has this format ! 76: struct Block0 { ! 77: u16 sbSig; /* unique value for SCSI block 0 */ ! 78: u16 sbBlkSize; /* block size of device */ ! 79: u32 sbBlkCount; /* number of blocks on device */ ! 80: u16 sbDevType; /* device type */ ! 81: u16 sbDevId; /* device id */ ! 82: u32 sbData; /* not used */ ! 83: u16 sbDrvrCount; /* driver descriptor count */ ! 84: u16 sbMap[247]; /* descriptor map */ ! 85: }; ! 86: typedef struct Block0 Block0; ! 87: ! 88: struct DDMap { ! 89: u32 ddBlock; /* 1st driver's starting block */ ! 90: u16 ddSize; /* size of 1st driver (512-byte blks) */ ! 91: u16 ddType; /* system type (1 for Mac+) */ ! 92: }; ! 93: typedef struct DDMap DDMap; ! 94: ! 95: // Each partition map entry (blocks 1 through n) has this format ! 96: struct dpme { ! 97: u16 dpme_signature ; ! 98: u16 dpme_reserved_1 ; ! 99: u32 dpme_map_entries ; ! 100: u32 dpme_pblock_start ; ! 101: u32 dpme_pblocks ; ! 102: char dpme_name[DPISTRLEN] ; /* name of partition */ ! 103: char dpme_type[DPISTRLEN] ; /* type of partition */ ! 104: u32 dpme_lblock_start ; ! 105: u32 dpme_lblocks ; ! 106: u32 dpme_flags; ! 107: #if 0 ! 108: u32 dpme_reserved_2 : 23 ; /* Bit 9 through 31. */ ! 109: u32 dpme_os_specific_1 : 1 ; /* Bit 8. */ ! 110: u32 dpme_os_specific_2 : 1 ; /* Bit 7. */ ! 111: u32 dpme_os_pic_code : 1 ; /* Bit 6. */ ! 112: u32 dpme_writable : 1 ; /* Bit 5. */ ! 113: u32 dpme_readable : 1 ; /* Bit 4. */ ! 114: u32 dpme_bootable : 1 ; /* Bit 3. */ ! 115: u32 dpme_in_use : 1 ; /* Bit 2. */ ! 116: u32 dpme_allocated : 1 ; /* Bit 1. */ ! 117: u32 dpme_valid : 1 ; /* Bit 0. */ ! 118: #endif ! 119: u32 dpme_boot_block ; ! 120: u32 dpme_boot_bytes ; ! 121: u8 *dpme_load_addr ; ! 122: u8 *dpme_load_addr_2 ; ! 123: u8 *dpme_goto_addr ; ! 124: u8 *dpme_goto_addr_2 ; ! 125: u32 dpme_checksum ; ! 126: char dpme_process_id[16] ; ! 127: u32 dpme_boot_args[32] ; ! 128: u32 dpme_reserved_3[62] ; ! 129: }; ! 130: typedef struct dpme DPME; ! 131:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.