summaryrefslogtreecommitdiffstats
path: root/src/include
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/include
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/include')
-rw-r--r--src/include/usr/spd/spdif.H88
-rw-r--r--src/include/usr/spd/spdreasoncodes.H2
2 files changed, 90 insertions, 0 deletions
diff --git a/src/include/usr/spd/spdif.H b/src/include/usr/spd/spdif.H
new file mode 100644
index 000000000..f536babd8
--- /dev/null
+++ b/src/include/usr/spd/spdif.H
@@ -0,0 +1,88 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/spd/spdif.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
+/**
+ * @file spdif.H
+ *
+ * @brief External SPD interfaces
+ *
+ */
+#ifndef __SPDIF_H
+#define __SPDIF_H
+// -----------------------------------------------
+// Includes
+// -----------------------------------------------
+#include <pnor/pnorif.H>
+
+namespace SPD
+{
+
+/**
+ * @brief This structure is used to transfer common information needed
+ * for reading the address from the PNOR RP.
+ */
+struct pnorInformation
+{
+ uint64_t sectionSize;
+ uint64_t maxSections;
+ PNOR::SectionId pnorSection;
+ PNOR::SideSelect pnorSide;
+};
+
+/**
+ * @brief This Function is used to query the PNOR RP and get the address of
+ * the data section. It is also used to then read from that address the
+ * number of bytes requested.
+ * NOTE: This function is defined here because it is used by both the SPD
+ * and MVPD code.
+ *
+ * @param[in] i_byteAddr - The offset into the section of the data to be read.
+ *
+ * @param[in] i_numBytes - The number of bytes to read.
+ *
+ * @param[out] o_data - The data buffer.
+ *
+ * @param[in] i_target - The target to read the data for.
+ *
+ * @param[in] i_pnorInfo - Data required to query for the PNOR data address.
+ *
+ * @param[in/out] io_cachedAddr - This is the address that is, or will be read
+ * from the PNOR RP and saved for future use.
+ *
+ * @param[in] i_mutex - Mutex from calling code to be used for setting
+ * io_isAddrCached and io_cachedAddr.
+ *
+ * @return errHndl_t - NULL if successful, otherwise a pointer to the error
+ * log.
+*/
+errlHndl_t readPNOR ( uint64_t i_byteAddr,
+ size_t i_numBytes,
+ void * o_data,
+ TARGETING::Target * i_target,
+ pnorInformation & i_pnorInfo,
+ uint64_t &io_cachedAddr,
+ mutex_t * i_mutex );
+
+}; // end SPD
+
+#endif
diff --git a/src/include/usr/spd/spdreasoncodes.H b/src/include/usr/spd/spdreasoncodes.H
index 9767d3916..68adffca5 100644
--- a/src/include/usr/spd/spdreasoncodes.H
+++ b/src/include/usr/spd/spdreasoncodes.H
@@ -54,6 +54,7 @@ enum spdModuleId
SPD_SPECIAL_CASES = 0x06,
SPD_PRESENCE_DETECT = 0x07,
SPD_CHECK_MODULE_SPECIFIC_KEYWORD = 0x08,
+ SPD_GET_PNOR_ADDR = 0x09,
};
/**
@@ -78,6 +79,7 @@ enum spdReasonCode
SPD_MOD_SPECIFIC_MISMATCH_CMM = SPD_COMP_ID | 0x0b,
SPD_MOD_SPECIFIC_MISMATCH_LRMM = SPD_COMP_ID | 0x0c,
SPD_MOD_SPECIFIC_UNSUPPORTED = SPD_COMP_ID | 0x0d,
+ SPD_SIZE_MISMATCH = SPD_COMP_ID | 0x0e,
};
}; // end SPD
OpenPOWER on IntegriCloud