1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright 2024 Oxide Computer Company 14 */ 15 16 #ifndef _SYS_NVME_MICRON_7300_H 17 #define _SYS_NVME_MICRON_7300_H 18 19 /* 20 * This header defines vendor-specific NVMe interfaces and is not a committed 21 * interface. Its contents and existence are subject to change. 22 * 23 * This header contains all of the current vendor-specific entries for known 24 * Micron devices as well as common structures and definitions that are shared 25 * across multiple device families. 26 */ 27 28 #ifdef __cplusplus 29 extern "C" { 30 #endif 31 32 #include <sys/debug.h> 33 #include <sys/stdint.h> 34 35 #define MICRON_7300_PRO_DID 0x51a2 36 #define MICRON_7300_MAX_DID 0x51a3 37 38 typedef enum { 39 /* 40 * This log is supported by the [79]300, though when supported, the 41 * extended SMART log is preferred. 42 */ 43 MICRON_7300_LOG_SMART = 0xca, 44 /* 45 * This log is the micron_vul_ext_smart_t. 46 */ 47 MICRON_7300_LOG_EXT_SMART = 0xd0 48 } micron_7300_vul_t; 49 50 /* 51 * All data structures must be packed to account for the layout from the various 52 * programmer's manuals. 53 */ 54 #pragma pack(1) 55 56 /* 57 * The Micron vendor-unique SMART log (0xca) is formed in terms of these data 58 * entities that all have a fixed size. The type value tells you what it is 59 * supposed to be (though the log has a fixed layout). The data payload 60 * interpretation varies based on the type. 61 */ 62 typedef struct { 63 uint8_t vse_type; 64 uint8_t vse_rsvd[4]; 65 uint8_t vse_data[7]; 66 } micron_vul_smart_ent_t; 67 68 typedef struct { 69 micron_vul_smart_ent_t ms_writes; 70 micron_vul_smart_ent_t ms_reads; 71 micron_vul_smart_ent_t ms_throttle; 72 micron_vul_smart_ent_t ms_life_temp; 73 micron_vul_smart_ent_t ms_power; 74 micron_vul_smart_ent_t ms_poweron_temp; 75 } micron_vul_smart_t; 76 77 CTASSERT(sizeof (micron_vul_smart_t) == 0x48); 78 79 #pragma pack() /* pack(1) */ 80 81 82 #ifdef __cplusplus 83 } 84 #endif 85 86 #endif /* _SYS_NVME_MICRON_7300_H */ 87