summaryrefslogtreecommitdiffstats
path: root/src/usr/vpd
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2019-01-23 14:43:37 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-02-16 09:10:13 -0600
commite6832f74ac222be90b6719a33613863698239ce4 (patch)
tree58f0f0010bd984b11c8ce200e3dabae2b0bbd91a /src/usr/vpd
parentbc80fc6b84359fa03c4212162e3e548dadcd8a9c (diff)
downloadblackbird-hostboot-e6832f74ac222be90b6719a33613863698239ce4.tar.gz
blackbird-hostboot-e6832f74ac222be90b6719a33613863698239ce4.zip
Add new path in EEPROM device op to allow reading from new EECACHE
Recently a new EECACHE section was introduced to Hostboot. This section gets populated with a copy of every PRIMARY_VPD eeprom (someday could contain other eeprom roles also) during host_discover_targets. This commit add support to allow users to select where they want to perform their EEPROM device operation. If they pass CACHE to the deviceOp macro then a read will come from the pnor cache, writes will write to pnor cache and then also write to the eeprom HW. If HARDWARE is passed in then reads and writes will be directly done on the eeprom hardware. If AUTOSELECT is passed the code will check our cache to see if we have a copy of the eeprom in question, if we have a copy we will go the CACHE path, if no copy exists we will go the HARDWARE path. Along with this change some reorganization was done w/ the eeprom related files. RTC: 196805 Change-Id: If2c4e5d3e338a1a10780740c1a019eb4af003b73 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70822 Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/vpd')
-rw-r--r--src/usr/vpd/ipvpd.C7
-rw-r--r--src/usr/vpd/spd.C6
2 files changed, 8 insertions, 5 deletions
diff --git a/src/usr/vpd/ipvpd.C b/src/usr/vpd/ipvpd.C
index 877b91283..241c8e7cf 100644
--- a/src/usr/vpd/ipvpd.C
+++ b/src/usr/vpd/ipvpd.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2018 */
+/* Contributors Listed Below - COPYRIGHT 2013,2019 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -1792,7 +1792,7 @@ errlHndl_t IpVpdFacade::fetchDataFromEeprom ( uint64_t i_byteAddr,
i_numBytes,
DEVICE_EEPROM_ADDRESS(
EEPROM::VPD_PRIMARY,
- i_byteAddr ) );
+ i_byteAddr, EEPROM::AUTOSELECT ) );
if( err )
{
break;
@@ -2230,7 +2230,8 @@ errlHndl_t IpVpdFacade::writeKeyword ( const char * i_keywordName,
keywordSize,
DEVICE_EEPROM_ADDRESS(
EEPROM::VPD_PRIMARY,
- i_offset+byteAddr ) );
+ i_offset+byteAddr,
+ EEPROM::AUTOSELECT) );
if( err )
{
break;
diff --git a/src/usr/vpd/spd.C b/src/usr/vpd/spd.C
index 0a5bd7245..b57297df0 100644
--- a/src/usr/vpd/spd.C
+++ b/src/usr/vpd/spd.C
@@ -515,7 +515,8 @@ errlHndl_t spdFetchData ( uint64_t i_byteAddr,
i_numBytes,
DEVICE_EEPROM_ADDRESS(
EEPROM::VPD_PRIMARY,
- i_byteAddr ) );
+ i_byteAddr,
+ EEPROM::AUTOSELECT) );
if( err )
{
TRACFCOMP(g_trac_spd,
@@ -596,7 +597,8 @@ errlHndl_t spdWriteData ( uint64_t i_offset,
i_numBytes,
DEVICE_EEPROM_ADDRESS(
EEPROM::VPD_PRIMARY,
- i_offset ) );
+ i_offset,
+ EEPROM::AUTOSELECT) );
if( err )
{
break;
OpenPOWER on IntegriCloud