1/* 2 * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23 24#ifndef _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ 25#define _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ 26 27#include <IOKit/storage/IOStorageProtocolCharacteristics.h> 28 29/* 30 * Device Characteristics - Characteristics defined for devices. 31 */ 32 33/*! 34@defined kIOPropertyDeviceCharacteristicsKey 35@discussion This key is used to define Device Characteristics for a particular 36device and it has an associated dictionary which lists the 37device characteristics. The device characteristics are Command Set specific 38and are listed in the header files for each command set. 39 40Requirement: Mandatory 41 42Example: 43<pre> 44@textblock 45<dict> 46 <key>Device Characteristics</key> 47 <dict> 48 <key>Vendor Name</key> 49 <string>Apple</string> 50 <key>Product Name</key> 51 <string>iPod</string> 52 <key>Product Revision Level</key> 53 <string>1.0</string> 54 </dict> 55</dict> 56@/textblock 57</pre> 58*/ 59#define kIOPropertyDeviceCharacteristicsKey "Device Characteristics" 60 61 62/*! 63@defined kIOPropertyVendorNameKey 64@discussion This key is used to define the Vendor Name for a particular device 65and it has an associated string. 66 67Requirement: Mandatory 68 69Example: 70<pre> 71@textblock 72<dict> 73 <key>Device Characteristics</key> 74 <dict> 75 <key>Vendor Name</key> 76 <string>Apple</string> 77 <key>Product Name</key> 78 <string>iPod</string> 79 <key>Product Revision Level</key> 80 <string>1.0</string> 81 </dict> 82</dict> 83@/textblock 84</pre> 85*/ 86#define kIOPropertyVendorNameKey "Vendor Name" 87 88 89/*! 90@defined kIOPropertyProductNameKey 91@discussion This key is used to define the Product Name for a particular device 92and it has an associated string. 93 94Requirement: Mandatory 95 96Example: 97<pre> 98@textblock 99<dict> 100 <key>Device Characteristics</key> 101 <dict> 102 <key>Vendor Name</key> 103 <string>Apple</string> 104 <key>Product Name</key> 105 <string>iPod</string> 106 <key>Product Revision Level</key> 107 <string>1.0</string> 108 </dict> 109</dict> 110@/textblock 111</pre> 112*/ 113#define kIOPropertyProductNameKey "Product Name" 114 115 116/*! 117@defined kIOPropertyProductRevisionLevelKey 118@discussion This key is used to define the Product Revision Level for a 119particular device and it has an associated string. 120 121Requirement: Mandatory 122 123Example: 124<pre> 125@textblock 126<dict> 127 <key>Device Characteristics</key> 128 <dict> 129 <key>Vendor Name</key> 130 <string>Apple</string> 131 <key>Product Name</key> 132 <string>iPod</string> 133 <key>Product Revision Level</key> 134 <string>1.0</string> 135 </dict> 136</dict> 137@/textblock 138</pre> 139*/ 140#define kIOPropertyProductRevisionLevelKey "Product Revision Level" 141 142 143/*! 144@defined kIOPropertyProductSerialNumberKey 145@discussion This key is used to define the Product Serial Number for a 146particular device and it has an associated data. 147 148Requirement: Mandatory 149 150Example: 151<pre> 152@textblock 153<dict> 154 <key>Device Characteristics</key> 155 <dict> 156 <key>Vendor Name</key> 157 <string>Apple</string> 158 <key>Product Name</key> 159 <string>iPod</string> 160 <key>Product Revision Level</key> 161 <string>1.0</string> 162 <key>Serial Number</key> 163 <string>123456789</string> 164 </dict> 165</dict> 166@/textblock 167</pre> 168*/ 169#define kIOPropertyProductSerialNumberKey "Serial Number" 170 171 172/*! 173@defined kIOPropertySupportedCDFeaturesKey 174@discussion This key is used to define the supported CD Features for a 175particular optical device and it has an associated bitfield. See 176<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the 177bits and associated bitmasks. 178 179Requirement: Mandatory for optical devices (Peripheral Device Type 05h). 180 181Example: 182<pre> 183@textblock 184<dict> 185 <key>Device Characteristics</key> 186 <dict> 187 <key>Vendor Name</key> 188 <string>Apple</string> 189 <key>Product Name</key> 190 <string>SuperDrive</string> 191 <key>Product Revision Level</key> 192 <string>1.0</string> 193 <key>CD Features</key> 194 <integer>1663</integer> 195 <key>DVD Features</key> 196 <integer>103</integer> 197 </dict> 198</dict> 199@/textblock 200</pre> 201*/ 202#define kIOPropertySupportedCDFeaturesKey "CD Features" 203 204 205/*! 206@defined kIOPropertySupportedDVDFeaturesKey 207@discussion This key is used to define the supported DVD Features for a 208particular optical device and it has an associated bitfield. See 209<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the 210bits and associated bitmasks. 211 212Requirement: Mandatory for optical devices (Peripheral Device Type 05h). 213 214Example: 215<pre> 216@textblock 217<dict> 218 <key>Device Characteristics</key> 219 <dict> 220 <key>Vendor Name</key> 221 <string>Apple</string> 222 <key>Product Name</key> 223 <string>SuperDrive</string> 224 <key>Product Revision Level</key> 225 <string>1.0</string> 226 <key>CD Features</key> 227 <integer>1663</integer> 228 <key>DVD Features</key> 229 <integer>103</integer> 230 </dict> 231</dict> 232@/textblock 233</pre> 234*/ 235#define kIOPropertySupportedDVDFeaturesKey "DVD Features" 236 237 238/*! 239@defined kIOPropertySupportedBDFeaturesKey 240@discussion This key is used to define the supported BD Features for a 241particular optical device and it has an associated bitfield. See 242<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the 243bits and associated bitmasks. 244 245Requirement: Mandatory for optical devices (Peripheral Device Type 05h). 246 247Example: 248<pre> 249@textblock 250<dict> 251 <key>Device Characteristics</key> 252 <dict> 253 <key>Vendor Name</key> 254 <string>Apple</string> 255 <key>Product Name</key> 256 <string>SuperDrive</string> 257 <key>Product Revision Level</key> 258 <string>1.0</string> 259 <key>CD Features</key> 260 <integer>1663</integer> 261 <key>DVD Features</key> 262 <integer>103</integer> 263 <key>BD Features</key> 264 <integer>21</integer> 265 </dict> 266</dict> 267@/textblock 268</pre> 269*/ 270#define kIOPropertySupportedBDFeaturesKey "BD Features" 271 272 273/*! 274@defined kIOPropertyRigidDiskGeometryKey 275@discussion This key is used to define a dictionary containing 276rigid disk geometry information. 277 278Requirement: Optional. If a device publishes this dictionary, it 279must publish all key/value pairs which are deemed Mandatory. 280 281Example: 282<pre> 283@textblock 284<dict> 285 <key>Device Characteristics</key> 286 <dict> 287 <key>Vendor Name</key> 288 <string>Apple</string> 289 <key>Product Name</key> 290 <string>iPod</string> 291 <key>Product Revision Level</key> 292 <string>1.0</string> 293 <key>Rigid Disk Geometry</key> 294 <dict> 295 <key>Sector Count per Track</key> 296 <integer>12345</integer> 297 <key>Head Count</key> 298 <integer>12</integer> 299 <key>Cylinder Count</key> 300 <integer>12345</integer> 301 <key>Bytes per Physical Sector</key> 302 <integer>512</integer> 303 </dict> 304 </dict> 305</dict> 306@/textblock 307</pre> 308*/ 309#define kIOPropertyRigidDiskGeometryKey "Rigid Disk Geometry" 310 311 312/*! 313@defined kIOPropertySectorCountPerTrackKey 314@discussion This key is used to define the number of sectors per 315each track for a particular medium. 316 317Requirement: Mandatory element of the Rigid Disk Geometry dictionary. 318 319Example: 320<pre> 321@textblock 322<dict> 323 <key>Device Characteristics</key> 324 <dict> 325 <key>Vendor Name</key> 326 <string>Apple</string> 327 <key>Product Name</key> 328 <string>iPod</string> 329 <key>Product Revision Level</key> 330 <string>1.0</string> 331 <key>Rigid Disk Geometry</key> 332 <dict> 333 <key>Sector Count per Track</key> 334 <integer>12345</integer> 335 </dict> 336 </dict> 337</dict> 338@/textblock 339</pre> 340*/ 341#define kIOPropertySectorCountPerTrackKey "Sector Count per Track" 342 343 344/*! 345@defined kIOPropertyHeadCountKey 346@discussion This key is used to define the number of heads for 347a particular medium. 348 349Requirement: Mandatory element of the Rigid Disk Geometry dictionary. 350 351Example: 352<pre> 353@textblock 354<dict> 355 <key>Device Characteristics</key> 356 <dict> 357 <key>Vendor Name</key> 358 <string>Apple</string> 359 <key>Product Name</key> 360 <string>iPod</string> 361 <key>Product Revision Level</key> 362 <string>1.0</string> 363 <key>Rigid Disk Geometry</key> 364 <dict> 365 <key>Sector Count per Track</key> 366 <integer>12345</integer> 367 <key>Head Count</key> 368 <integer>12</integer> 369 <key>Cylinder Count</key> 370 <integer>12345</integer> 371 <key>Bytes per Physical Sector</key> 372 <integer>512</integer> 373 </dict> 374 </dict> 375</dict> 376@/textblock 377</pre> 378*/ 379#define kIOPropertyHeadCountKey "Head Count" 380 381 382/*! 383@defined kIOPropertyCylinderCountKey 384@discussion This key is used to define the number of heads for 385a particular medium. 386 387Requirement: Mandatory element of the Rigid Disk Geometry dictionary. 388 389Example: 390<pre> 391@textblock 392<dict> 393 <key>Device Characteristics</key> 394 <dict> 395 <key>Vendor Name</key> 396 <string>Apple</string> 397 <key>Product Name</key> 398 <string>iPod</string> 399 <key>Product Revision Level</key> 400 <string>1.0</string> 401 <key>Rigid Disk Geometry</key> 402 <dict> 403 <key>Sector Count per Track</key> 404 <integer>12345</integer> 405 <key>Head Count</key> 406 <integer>12</integer> 407 <key>Cylinder Count</key> 408 <integer>12345</integer> 409 <key>Bytes per Physical Sector</key> 410 <integer>512</integer> 411 </dict> 412 </dict> 413</dict> 414@/textblock 415</pre> 416*/ 417#define kIOPropertyCylinderCountKey "Cylinder Count" 418 419 420/*! 421@defined kIOPropertyBytesPerPhysicalSectorKey 422@discussion This key is used to define the number of heads for 423a particular medium. 424 425Requirement: Mandatory element of the Rigid Disk Geometry dictionary. 426 427Example: 428<pre> 429@textblock 430<dict> 431 <key>Device Characteristics</key> 432 <dict> 433 <key>Vendor Name</key> 434 <string>Apple</string> 435 <key>Product Name</key> 436 <string>iPod</string> 437 <key>Product Revision Level</key> 438 <string>1.0</string> 439 <key>Rigid Disk Geometry</key> 440 <dict> 441 <key>Sector Count per Track</key> 442 <integer>12345</integer> 443 <key>Head Count</key> 444 <integer>12</integer> 445 <key>Cylinder Count</key> 446 <integer>12345</integer> 447 <key>Bytes per Physical Sector</key> 448 <integer>512</integer> 449 </dict> 450 </dict> 451</dict> 452@/textblock 453</pre> 454*/ 455#define kIOPropertyBytesPerPhysicalSectorKey "Bytes per Physical Sector" 456 457 458/*! 459@defined kIOPropertyPhysicalBlockSizeKey 460@discussion This key is used to define the physical block size of a hard disk drive. 461 462Requirement: Mandatory for hard disk drives with physical block size other than 512 bytes. 463 464Example: 465<pre> 466@textblock 467<dict> 468 <key>Device Characteristics</key> 469 <dict> 470 <key>Vendor Name</key> 471 <string>Apple</string> 472 <key>Product Name</key> 473 <string>iPod</string> 474 <key>Product Revision Level</key> 475 <string>1.0</string> 476 <key>Physical Block Size</key> 477 <integer>4096</integer> 478 <key>Logical Block Size</key> 479 <integer>512</integer> 480 </dict> 481</dict> 482@/textblock 483</pre> 484*/ 485#define kIOPropertyPhysicalBlockSizeKey "Physical Block Size" 486 487 488/*! 489@defined kIOPropertyLogicalBlockSizeKey 490@discussion This key is used to define the logical block size of a hard disk drive. 491 492Requirement: Mandatory for hard disk drives with logical block size other than 512 bytes 493or that does not match its physical block size. 494 495Example: 496<pre> 497@textblock 498<dict> 499 <key>Device Characteristics</key> 500 <dict> 501 <key>Vendor Name</key> 502 <string>Apple</string> 503 <key>Product Name</key> 504 <string>iPod</string> 505 <key>Product Revision Level</key> 506 <string>1.0</string> 507 <key>Physical Block Size</key> 508 <integer>4096</integer> 509 <key>Logical Block Size</key> 510 <integer>512</integer> 511 </dict> 512</dict> 513@/textblock 514</pre> 515*/ 516#define kIOPropertyLogicalBlockSizeKey "Logical Block Size" 517 518 519/*! 520@defined kIOPropertyTargetDiskModeKey 521@discussion This key is used to indicate the device is another computer in Target Disk Mode. 522 523Requirement: Optional. 524 525Example: 526<pre> 527@textblock 528<dict> 529 <key>Device Characteristics</key> 530 <dict> 531 <key>Vendor Name</key> 532 <string>AAPL</string> 533 <key>Product Name</key> 534 <string>FireWire Target</string> 535 <key>Product Revision Level</key> 536 <string>0000</string> 537 <key>Target Disk Mode</key> 538 <true/> 539 </dict> 540</dict> 541@/textblock 542</pre> 543*/ 544#define kIOPropertyTargetDiskModeKey "Target Disk Mode" 545 546 547/*! 548@defined kIOPropertyMediumTypeKey 549@discussion This key is used to indicate the medium type of the device. 550 551Requirement: Optional. 552 553Example: 554<pre> 555@textblock 556<dict> 557 <key>Device Characteristics</key> 558 <dict> 559 <key>Vendor Name</key> 560 <string>AAPL</string> 561 <key>Product Name</key> 562 <string>FireWire Target</string> 563 <key>Product Revision Level</key> 564 <string>0000</string> 565 <key>Medium Type</key> 566 <string>Rotational</string> 567 </dict> 568</dict> 569@/textblock 570</pre> 571*/ 572#define kIOPropertyMediumTypeKey "Medium Type" 573 574 575/*! 576@defined kIOPropertyMediumTypeRotationalKey 577@discussion This key is used to indicate the medium type of the device is rotational. 578 579Requirement: Optional. 580 581Example: 582<pre> 583@textblock 584<dict> 585 <key>Device Characteristics</key> 586 <dict> 587 <key>Vendor Name</key> 588 <string>AAPL</string> 589 <key>Product Name</key> 590 <string>FireWire Target</string> 591 <key>Product Revision Level</key> 592 <string>0000</string> 593 <key>Medium Type</key> 594 <string>Rotational</string> 595 </dict> 596</dict> 597@/textblock 598</pre> 599*/ 600#define kIOPropertyMediumTypeRotationalKey "Rotational" 601 602 603/*! 604@defined kIOPropertyMediumTypeSolidStateKey 605@discussion This key is used to indicate the medium type of the device is solid state. 606 607Requirement: Optional. 608 609Example: 610<pre> 611@textblock 612<dict> 613 <key>Device Characteristics</key> 614 <dict> 615 <key>Vendor Name</key> 616 <string>AAPL</string> 617 <key>Product Name</key> 618 <string>FireWire Target</string> 619 <key>Product Revision Level</key> 620 <string>0000</string> 621 <key>Medium Type</key> 622 <string>Solid State</string> 623 </dict> 624</dict> 625@/textblock 626</pre> 627*/ 628#define kIOPropertyMediumTypeSolidStateKey "Solid State" 629 630 631/*! 632@defined kIOPropertyMediumRotationRateKey 633@discussion This key is used to indicate the medium rotation rate in RPM of the device. 634 635Requirement: Optional. 636 637Example: 638<pre> 639@textblock 640<dict> 641 <key>Device Characteristics</key> 642 <dict> 643 <key>Vendor Name</key> 644 <string>AAPL</string> 645 <key>Product Name</key> 646 <string>FireWire Target</string> 647 <key>Product Revision Level</key> 648 <string>0000</string> 649 <key>Rotation Rate</key> 650 <integer>7200</integer> 651 </dict> 652</dict> 653@/textblock 654</pre> 655*/ 656#define kIOPropertyMediumRotationRateKey "Rotation Rate" 657 658 659#endif /* _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ */ 660