<emphasis>ibm,get-vpd</emphasis> RTAS Call This RTAS call allows for collection of VPD that changes after OS boot time (after the initial reporting in the OF device tree). When this call is implemented, there is no overlap between what is reported in the device tree and what is reported with this RTAS call. Also, when this RTAS call is implemented, all VPD, except PCI and I/O device VPD, which is dynamically changed during OS run time is reported with this call and not via the “ibm,vpd” property in the OF device tree. R1--1. For all Dynamic Reconfiguration options except PCI Hot Plug, when the platform VPD can change dynamically due to a Dynamic Reconfiguration operation, the platform must implement the ibm,get-vpd RTAS call. R1--2. The RTAS function ibm,get-vpd must implement the argument call buffer defined by . <emphasis>ibm,get-vpd</emphasis> Argument Call Buffer Parameter Type Name Values In Token Token for ibm,get-vpd Number Inputs 4 Number Outputs 3 Pointer to Location Code Real address of NULL-terminated string, contiguous in real memory and below 4GB, which is the location code of the FRU for which to obtain the VPD. When this parameter references a NULL string the VPD for all location codes is returned. Work Area Address Address of work area Work Area Size Size of work area Sequence Number Integer representing the sequence number of the call. First call in sequence starts with 1, following calls (if necessary) use the Next Sequence Number returned from the previous call. Out Status -1: Hardware error -3: Parameter error -4: Optional: VPD changed, start again 0: Success 1: More data available; call again 990x: Extended Delay where x is a number 0-5 (see text below) Next Sequence Number Return this integer as the Sequence Number parameter on the next call to continue the sequence, or 1 if no more calls are required Bytes Returned Integer representing the number of valid bytes returned in the work area.
When the 990x Status is returned, it is suggested that software delay for 10 raised to the x milliseconds (where x is the last digit of the 990x return code), before calling ibm,get-vpd with the same input parameters. However, software may issue the ibm,get-vpd call again either earlier or later than this.
R1--3. On the first call to ibm,get-vpd for a particular VPD gathering operation, the caller must provide a Sequence Number of 1 (32-bit integer) R1--4. Upon calling ibm,get-vpd with a Sequence Number of 1, a previously returned Next Sequence Number must be discarded. This means that multiple calls to ibm,get-vpd cannot be interleaved by multiple processors, and if processor “B” starts a new ibm,get-vpd sequence while processor “A” has a call sequence in process (that is, the function on processor “A” has returned a Status of 1, and the subsequent call has not yet been made) then the call sequence on processor “A” is abandoned. R1--5. Optionally, if firmware detects a change in the VPD being requested before the entire VPD is returned, the ibm,get-vpd call must return a Status of -4 and the caller must start again with a Starting Number of 1. Implementation Note: The platform should not impede forward progress by continuously returning a Status of -4. R1--6. The return data format in the work area must be such that after returning all the data and concatenating all data together in the order received, that the data is the same as is obtained from the “ibm,vpd” property of the OF device tree. R1--7. Each stanza of the returned data must include the YL (location code) keyword. R1--8. If the ibm,get-vpd RTAS call is implemented, then the platform must not provide the “ibm,vpd” or “ibm,loc-code” properties in the OF device tree root node. R1--9. If the ibm,get-vpd RTAS call is implemented, then any VPD which may change after OS boot must be reported via the ibm,get-vpd RTAS call. R1--10. If the Status returned is 1 (more data available, call again), then the caller must call ibm,get-vpd again with the Sequence Number parameter set to the Next Sequence Number integer from the previously returned call. R1--11. If a Status of anything other than 0 or 1 is returned, the contents of the work area is not defined. R1--12. The work area must be contiguous in real memory and must reside below 4GB. R1--13. Firmware cannot count on the contents of the work area at the beginning of any call to ibm,get-vpd (regardless of the value of the Sequence Number). R1--14. The location code referenced by the Pointer to Location Code parameter must reside in contiguous real memory below an address of 4GB. R1--15. If the ibm,get-vpd RTAS call is implemented, then firmware must supply the “ibm,vpd-size” property in the /rtas node, the value of which is a single cell, encoded as with encode-int, which is the estimated maximum size in bytes of the VPD that is returned if the Pointer to Location Code parameter to the ibm,get-vpd RTAS function is NULL (that is, all system VPD). This size should take in to account possible concurrent addition of new platform elements after the partition is started. If firmware is unable to estimate this size, it may return a value of 0x0 to indicate that no estimate is available. Software Implementation Notes: An OS should be prepared for older versions of firmware where the “ibm,vpd-size” property is not provided. Each stanza of the returned data must include the YL (location code) keyword.