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 /* 17 * libnvme logic that covers the OCP Datacenter NVMe SSD specification. 18 */ 19 20 #include <sys/sysmacros.h> 21 #include <sys/nvme/ocp.h> 22 23 #include "libnvme_impl.h" 24 25 const nvme_log_page_info_t ocp_log_smart = { 26 .nlpi_short = "ocp/smart", 27 .nlpi_human = "OCP SMART / Health Information", 28 .nlpi_lid = OCP_LOG_DSSD_SMART, 29 .nlpi_csi = NVME_CSI_NVM, 30 .nlpi_kind = NVME_LOG_ID_VENDOR_SPECIFIC, 31 .nlpi_source = NVME_LOG_DISC_S_DB, 32 .nlpi_scope = NVME_LOG_SCOPE_NVM, 33 .nlpi_len = sizeof (ocp_vul_smart_t), 34 }; 35 36 const nvme_log_page_info_t ocp_log_errrec = { 37 .nlpi_short = "ocp/errrec", 38 .nlpi_human = "OCP Error Recovery", 39 .nlpi_lid = OCP_LOG_DSSD_ERROR_REC, 40 .nlpi_csi = NVME_CSI_NVM, 41 .nlpi_kind = NVME_LOG_ID_VENDOR_SPECIFIC, 42 .nlpi_source = NVME_LOG_DISC_S_DB, 43 .nlpi_scope = NVME_LOG_SCOPE_NVM, 44 .nlpi_len = sizeof (ocp_vul_errrec_t), 45 }; 46 47 const nvme_log_page_info_t ocp_log_fwact = { 48 .nlpi_short = "ocp/fwact", 49 .nlpi_human = "OCP Firmware Activation", 50 .nlpi_lid = OCP_LOG_DSSD_FWACT, 51 .nlpi_csi = NVME_CSI_NVM, 52 .nlpi_kind = NVME_LOG_ID_VENDOR_SPECIFIC, 53 .nlpi_source = NVME_LOG_DISC_S_DB, 54 .nlpi_scope = NVME_LOG_SCOPE_NVM, 55 .nlpi_len = sizeof (ocp_vul_fwact_t), 56 }; 57 58 const nvme_log_page_info_t ocp_log_lat = { 59 .nlpi_short = "ocp/latency", 60 .nlpi_human = "OCP Latency Monitor", 61 .nlpi_lid = OCP_LOG_DSSD_LATENCY, 62 .nlpi_csi = NVME_CSI_NVM, 63 .nlpi_kind = NVME_LOG_ID_VENDOR_SPECIFIC, 64 .nlpi_source = NVME_LOG_DISC_S_DB, 65 .nlpi_scope = NVME_LOG_SCOPE_NVM, 66 .nlpi_len = sizeof (ocp_vul_lat_t), 67 }; 68 69 const nvme_log_page_info_t ocp_log_devcap = { 70 .nlpi_short = "ocp/devcap", 71 .nlpi_human = "OCP Device Capabilities", 72 .nlpi_lid = OCP_LOG_DSSD_DEV_CAP, 73 .nlpi_csi = NVME_CSI_NVM, 74 .nlpi_kind = NVME_LOG_ID_VENDOR_SPECIFIC, 75 .nlpi_source = NVME_LOG_DISC_S_DB, 76 .nlpi_scope = NVME_LOG_SCOPE_NVM, 77 .nlpi_len = sizeof (ocp_vul_devcap_t), 78 }; 79 80 const nvme_log_page_info_t ocp_log_unsup = { 81 .nlpi_short = "ocp/unsup", 82 .nlpi_human = "OCP Unsupported Requirements", 83 .nlpi_lid = OCP_LOG_DSSD_UNSUP_REQ, 84 .nlpi_csi = NVME_CSI_NVM, 85 .nlpi_kind = NVME_LOG_ID_VENDOR_SPECIFIC, 86 .nlpi_source = NVME_LOG_DISC_S_DB, 87 .nlpi_scope = NVME_LOG_SCOPE_NVM, 88 .nlpi_len = sizeof (ocp_vul_unsup_req_t), 89 }; 90