12449e17fSsherrym /* 22449e17fSsherrym * CDDL HEADER START 32449e17fSsherrym * 42449e17fSsherrym * The contents of this file are subject to the terms of the 52449e17fSsherrym * Common Development and Distribution License (the "License"). 62449e17fSsherrym * You may not use this file except in compliance with the License. 72449e17fSsherrym * 82449e17fSsherrym * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 92449e17fSsherrym * or http://www.opensolaris.org/os/licensing. 102449e17fSsherrym * See the License for the specific language governing permissions 112449e17fSsherrym * and limitations under the License. 122449e17fSsherrym * 132449e17fSsherrym * When distributing Covered Code, include this CDDL HEADER in each 142449e17fSsherrym * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 152449e17fSsherrym * If applicable, add the following below this CDDL HEADER, with the 162449e17fSsherrym * fields enclosed by brackets "[]" replaced with your own identifying 172449e17fSsherrym * information: Portions Copyright [yyyy] [name of copyright owner] 182449e17fSsherrym * 192449e17fSsherrym * CDDL HEADER END 202449e17fSsherrym */ 212449e17fSsherrym 222449e17fSsherrym /* 232449e17fSsherrym * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 242449e17fSsherrym * Use is subject to license terms. 25afcdc73aSAndy Fiddaman * 26afcdc73aSAndy Fiddaman * Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 27*d32f26eeSAndy Fiddaman * Copyright 2023 Oxide Computer Company 282449e17fSsherrym */ 292449e17fSsherrym 302449e17fSsherrym #ifndef _UCODE_ERRNO_H 312449e17fSsherrym #define _UCODE_ERRNO_H 322449e17fSsherrym 332449e17fSsherrym #ifdef __cplusplus 342449e17fSsherrym extern "C" { 352449e17fSsherrym #endif 362449e17fSsherrym 372449e17fSsherrym typedef enum ucode_errno { 382449e17fSsherrym EM_OK, /* No error */ 392449e17fSsherrym EM_FILESIZE, /* File size is invalid */ 402449e17fSsherrym EM_OPENFILE, /* Failed to open file */ 412449e17fSsherrym EM_FILEFORMAT, /* Not a valid microcode file */ 422449e17fSsherrym EM_HEADER, /* File header is invalid */ 432449e17fSsherrym EM_CHECKSUM, /* Checksum is invalid */ 44afcdc73aSAndy Fiddaman EM_EXTCHECKSUM, /* Extended signature table checksum is invalid */ 45afcdc73aSAndy Fiddaman EM_SIGCHECKSUM, /* Extended signature checksum is invalid */ 462449e17fSsherrym EM_INVALIDARG, /* Invalid argument(s) */ 472449e17fSsherrym EM_NOMATCH, /* No matching microcode found */ 482449e17fSsherrym EM_HIGHERREV, /* File does not contain higher revision microcode */ 492449e17fSsherrym EM_NOTSUP, /* Processor does not support microcode operations */ 502449e17fSsherrym EM_UPDATE, /* Failed to update to the latest revision */ 512449e17fSsherrym EM_SYS, /* System call failed. See errno */ 52*d32f26eeSAndy Fiddaman EM_NOVENDOR, /* Could not determine the type of the update file */ 532449e17fSsherrym EM_NOMEM /* Not enough memory */ 542449e17fSsherrym } ucode_errno_t; 552449e17fSsherrym 562449e17fSsherrym extern const char *ucode_strerror(ucode_errno_t); 572449e17fSsherrym extern const char *ucode_errname(ucode_errno_t); 582449e17fSsherrym 592449e17fSsherrym #ifdef __cplusplus 602449e17fSsherrym } 612449e17fSsherrym #endif 622449e17fSsherrym 632449e17fSsherrym #endif /* _UCODE_ERRNO_H */ 64