Check FRU-based product information if available

WKS and server cards have an FRU with product information, so try to use
that for product name and product SKU if it exists.

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I40bbd3bf62f4cb02e96015ed1630112691cacbc3
Este commit está contenido en:
Kent Russell
2020-09-23 13:40:47 -04:00
padre c6f02b4d62
commit df7c3434cd
Se han modificado 5 ficheros con 79 adiciones y 9 borrados
+27
Ver fichero
@@ -979,6 +979,33 @@ rsmi_status_t rsmi_num_monitor_devices(uint32_t *num_devices);
*/
rsmi_status_t rsmi_dev_id_get(uint32_t dv_ind, uint16_t *id);
/**
* @brief Get the SKU for a desired device associated with the device with
* provided device index.
*
* @details Given a device index @p dv_ind and a pointer to a char @p sku,
* this function will attempt to obtain the SKU from the Product Information
* FRU chip, present on server ASICs. It will write the sku value to the
* char array pointed to by @p sku.
*
* @param[in] dv_ind a device index
*
* @param[inout] sku a pointer to char to which the sku will be written
*
* If this parameter is nullptr, this function will return
* ::RSMI_STATUS_INVALID_ARGS if the function is supported with the provided,
* arguments and ::RSMI_STATUS_NOT_SUPPORTED if it is not supported with the
* provided arguments.
*
* @retval ::RSMI_STATUS_SUCCESS call was successful
* @retval ::RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not
* support this function with the given arguments
* @retval ::RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
*
*/
rsmi_status_t rsmi_dev_sku_get(uint32_t dv_ind, char *sku);
/**
* @brief Get the device vendor id associated with the device with provided
* device index.
+2
Ver fichero
@@ -99,6 +99,8 @@ enum DevInfoTypes {
kDevPerfLevel,
kDevOverDriveLevel,
kDevDevID,
kDevDevProdName,
kDevDevProdNum,
kDevVendorID,
kDevSubSysDevID,
kDevSubSysVendorID,