summaryrefslogtreecommitdiffstats
path: root/src/usr/mvpd
diff options
context:
space:
mode:
authorTerry J. Opie <opiet@us.ibm.com>2012-04-05 14:52:49 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-06-08 15:30:30 -0500
commitcf254661375fe14c9cbca03d1dd23400737d6950 (patch)
tree72bb86aa4cd80d25e1f5bda0c89eea2a7d6c3c88 /src/usr/mvpd
parentad6cf41f0adc544fb8dacae893fa25b57ba2cf82 (diff)
downloadtalos-hostboot-cf254661375fe14c9cbca03d1dd23400737d6950.tar.gz
talos-hostboot-cf254661375fe14c9cbca03d1dd23400737d6950.zip
Modify VPD modules to use real PNOR data
- MVPD and SPD - Move MVPD & SPD sections to sideless - Modify PNOR RP test to handle sideless data - Modify Base Scratch Space for PNOR tests Change-Id: Ia0f22c87f8bc3959324fa8347e191f2b47b4325c RTC: 35835 Depends-on: I9b907e795b7b56d3c09f13c376f86f1f2dc627ae Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/876 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server
Diffstat (limited to 'src/usr/mvpd')
-rwxr-xr-xsrc/usr/mvpd/mvpd.C51
-rwxr-xr-xsrc/usr/mvpd/mvpd.H2
2 files changed, 41 insertions, 12 deletions
diff --git a/src/usr/mvpd/mvpd.C b/src/usr/mvpd/mvpd.C
index 11acefbc9..9aab6f40a 100755
--- a/src/usr/mvpd/mvpd.C
+++ b/src/usr/mvpd/mvpd.C
@@ -39,6 +39,7 @@
#include <targeting/common/targetservice.H>
#include <devicefw/driverif.H>
#include <vfs/vfs.H>
+#include <spd/spdif.H>
#include <mvpd/mvpdreasoncodes.H>
#include <mvpd/mvpdenums.H>
@@ -50,6 +51,12 @@
bool g_loadModule = true;
mutex_t g_mvpdMutex = MUTEX_INITIALIZER;
+uint64_t g_mvpdPnorAddr = 0x0;
+
+// By setting to false, allows debug at a later time by allowing to
+// substitute a binary file (procmvpd.dat) into PNOR.
+const bool g_readPNOR = true;
+
// ----------------------------------------------
// Trace definitions
// ----------------------------------------------
@@ -222,6 +229,7 @@ errlHndl_t mvpdWrite ( DeviceFW::OperationType i_opType,
do
{
+ // TODO - This will be implemented with story 39177
TRACFCOMP( g_trac_mvpd,
ERR_MRK"MVPD Writes are not supported yet!" );
@@ -727,20 +735,39 @@ errlHndl_t mvpdFetchData ( uint64_t i_byteAddr,
do
{
- // --------------------------------------------------------------------
- // TODO - For now this code will call to read a specific binary file
- // for every request. Eventually that will be replaced with a function
- // that will read from the actual PNOR section that contains MVPD for
- // each of the processors in the system.
- // This will be done with Story 35835.
- // --------------------------------------------------------------------
- err = mvpdReadBinaryFile( i_byteAddr,
- i_numBytes,
- o_data );
+ if( g_readPNOR )
+ {
+ // Call a function in the SPD code which does an identical thing,
+ // but with different address offsets. Saves us having to
+ // duplicate the code between the 2 modules.
+ SPD::pnorInformation info;
+ info.sectionSize = MVPD_SECTION_SIZE;
+ info.maxSections = MVPD_MAX_SECTIONS;
+ info.pnorSection = PNOR::MODULE_VPD;
+ info.pnorSide = PNOR::SIDELESS;
+ err = SPD::readPNOR( i_byteAddr,
+ i_numBytes,
+ o_data,
+ i_target,
+ info,
+ g_mvpdPnorAddr,
+ &g_mvpdMutex );
- if( err )
+ if( err )
+ {
+ break;
+ }
+ }
+ else
{
- break;
+ err = mvpdReadBinaryFile( i_byteAddr,
+ i_numBytes,
+ o_data );
+
+ if( err )
+ {
+ break;
+ }
}
} while( 0 );
diff --git a/src/usr/mvpd/mvpd.H b/src/usr/mvpd/mvpd.H
index 57f66d96e..2d2297c23 100755
--- a/src/usr/mvpd/mvpd.H
+++ b/src/usr/mvpd/mvpd.H
@@ -51,6 +51,8 @@ enum
RECORD_TOC_UNUSED = 2,
RT_SKIP_BYTES = 3,
+ MVPD_SECTION_SIZE = 0x10000,
+ MVPD_MAX_SECTIONS = 8,
};
/**
OpenPOWER on IntegriCloud