smartmontools SVN Rev 5645
Utility to control and monitor storage systems with "S.M.A.R.T."
os_darwin.h
Go to the documentation of this file.
1/*
2 * os_generic.h
3 *
4 * Home page of code is: http://www.smartmontools.org
5 *
6 * Copyright (C) 2004-8 Geoff Keating <geoffk@geoffk.org>
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef OS_DARWIN_H_
12#define OS_DARWIN_H_
13
14#define OS_DARWIN_H_CVSID "$Id: os_darwin.h 5073 2020-06-24 08:08:38Z samm2 $\n"
15
16#define kIOATABlockStorageDeviceClass "IOATABlockStorageDevice"
17
18// Isn't in 10.3.9?
19
20#ifndef kIOPropertySMARTCapableKey
21#define kIOPropertySMARTCapableKey "SMART Capable"
22#endif
23
24// NVMe definitions based on Xcode SDK, see NVMeSMARTLibExternal.h
25#define kIOPropertyNVMeSMARTCapableKey "NVMe SMART Capable"
26
27// Constant to init driver
28#define kIONVMeSMARTUserClientTypeID CFUUIDGetConstantUUIDWithBytes(NULL, \
29 0xAA, 0x0F, 0xA6, 0xF9, 0xC2, 0xD6, 0x45, 0x7F, 0xB1, 0x0B, \
30 0x59, 0xA1, 0x32, 0x53, 0x29, 0x2F)
31
32// Constant to use plugin interface
33#define kIONVMeSMARTInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, \
34 0xcc, 0xd1, 0xdb, 0x19, 0xfd, 0x9a, 0x4d, 0xaf, 0xbf, 0x95, \
35 0x12, 0x45, 0x4b, 0x23, 0xa, 0xb6)
36
38{
40
41 UInt16 version;
42 UInt16 revision;
43
44 // NVMe smart data, returns nvme_smart_log structure
45 IOReturn ( *SMARTReadData )( void * interface,
46 struct nvme_smart_log * NVMeSMARTData );
47
48 // NVMe IdentifyData, returns nvme_id_ctrl per namespace
49 IOReturn ( *GetIdentifyData )( void * interface,
50 struct nvme_id_ctrl * NVMeIdentifyControllerStruct,
51 unsigned int ns );
52 UInt64 reserved0;
53 UInt64 reserved1;
54
55 // NumDWords Number of dwords for log page data, zero based.
56 IOReturn ( *GetLogPage )( void * interface, void * data, unsigned int logPageId, unsigned int numDWords);
57
58 UInt64 reserved2;
59 UInt64 reserved3;
60 UInt64 reserved4;
61 UInt64 reserved5;
62 UInt64 reserved6;
63 UInt64 reserved7;
64 UInt64 reserved8;
65 UInt64 reserved9;
66 UInt64 reserved10;
67 UInt64 reserved11;
68 UInt64 reserved12;
69 UInt64 reserved13;
70 UInt64 reserved14;
71 UInt64 reserved15;
72 UInt64 reserved16;
73 UInt64 reserved17;
74 UInt64 reserved18;
75 UInt64 reserved19;
76
78
79
80#endif /* OS_DARWIN_H_ */
ptr_t data
Definition: megaraid.h:15
IOReturn(* GetIdentifyData)(void *interface, struct nvme_id_ctrl *NVMeIdentifyControllerStruct, unsigned int ns)
Definition: os_darwin.h:49
IOReturn(* GetLogPage)(void *interface, void *data, unsigned int logPageId, unsigned int numDWords)
Definition: os_darwin.h:56
IOReturn(* SMARTReadData)(void *interface, struct nvme_smart_log *NVMeSMARTData)
Definition: os_darwin.h:45