summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/devicefw/userif.H42
-rw-r--r--src/include/usr/fsi/fsi_reasoncodes.H4
-rw-r--r--src/include/usr/vpd/mvpdenums.H4
-rw-r--r--src/include/usr/vpd/spdenums.H4
-rw-r--r--src/include/usr/vpd/vpd_if.H52
-rw-r--r--src/include/usr/vpd/vpdreasoncodes.H7
6 files changed, 97 insertions, 16 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index 38cad8ea6..69d334634 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -37,6 +37,7 @@
#ifndef PARSER
#include <stdint.h>
#include <errl/errlentry.H>
+#include <vpd/vpd_if.H>
#include <targeting/common/targetservice.H>
#endif // not PARSER
@@ -98,7 +99,18 @@ namespace DeviceFW
* by the device driver.
*/
#define DEVICE_SPD_ADDRESS( i_keyword )\
- DeviceFW::SPD, static_cast<uint64_t>(( i_keyword ))
+ DEVICE_SPD_FORCE_ADDRESS( i_keyword, VPD::AUTOSELECT )
+
+ /**
+ * Construct the device addressing parameters for the SPD device ops.
+ * @param[in] i_keyword - The keyword enumeration value to be accessed
+ * by the device driver.
+ * @param[in] i_location - The location to be used for
+ * accessing the keyword (PNOR/SEEPROM).
+ */
+ #define DEVICE_SPD_FORCE_ADDRESS( i_keyword, i_location )\
+ DeviceFW::SPD, static_cast<uint64_t>(( i_keyword )),\
+ static_cast<uint64_t>(( i_location))
/**
* Construct the device addressing parameters for the MAILBOX device.
@@ -115,8 +127,20 @@ namespace DeviceFW
* within the i_record Record to access.
*/
#define DEVICE_MVPD_ADDRESS( i_record, i_keyword )\
+ DEVICE_MVPD_FORCE_ADDRESS( i_record, i_keyword, VPD::AUTOSELECT )
+
+ /**
+ * Construct the device addressing parameters for the MVPD device ops.
+ * @param[in] i_record - The enumeration of the MVPD record to access.
+ * @param[in] i_keyword - The enumeration of the MVPD keyword, located
+ * within the i_record Record to access.
+ * @param[in] i_location - The location of the data (PNOR/SEEPROM)
+ see vpd_if.H
+ */
+ #define DEVICE_MVPD_FORCE_ADDRESS( i_record, i_keyword, i_location )\
DeviceFW::MVPD, static_cast<uint64_t>(( i_record )),\
- static_cast<uint64_t>(( i_keyword ))
+ static_cast<uint64_t>(( i_keyword )),\
+ static_cast<uint64_t>(( i_location ))
/**
* Construct the device addressing parameters for the CVPD device ops.
@@ -125,8 +149,20 @@ namespace DeviceFW
* within the i_record Record to access.
*/
#define DEVICE_CVPD_ADDRESS( i_record, i_keyword )\
+ DEVICE_CVPD_FORCE_ADDRESS( i_record, i_keyword, VPD::AUTOSELECT )
+
+ /**
+ * Construct the device addressing parameters for the CVPD device ops.
+ * @param[in] i_record - The enumeration of the CVPD record to access.
+ * @param[in] i_keyword - The enumeration of the CVPD keyword, located
+ * within the i_record Record to access.
+ * @param[in] i_location - The location of the data (PNOR/SEEPROM)
+ see vpd_if.H
+ */
+ #define DEVICE_CVPD_FORCE_ADDRESS( i_record, i_keyword, i_location )\
DeviceFW::CVPD, static_cast<uint64_t>(( i_record )),\
- static_cast<uint64_t>(( i_keyword ))
+ static_cast<uint64_t>(( i_keyword )),\
+ static_cast<uint64_t>(( i_location ))
/**
* Construct the device addressing parameters for the SCAN device ops.
diff --git a/src/include/usr/fsi/fsi_reasoncodes.H b/src/include/usr/fsi/fsi_reasoncodes.H
index c69085db0..de8930940 100644
--- a/src/include/usr/fsi/fsi_reasoncodes.H
+++ b/src/include/usr/fsi/fsi_reasoncodes.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
diff --git a/src/include/usr/vpd/mvpdenums.H b/src/include/usr/vpd/mvpdenums.H
index 5186d9e20..668dc8cc1 100644
--- a/src/include/usr/vpd/mvpdenums.H
+++ b/src/include/usr/vpd/mvpdenums.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
diff --git a/src/include/usr/vpd/spdenums.H b/src/include/usr/vpd/spdenums.H
index 43465e01d..fdd6ce530 100644
--- a/src/include/usr/vpd/spdenums.H
+++ b/src/include/usr/vpd/spdenums.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
diff --git a/src/include/usr/vpd/vpd_if.H b/src/include/usr/vpd/vpd_if.H
index 6c216edcf..af8e501d5 100644
--- a/src/include/usr/vpd/vpd_if.H
+++ b/src/include/usr/vpd/vpd_if.H
@@ -29,30 +29,64 @@
namespace VPD
{
/**
- * Load the runtime VPD image into memory
+ * @brief typdef for vpdRecord values
+ */
+ typedef uint32_t vpdRecord;
+ /**
+ * @brief typdef for vpdKeyword values
+ */
+ typedef uint32_t vpdKeyword;
+ /**
+ * @brief typdef for vpdCmdTarget values
+ */
+ enum vpdCmdTarget
+ {
+ AUTOSELECT,
+ PNOR,
+ SEEPROM,
+ INVALID_LOCATION = 0xFFFF,
+ };
+
+ /**
+ * @brief Load the runtime VPD image into memory
* @param[out] The physical address of the VPD image
* @return error handle if there was an error
*/
errlHndl_t vpd_load_rt_image(uint64_t & o_vpd_addr);
/**
- * @brief this function checks to see if the given mvpd target
- * is present
- *
+ * @brief This function checks to see if the given mvpd target
+ * is present
* @param[in] i_target - Target device to search for mvpd
- *
* @return bool - true if mvpd is present, false if it is not.
*/
bool mvpdPresent ( TARGETING::Target * i_target );
/**
- * @brief this function checks to see if the given cvpd target
- * is present
- *
+ * @brief This function checks to see if the given cvpd target
+ * is present
* @param[in] i_target - Target device to search for cvpd
- *
* @return bool - true if cvpd is present, false if it is not.
*/
bool cvpdPresent ( TARGETING::Target * i_target );
+
+ /**
+ * @brief This function checks if the PNOR cache for this target is in
+ * sync with the SEEPROM, if not it loads the PNOR cache from SEEPROM.
+ * @param[in] i_target - Target device
+ * @return errlHndl_t - NULL if successful, otherwise a pointer to the
+ * error log.
+ */
+ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target );
+
+ /**
+ * @brief This function invalidates the VPD data in the PNOR cache.
+ * @param[in] i_target - Target device
+ * @return errlHndl_t - NULL if successful, otherwise a pointer to the
+ * error log.
+ */
+ errlHndl_t invalidatePnorCache ( TARGETING::Target * i_target );
+
}; //end vpd namespace
+
#endif
diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H
index 435d30ab3..4ac5361b9 100644
--- a/src/include/usr/vpd/vpdreasoncodes.H
+++ b/src/include/usr/vpd/vpdreasoncodes.H
@@ -46,6 +46,8 @@ enum vpdModuleId
VPD_INVALID_MODULE = 0x00,
// Common VPD
+ VPD_WRITE_PNOR = 0x10,
+ VPD_ENSURE_CACHE_IS_IN_SYNC = 0x11,
// IPVPD
VPD_IPVPD_TRANSLATE_RECORD = 0x20,
@@ -72,6 +74,7 @@ enum vpdModuleId
VPD_SPD_GET_KEYWORD_ENTRY = 0x6C,
VPD_SPD_WRITE_DATA = 0x6D,
VPD_SPD_GET_MOD_TYPE = 0x6E,
+ VPD_SPD_FETCH_DATA = 0x6F,
// Centaur FRU VPD
@@ -121,7 +124,9 @@ enum vpdReasonCode
VPD_INSUFFICIENT_SPACE_FOR_IMAGE = VPD_COMP_ID | 0x1b,
VPD_MBOX_NOT_SUPPORTED_RT = VPD_COMP_ID | 0x1c,
VPD_RECORD_INVALID_VHDR = VPD_COMP_ID | 0x30,
- VPD_READ_CONFIG_NOT_SET = VPD_COMP_ID | 0x31,
+ VPD_READ_SOURCE_UNRESOLVED = VPD_COMP_ID | 0x31,
+ VPD_REMOVE_PAGES_FAIL = VPD_COMP_ID | 0x32,
+ VPD_UNEXPECTED_TARGET_TYPE = VPD_COMP_ID | 0x33,
};
OpenPOWER on IntegriCloud