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.\" Copyright 2023 Oxide Computer Company 13.\" 14.Dd September 21, 2023 15.Dt LIBJEDEC_VENDOR_STRING 3JEDEC 16.Os 17.Sh NAME 18.Nm libjedec_vendor_string 19.Nd translate JEDEC vendor IDs to strings 20.Sh LIBRARY 21.Lb libjedec 22.Sh SYNOPSIS 23.In libjedec.h 24.Ft "const char *" 25.Fo libjedec_vendor_string 26.Fa "uint_t cont" 27.Fa "uint_t vendor" 28.Fc 29.Sh DESCRIPTION 30The 31.Fn libjedec_vendor_string 32function translates a JEDEC vendor ID into a corresponding name. 33JEDEC vendor IDs are defined in the JEP106 standard. 34Vendor IDs come in banks and each bank contains up to 126 unique vendor 35names. 36To accommodate more than 126 vendors, a series of continuation bytes -- 37repeated values of 0x7f -- are used to indicate the bank. 38Most implementations, like SPD data, don't actually encode multiple 39continuations in the data, but rather just how many continuations are 40present. 41Note, the JEP106 standard describes the first bank as bank 1; however, 42the library is phrased in terms of the number of continuations due to 43how hardware encodes this data. 44.Pp 45The value in 46.Fa cont 47should indicate the number of continuations present. 48The value in 49.Fa vendor 50indicates the vendor to look for and should include its parity bit. 51When the name is successfully found, a pointer to a constant string with 52the vendor's current name is returned. 53Note that a given vendor's name may be changed over time due to 54acquisitions. 55When the value doesn't correspond to a known name then 56.Dv NULL 57is returned. 58.Pp 59Currently the data reflects the JEP106BH data from September 2023. 60.Sh RETURN VALUES 61Upon successful completion, the 62.Fn libjedec_vendor_string 63function returns a pointer to a vendor's name. 64Otherwise 65.Dv NULL 66is returned to indicate that there is no mapping for the specified IDs. 67.Sh INTERFACE STABILITY 68.Sy Uncommitted 69.Sh MT-LEVEL 70.Sy MT-Safe 71.Sh SEE ALSO 72.Xr libjedec 3LIB 73.Pp 74.Rs 75.%Q JEDEC Solid State Technology Association 76.%T Standard Manufacturer's Identification Code 77.%N JEP106BH 78.%D September 2023 79.Re 80