1508a0e8cSRob Johnston.\" 2508a0e8cSRob Johnston.\" This file and its contents are supplied under the terms of the 3508a0e8cSRob Johnston.\" Common Development and Distribution License ("CDDL"), version 1.0. 4508a0e8cSRob Johnston.\" You may only use this file in accordance with the terms of version 5508a0e8cSRob Johnston.\" 1.0 of the CDDL. 6508a0e8cSRob Johnston.\" 7508a0e8cSRob Johnston.\" A full copy of the text of the CDDL should have accompanied this 8508a0e8cSRob Johnston.\" source. A copy of the CDDL is also available via the Internet at 9508a0e8cSRob Johnston.\" http://www.illumos.org/license/CDDL. 10508a0e8cSRob Johnston.\" 11508a0e8cSRob Johnston.\" 12508a0e8cSRob Johnston.\" Copyright 2019 Joyent, Inc. 13*3a10a58cSRobert Mustacchi.\" Copyright 2023 Oxide Computer Company 14508a0e8cSRob Johnston.\" 158d55b806SRobert Mustacchi.Dd May 19, 2020 16508a0e8cSRob Johnston.Dt DDI_UFM_SLOT 9F 17508a0e8cSRob Johnston.Os 18508a0e8cSRob Johnston.Sh NAME 19508a0e8cSRob Johnston.Nm ddi_ufm_slot , 20508a0e8cSRob Johnston.Nm ddi_ufm_slot_set_version , 21508a0e8cSRob Johnston.Nm ddi_ufm_slot_set_attrs , 228d55b806SRobert Mustacchi.Nm ddi_ufm_slot_set_misc , 238d55b806SRobert Mustacchi.Nm ddi_ufm_slot_set_imgsize 24508a0e8cSRob Johnston.Nd UFM slot property routines 25508a0e8cSRob Johnston.Sh SYNOPSIS 26508a0e8cSRob Johnston#include <sys/ddi_ufm.h> 27508a0e8cSRob Johnston.sp 28508a0e8cSRob Johnston.Ft void 29508a0e8cSRob Johnston.Fo ddi_ufm_slot_set_version 30508a0e8cSRob Johnston.Fa "ddi_ufm_slot_t *usp" 31508a0e8cSRob Johnston.Fa "const char *version" 32508a0e8cSRob Johnston.Fc 33508a0e8cSRob Johnston.Ft void 34508a0e8cSRob Johnston.Fo ddi_ufm_slot_set_attrs 35508a0e8cSRob Johnston.Fa "ddi_ufm_slot_t *usp" 36508a0e8cSRob Johnston.Fa "ddi_ufm_attr_t attrs" 37508a0e8cSRob Johnston.Fc 38508a0e8cSRob Johnston.Ft void 39508a0e8cSRob Johnston.Fo ddi_ufm_slot_set_misc 40508a0e8cSRob Johnston.Fa "ddi_ufm_slot_t *usp" 41508a0e8cSRob Johnston.Fa "nvlist_t *nvl" 42508a0e8cSRob Johnston.Fc 438d55b806SRobert Mustacchi.Ft void 448d55b806SRobert Mustacchi.Fo ddi_ufm_slot_set_imgsize 458d55b806SRobert Mustacchi.Fa "ddi_ufm_slot_t *usp" 468d55b806SRobert Mustacchi.Fa "uint64_t len" 478d55b806SRobert Mustacchi.Fc 48508a0e8cSRob Johnston.Sh INTERFACE LEVEL 49508a0e8cSRob Johnston.Sy Evolving - 50508a0e8cSRob JohnstonThis interface is evolving still in illumos. 51508a0e8cSRob JohnstonAPI and ABI stability is not guaranteed. 52508a0e8cSRob Johnston.Sh PARAMETERS 53508a0e8cSRob Johnston.Bl -tag -width Fa 54508a0e8cSRob Johnston.It Fa usp 55508a0e8cSRob JohnstonA pointer to a UFM slot structure that was passed to the driver in its 56508a0e8cSRob Johnston.Xr ddi_ufm_op_fill_slot 9E 57508a0e8cSRob Johnstonentry point. 58508a0e8cSRob Johnston.It Fa version 59508a0e8cSRob JohnstonA device-specific ASCII string that indicates the current version of the 60508a0e8cSRob Johnstonfirmware image in the slot. 61508a0e8cSRob Johnston.It Fa attrs 62508a0e8cSRob JohnstonThe bitwise-inclusive-OR of one of several attributes of a firmware 63508a0e8cSRob Johnstonslot. 64508a0e8cSRob JohnstonSee the discussion of the 65508a0e8cSRob Johnston.Fn ddi_ufm_op_fill_slot 66508a0e8cSRob Johnstonfunction in 67508a0e8cSRob Johnston.Xr ddi_ufm 9E . 68508a0e8cSRob Johnston.It Fa nvl 69508a0e8cSRob JohnstonAn nvlist_t with ancillary, device-specific data. 708d55b806SRobert Mustacchi.It Fa len 718d55b806SRobert MustacchiThe length in bytes of a firmware image in a slot. 72508a0e8cSRob Johnston.El 73508a0e8cSRob Johnston.Sh DESCRIPTION 74508a0e8cSRob JohnstonThe 75508a0e8cSRob Johnston.Fn ddi_ufm_slot_set_version , 76508a0e8cSRob Johnston.Fn ddi_ufm_slot_set_attrs , 778d55b806SRobert Mustacchi.Fn ddi_ufm_slot_set_misc , 78508a0e8cSRob Johnstonand 798d55b806SRobert Mustacchi.Fn ddi_ufm_slot_set_imgsize 80508a0e8cSRob Johnstonfunctions are used by device drivers to set information about a firmware 81508a0e8cSRob Johnstonslot on the slot structure 82508a0e8cSRob Johnston.Fa usp 83508a0e8cSRob Johnstonas a part of implementing their 84508a0e8cSRob Johnston.Xr ddi_ufm_op_fill_slot 9E 85508a0e8cSRob Johnstonentry point. 86508a0e8cSRob JohnstonFor more information on slots and the use of these functions, see the 87508a0e8cSRob Johnstondescription of the 88508a0e8cSRob Johnston.Fn ddi_ufm_op_fill_slot 89508a0e8cSRob Johnstonfunction in 90508a0e8cSRob Johnston.Xr ddi_ufm 9E . 91508a0e8cSRob Johnston.Pp 92508a0e8cSRob JohnstonThe 93508a0e8cSRob Johnston.Fn ddi_ufm_slot_set_version 94508a0e8cSRob Johnstonfunction sets the version property of a firmware slot. 95508a0e8cSRob JohnstonThe version should be a human-readable ASCII string that describes the current 96508a0e8cSRob Johnstonfirmware revision in a way that makes sense to an administrator and someone 97508a0e8cSRob Johnstonwho is referencing the documentation of a vendor. 98508a0e8cSRob Johnston.Pp 99508a0e8cSRob JohnstonThe 100508a0e8cSRob Johnston.Fn ddi_ufm_slot_set_attrs 101508a0e8cSRob Johnstonfunction describes attributes of a UFM slot as defined by the 102508a0e8cSRob Johnstonddi_ufm_attr_t enum. 103508a0e8cSRob Johnston.Pp 104508a0e8cSRob JohnstonThe 105508a0e8cSRob Johnston.Fn ddi_ufm_slot_set_misc 106508a0e8cSRob Johnstonfunction is used by the driver to set ancillary key-value data that may 107508a0e8cSRob Johnstonbe useful to a consumer. 108508a0e8cSRob JohnstonFor example, a driver may use this method to encode specific information that 109508a0e8cSRob Johnstonthe firmware provides about how or when it was produced or installed on the 110508a0e8cSRob Johnstondevice. 111508a0e8cSRob JohnstonThe driver should create an nvlist for this purpose with 112508a0e8cSRob Johnston.Xr nvlist_alloc 9F . 113508a0e8cSRob JohnstonOnce the driver passes the nvlist to the 114508a0e8cSRob Johnston.Fn ddi_ufm_slot_set_misc 115508a0e8cSRob Johnstonfunction, then the driver must not manipulate or free the nvlist at all. 116508a0e8cSRob JohnstonIt is the property of the UFM subsystem. 1178d55b806SRobert Mustacchi.Pp 1188d55b806SRobert Mustacchithe 1198d55b806SRobert Mustacchi.Fn ddi_ufm_slot_set_imgsize 1208d55b806SRobert Mustacchifunction is used by the driver to indicate the size of a firmware image 1218d55b806SRobert Mustacchiin a slot. 1228d55b806SRobert MustacchiConsumers use this to determine the amount of data that they should read 1238d55b806SRobert Mustacchifor a firmware image itself. 124508a0e8cSRob Johnston.Sh CONTEXT 125508a0e8cSRob JohnstonThese functions should only be called in the context of the 126508a0e8cSRob Johnston.Xr ddi_ufm_op_fill_slot 9E 127508a0e8cSRob Johnstonentry point. 128508a0e8cSRob Johnston.Sh SEE ALSO 129*3a10a58cSRobert Mustacchi.Xr ddi_ufm 9E , 130*3a10a58cSRobert Mustacchi.Xr ddi_ufm_op_fill_slot 9E , 131*3a10a58cSRobert Mustacchi.Xr nvlist_alloc 9F 132