2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
28 #include <IOKit/ata/IOATAStandardInterface.h>
29 #include <IOKit/ata/ata-standard/ATAStandardPrivate.h>
32 #define id ((ATAIdentify *)x)
34 EndianTable AppleIdentifyEndianTable
[] =
36 { sizeof(id
->generalConfiguration
), sizeof(UInt16
) },
37 { sizeof(id
->logicalCylinders
), sizeof(UInt16
) },
38 { sizeof(id
->reserved_1
), sizeof(UInt16
) },
39 { sizeof(id
->logicalHeads
), sizeof(UInt16
) },
40 { sizeof(id
->reserved_2
), sizeof(UInt16
) },
41 { sizeof(id
->logicalSectorsPerTrack
), sizeof(UInt16
) },
42 { sizeof(id
->reserved_3
), sizeof(UInt16
) },
43 { sizeof(id
->serialNumber
), sizeof(UInt8
) },
44 { sizeof(id
->reserved_4
), sizeof(UInt16
) },
45 { sizeof(id
->firmwareRevision
), sizeof(UInt8
) },
46 { sizeof(id
->modelNumber
), sizeof(UInt8
) },
47 { sizeof(id
->multipleModeSectors
), sizeof(UInt16
) },
48 { sizeof(id
->reserved_5
), sizeof(UInt16
) },
49 { sizeof(id
->capabilities1
), sizeof(UInt16
) },
50 { sizeof(id
->capabilities2
), sizeof(UInt16
) },
51 { sizeof(id
->pioMode
), sizeof(UInt16
) },
52 { sizeof(id
->reserved_6
), sizeof(UInt16
) },
53 { sizeof(id
->validFields
), sizeof(UInt16
) },
54 { sizeof(id
->currentLogicalCylinders
), sizeof(UInt16
) },
55 { sizeof(id
->currentLogicalHeads
), sizeof(UInt16
) },
56 { sizeof(id
->currentLogicalSectorsPerTrack
), sizeof(UInt16
) },
57 { sizeof(id
->currentAddressableSectors
), sizeof(UInt32
) },
58 { sizeof(id
->currentMultipleModeSectors
), sizeof(UInt16
) },
59 { sizeof(id
->userAddressableSectors
), sizeof(UInt32
) },
60 { sizeof(id
->reserved_7
), sizeof(UInt16
) },
61 { sizeof(id
->dmaModes
), sizeof(UInt16
) },
62 { sizeof(id
->advancedPIOModes
), sizeof(UInt16
) },
63 { sizeof(id
->minDMACycleTime
), sizeof(UInt16
) },
64 { sizeof(id
->recDMACycleTime
), sizeof(UInt16
) },
65 { sizeof(id
->minPIOCycleTimeNoIORDY
), sizeof(UInt16
) },
66 { sizeof(id
->minPIOCyclcTimeIORDY
), sizeof(UInt16
) },
67 { sizeof(id
->reserved_8
), sizeof(UInt16
) },
68 { sizeof(id
->busReleaseLatency
), sizeof(UInt16
) },
69 { sizeof(id
->serviceLatency
), sizeof(UInt16
) },
70 { sizeof(id
->reserved_9
), sizeof(UInt16
) },
71 { sizeof(id
->queueDepth
), sizeof(UInt16
) },
72 { sizeof(id
->reserved_10
), sizeof(UInt16
) },
73 { sizeof(id
->versionMajor
), sizeof(UInt16
) },
74 { sizeof(id
->versionMinor
), sizeof(UInt16
) },
75 { sizeof(id
->commandSetsSupported1
), sizeof(UInt16
) },
76 { sizeof(id
->commandSetsSupported2
), sizeof(UInt16
) },
77 { sizeof(id
->commandSetsSupported3
), sizeof(UInt16
) },
78 { sizeof(id
->commandSetsEnabled1
), sizeof(UInt16
) },
79 { sizeof(id
->commandSetsEnabled2
), sizeof(UInt16
) },
80 { sizeof(id
-> commandSetsDefault
), sizeof(UInt16
) },
81 { sizeof(id
->ultraDMAModes
), sizeof(UInt16
) },
82 { sizeof(id
->securityEraseTime
), sizeof(UInt16
) },
83 { sizeof(id
-> securityEnhancedEraseTime
), sizeof(UInt16
) },
84 { sizeof(id
-> currentAdvPowerMgtValue
), sizeof(UInt16
) },
85 { sizeof(id
->reserved_11
), sizeof(UInt16
) },
86 { sizeof(id
->removableMediaSupported
), sizeof(UInt16
) },
87 { sizeof(id
->securityStatus
), sizeof(UInt16
) },
88 { sizeof(id
->reserved_12
), sizeof(UInt16
) },
92 ATAModeTable ApplePIOModes
[] =
94 { 165, 600 }, /* Mode 0 */
100 UInt32 AppleNumPIOModes
= (sizeof(ApplePIOModes
)/sizeof(ATAModeTable
));
102 ATAModeTable AppleDMAModes
[] =
104 { 215, 480 }, /* Mode 0 */
108 UInt32 AppleNumDMAModes
= (sizeof(AppleDMAModes
)/sizeof(ATAModeTable
));
110 ATAModeTable AppleUltraModes
[] =
112 { 0, 114 }, /* Mode 0 */
118 UInt32 AppleNumUltraModes
= (sizeof(AppleUltraModes
)/sizeof(ATAModeTable
));