summaryrefslogtreecommitdiffstats
path: root/src/usr/fsi
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2014-09-10 14:09:29 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-10-03 11:11:10 -0500
commit6066a4b18b29baea4cdfa8cf68c7a207978c327c (patch)
tree11855fb9636ed4a438939ae7b9bbdd6e259aa511 /src/usr/fsi
parenta5f37a7efcfc85f4c58d526ecc8f9028bc9f26bb (diff)
downloadtalos-hostboot-6066a4b18b29baea4cdfa8cf68c7a207978c327c.tar.gz
talos-hostboot-6066a4b18b29baea4cdfa8cf68c7a207978c327c.zip
fsipres.C now checks of mvpd/cvpd without creating error logs.
Change-Id: Ie2542e97f2bb7bf9ea9680b57e337cd10beda81b RTC:113960 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13286 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/fsi')
-rw-r--r--src/usr/fsi/fsipres.C129
1 files changed, 4 insertions, 125 deletions
diff --git a/src/usr/fsi/fsipres.C b/src/usr/fsi/fsipres.C
index c4ac77ce0..dfc74c6a6 100644
--- a/src/usr/fsi/fsipres.C
+++ b/src/usr/fsi/fsipres.C
@@ -29,6 +29,7 @@
#include <fsi/fsi_reasoncodes.H>
#include <vpd/mvpdenums.H>
#include <vpd/cvpdenums.H>
+#include <vpd/vpd_if.H>
#include <errl/errlmanager.H>
#include <hwas/common/hwasCallout.H>
#include <targeting/common/predicates/predicatectm.H>
@@ -68,7 +69,6 @@ errlHndl_t procPresenceDetect(DeviceFW::OperationType i_opType,
va_list i_args)
{
errlHndl_t l_errl = NULL;
- uint32_t l_saved_plid = 0;
if (unlikely(io_buflen < sizeof(bool)))
{
@@ -115,64 +115,10 @@ errlHndl_t procPresenceDetect(DeviceFW::OperationType i_opType,
#endif // CONFIG_MVPD_READ_FROM_HW
bool mvpd_present = false;
- size_t theSize = 0;
if ( check_for_mvpd )
{
- l_errl = deviceRead( i_target,
- NULL,
- theSize,
- DEVICE_MVPD_ADDRESS( MVPD::CP00,
- MVPD::VD ) );
- if( l_errl )
- {
- if( fsi_present )
- {
- // Save this plid to use later
- l_saved_plid = l_errl->plid();
-
- // commit this log because we expected to have VPD
- errlCommit( l_errl,
- FSI_COMP_ID );
- }
- else
- {
- // just delete this
- delete l_errl;
- }
- }
-
- if( theSize > 0 )
- {
- uint8_t theData[theSize];
- l_errl = deviceRead( i_target,
- theData,
- theSize,
- DEVICE_MVPD_ADDRESS( MVPD::CP00,
- MVPD::VD ) );
- if( l_errl )
- {
- if( fsi_present )
- {
-
- // Save this plid to use later
- l_saved_plid = l_errl->plid();
-
- // commit this log because we expected to have VPD
- errlCommit( l_errl,
- FSI_COMP_ID );
- }
- else
- {
- // just delete this
- delete l_errl;
- }
- }
- else
- {
- mvpd_present = true;
- }
- }
+ mvpd_present = VPD::mvpdPresent( i_target );
}
@@ -206,11 +152,6 @@ errlHndl_t procPresenceDetect(DeviceFW::OperationType i_opType,
HWAS::NO_DECONFIG,
HWAS::GARD_NULL );
- // if there is a saved PLID, apply it to this error log
- if (l_saved_plid)
- {
- l_errl->plid(l_saved_plid);
- }
// Add FFDC for the target to an error log
getFsiFFDC( FFDC_PRESENCE_FAIL, l_errl, i_target);
@@ -259,7 +200,6 @@ errlHndl_t membPresenceDetect(DeviceFW::OperationType i_opType,
va_list i_args)
{
errlHndl_t l_errl = NULL;
- uint32_t l_saved_plid = 0;
if (unlikely(io_buflen < sizeof(bool)))
{
@@ -293,66 +233,10 @@ errlHndl_t membPresenceDetect(DeviceFW::OperationType i_opType,
#endif // CONFIG_CVPD_READ_FROM_HW
bool cvpd_present = false;
- size_t theSize = 0;
-
+
if ( check_for_cvpd )
{
- l_errl = deviceRead( i_target,
- NULL,
- theSize,
- DEVICE_CVPD_ADDRESS( CVPD::VEIR,
- CVPD::PF ) );
-
- if( l_errl )
- {
-
- if( fsi_present )
- {
- // Save this plid to use later
- l_saved_plid = l_errl->plid();
-
- // commit this log because we expected to have VPD
- errlCommit( l_errl,
- FSI_COMP_ID );
- }
- else
- {
- // just delete this
- delete l_errl;
- }
- }
-
- if( theSize > 0 )
- {
- uint8_t theData[theSize];
- l_errl = deviceRead( i_target,
- theData,
- theSize,
- DEVICE_CVPD_ADDRESS( CVPD::VEIR,
- CVPD::PF ) );
- if( l_errl )
- {
-
- if( fsi_present )
- {
- // Save this plid to use later
- l_saved_plid = l_errl->plid();
-
- // commit this log because we expected to have VPD
- errlCommit( l_errl,
- FSI_COMP_ID );
- }
- else
- {
- // just delete this
- delete l_errl;
- }
- }
- else
- {
- cvpd_present = true;
- }
- }
+ cvpd_present = VPD::cvpdPresent( i_target );
}
// Finally compare the 2 methods
@@ -386,11 +270,6 @@ errlHndl_t membPresenceDetect(DeviceFW::OperationType i_opType,
HWAS::NO_DECONFIG,
HWAS::GARD_NULL );
- // if there is a saved PLID, apply it to this error log
- if (l_saved_plid)
- {
- l_errl->plid(l_saved_plid);
- }
// Add FFDC for the target to an error log
getFsiFFDC( FFDC_PRESENCE_FAIL, l_errl, i_target);
OpenPOWER on IntegriCloud