From fd23ae8d50f307a1aca530d5a204d67261b58fea Mon Sep 17 00:00:00 2001 From: Meng Li Date: Tue, 24 Apr 2018 21:21:07 +0800 Subject: Get SN from BMC and update into PVPD EEPROM Resolves #135 Change-Id: I46b5c2208ed28822c6001a955f4056d976e79339 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58010 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/include/usr/ipmi/ipmifruinv.H | 17 ++++++++++++++++- src/include/usr/ipmi/ipmiif.H | 5 ++++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src/include/usr/ipmi') diff --git a/src/include/usr/ipmi/ipmifruinv.H b/src/include/usr/ipmi/ipmifruinv.H index 0df72462b..140395acb 100644 --- a/src/include/usr/ipmi/ipmifruinv.H +++ b/src/include/usr/ipmi/ipmifruinv.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -39,6 +39,13 @@ namespace IPMIFRUINV */ void setData(bool i_updateData=false); + /** + * @brief Reads the entire FRU inventory record + * @param[in] deviceId, The Record number to be read + * @param[o_data] The resultant pointer to the record data read + */ + void readFruData(uint8_t i_deviceId, uint8_t *o_data); + /** * @brief Clears fru data from BMC * @param[in] fruId, The fruId to be cleared @@ -70,6 +77,14 @@ namespace IPMIFRUINV io_potentialFrus, bool i_updateData); + /** + * @brief Reads the Serial Number of the Product Info Area and returns it + * @param[in] fruId, The Record number to be read + * @return the pointer with the serial number - The caller is required + * to clear up this memory + */ + char* getProductSN(uint8_t i_fruId); + }; #endif diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H index 55546d13e..ee83a5923 100644 --- a/src/include/usr/ipmi/ipmiif.H +++ b/src/include/usr/ipmi/ipmiif.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -252,6 +252,9 @@ namespace IPMI inline const command_t set_sel_time(void) { return std::make_pair(NETFUN_STORAGE, 0x49); } + inline const command_t read_fru_data(void) + { return std::make_pair(NETFUN_STORAGE, 0x11); } + inline const command_t write_fru_data(void) { return std::make_pair(NETFUN_STORAGE, 0x12); } -- cgit v1.2.3