1/* 2 * Copyright (c) 2008 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_ATAPI_PROTOCOL_TRANSPORT_TIMESTAMPS_H_ 25#define _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_TIMESTAMPS_H_ 26 27#include <IOKit/IOTypes.h> 28 29#include <sys/kdebug.h> 30#include <IOKit/scsi/IOSCSIArchitectureModelFamilyTimestamps.h> 31 32#ifdef __cplusplus 33extern "C" { 34#endif 35 36 37extern UInt32 gATAPIDebugFlags; 38 39 40/* The trace codes consist of the following (see IOSCSIArchitectureModelFamilyTimestamps.h): 41 * 42 * ---------------------------------------------------------------------- 43 *| | | | |Func | 44 *| Class (8) | SubClass (8) | SAM Class(6) | Code (8) |Qual(2)| 45 * ---------------------------------------------------------------------- 46 * 47 * DBG_IOKIT(05h) DBG_IOSAM(27h) (24h) 48 * 49 * See <sys/kdebug.h> and IOTimeStamp.h for more details. 50 * 51 */ 52 53// ATAPI tracepoints 0x05279000 - 0x052790FF 54enum 55{ 56 kATADeviceInfo = 1, /* 0x05279004 */ 57 kATASendSCSICommand = 2, /* 0x05279008 */ 58 kATASendSCSICommandFailed = 3, /* 0x0527900C */ 59 kATACompleteSCSICommand = 4, /* 0x05279010 */ 60 kATAAbort = 5, /* 0x05279014 */ 61 kATAReset = 6, /* 0x05279018 */ 62 kATAResetComplete = 7, /* 0x0527901C */ 63 kATAHandlePowerOn = 8, /* 0x05279020 */ 64 kATAPowerOnReset = 9, /* 0x05279024 */ 65 kATAPowerOnNoReset = 10, /* 0x05279028 */ 66 kATAHandlePowerOff = 11, /* 0x0527902C */ 67 kATADriverPowerOff = 12, /* 0x05279030 */ 68 kATAStartStatusPolling = 13, /* 0x05279034 */ 69 kATAStatusPoll = 14, /* 0x05279038 */ 70 kATAStopStatusPolling = 15, /* 0x0527903C */ 71 kATASendATASleepCmd = 16, /* 0x05279040 */ 72}; 73 74// Tracepoint macros. 75#define ATAPI_TRACE(code) ( ( ( DBG_IOKIT & 0xFF ) << 24) | ( ( DBG_IOSAM & 0xFF ) << 16 ) | ( kSAMClassATAPI << 10 ) | ( ( code & 0xFF ) << 2 ) ) 76 77#ifdef __cplusplus 78} 79#endif 80 81 82#endif /* _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_TIMESTAMPS_H_ */ 83