diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2015-01-27 09:05:37 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-18 15:12:13 -0600 |
commit | 417c6e0a4bb7c8f9d9721b73ddcae696007be15e (patch) | |
tree | 42778d629a19bf85f740cbd649ca2d27d8a20aa9 /src/usr/vpd/ipvpd.C | |
parent | 79ea7abf6d31c146c680d39b9f3ae007e434a573 (diff) | |
download | blackbird-hostboot-417c6e0a4bb7c8f9d9721b73ddcae696007be15e.tar.gz blackbird-hostboot-417c6e0a4bb7c8f9d9721b73ddcae696007be15e.zip |
HBRT Runtime VPD Updates
Enables writes to VPD and handles disabling
PNOR cache in manufacturing mode
Change-Id: I03d4246ceb91520939f8b04f3b3d2fc31c116079
RTC: 114911
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15462
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/vpd/ipvpd.C')
-rw-r--r-- | src/usr/vpd/ipvpd.C | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/src/usr/vpd/ipvpd.C b/src/usr/vpd/ipvpd.C index 57d5a9ce8..af0055cd1 100644 --- a/src/usr/vpd/ipvpd.C +++ b/src/usr/vpd/ipvpd.C @@ -242,7 +242,7 @@ errlHndl_t IpVpdFacade::write ( TARGETING::Target * i_target, // PNOR needs to be loaded before we can write it TARGETING::ATTR_VPD_SWITCHES_type vpdSwitches = i_target->getAttr<TARGETING::ATTR_VPD_SWITCHES>(); - if( vpdSwitches.pnorLoaded ) + if( vpdSwitches.pnorCacheValid ) { l_args.location = VPD::PNOR; err = write( i_target, @@ -811,8 +811,8 @@ errlHndl_t IpVpdFacade::findRecordOffset ( const char * i_record, * @moduleid VPD::VPD_IPVPD_FIND_RECORD_OFFSET * @userdata1[0:31] Target HUID * @userdata1[32:63] Requested VPD Source Location - * @userdata2[0:31] CONFIG_<vpd>_READ_WRITE_CONFIG_PNOR - * @userdata2[32:63] CONFIG_<vpd>_READ_WRITE_CONFIG_HW + * @userdata2[0:31] VPD write PNOR flag + * @userdata2[32:63] VPD write HW flag * @devdesc Unable to resolve the VPD * source (PNOR or SEEPROM) */ @@ -1426,8 +1426,8 @@ errlHndl_t IpVpdFacade::fetchData ( uint64_t i_byteAddr, * @moduleid VPD::VPD_IPVPD_FETCH_DATA * @userdata1[0:31] Target HUID * @userdata1[32:63] Requested VPD Source Location - * @userdata2[0:31] CONFIG_<vpd>_READ_FROM_PNOR - * @userdata2[32:63] CONFIG_<vpd>_READ_FROM_HW + * @userdata2[0:31] VPD read PNOR flag + * @userdata2[32:63] VPD read HW flag * @devdesc Unable to resolve the VPD * source (PNOR or SEEPROM) */ @@ -1903,8 +1903,8 @@ errlHndl_t IpVpdFacade::writeKeyword ( const char * i_keywordName, * @moduleid VPD::VPD_IPVPD_WRITE_KEYWORD * @userdata1[0:31] Target HUID * @userdata1[32:63] Requested VPD Destination - * @userdata2[0:31] CONFIG_<vpd>_WRITE_TO_PNOR - * @userdata2[32:63] CONFIG_<vpd>_WRITE_TO_HW + * @userdata2[0:31] VPD write PNOR flag + * @userdata2[32:63] VPD write HW flag * @devdesc Unable to resolve the VPD * destination (PNOR or SEEPROM) */ @@ -2007,3 +2007,24 @@ bool IpVpdFacade::compareKeywords ( const keywordInfo e1, else return false; } + + +// ------------------------------------------------------------------ +// IpVpdFacade::setConfigFlagsHW +// ------------------------------------------------------------------ +void IpVpdFacade::setConfigFlagsHW ( ) +{ + // Only change configs if in PNOR caching mode + if( iv_configInfo.vpdReadPNOR && + iv_configInfo.vpdReadHW ) + { + iv_configInfo.vpdReadPNOR = false; + iv_configInfo.vpdReadHW = true; + } + if( iv_configInfo.vpdWritePNOR && + iv_configInfo.vpdWriteHW ) + { + iv_configInfo.vpdWritePNOR = false; + iv_configInfo.vpdWriteHW = true; + } +} |