Lines Matching full:vpd
3 #define pr_fmt(fmt) "papr-vpd: " fmt
19 #include <asm/papr-vpd.h>
22 #include <uapi/asm/papr-vpd.h>
25 * Function-specific return values for ibm,get-vpd, derived from PAPR+
26 * v2.13 7.3.20 "ibm,get-vpd RTAS Call".
28 #define RTAS_IBM_GET_VPD_COMPLETE 0 /* All VPD has been retrieved. */
29 #define RTAS_IBM_GET_VPD_MORE_DATA 1 /* More VPD is available. */
30 #define RTAS_IBM_GET_VPD_START_OVER -4 /* VPD changed, restart call sequence. */
33 * struct rtas_ibm_get_vpd_params - Parameters (in and out) for ibm,get-vpd.
37 * @written: Out: Bytes written by ibm,get-vpd to @work_area.
49 * rtas_ibm_get_vpd() - Call ibm,get-vpd to fill a work area buffer.
52 * Calls ibm,get-vpd until it errors or successfully deposits data
57 * to retrieve all the VPD for the provided location code. Only one
59 * will disrupt any sequence already in progress. Serialization of VPD
113 pr_err_ratelimited("unexpected ibm,get-vpd status %d\n", fwrc); in rtas_ibm_get_vpd()
122 * Internal VPD "blob" APIs for accumulating ibm,get-vpd results into
207 * Internal VPD sequence APIs. A VPD sequence is a series of calls to
208 * ibm,get-vpd for a given location code. The sequence ends when an
209 * error is encountered or all VPD for the location code has been
214 * struct vpd_sequence - State for managing a VPD sequence.
225 * vpd_sequence_begin() - Begin a VPD retrieval sequence.
227 * @loc_code: Location code that defines the scope of the VPD to return.
229 * Initializes @seq with the resources necessary to carry out a VPD
263 * vpd_sequence_end() - Finalize a VPD retrieval sequence.
275 * vpd_sequence_should_stop() - Determine whether a VPD retrieval sequence
277 * @seq: VPD sequence state.
280 * ibm,get-vpd to determine whether the sequence in progress should
283 * Return: True if the sequence has encountered an error or if all VPD for
337 * Higher-level VPD retrieval code below. These functions use the
339 * VPD handles for consumption by user space.
343 * papr_vpd_run_sequence() - Run a single VPD retrieval sequence.
344 * @loc_code: Location code that defines the scope of VPD to return.
373 * papr_vpd_retrieve() - Return the VPD for a location code.
374 * @loc_code: Location code that defines the scope of VPD to return.
376 * Run VPD sequences against @loc_code until a blob is successfully
381 * Return: A fully populated VPD blob when successful. Encoded error
389 * EAGAIN means the sequence errored with a -4 (VPD changed) in papr_vpd_retrieve()
390 * status from ibm,get-vpd, and we should attempt a new in papr_vpd_retrieve()
401 pr_info_ratelimited("VPD changed during retrieval, retrying\n"); in papr_vpd_retrieve()
445 * papr_vpd_create_handle() - Create a fd-based handle for reading VPD.
446 * @ulc: Location code in user memory; defines the scope of the VPD to
450 * @ulc and instantiates an immutable VPD "blob" for it. The blob is
454 * The entire requested VPD is retrieved by this call and all
457 * the kernel can prevent interleaving of ibm,get-vpd call sequences.
485 file = anon_inode_getfile("[papr-vpd]", &papr_vpd_handle_ops, in papr_vpd_create_handle()
503 * Top-level ioctl handler for /dev/papr-vpd.
527 .name = "papr-vpd",