summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2011-07-29 13:22:18 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2011-08-08 08:03:58 -0500
commitdf4b0117660700e195864b761dfe92dd3467c686 (patch)
tree8542d84e764200031416e89a5defa166a616e0d0 /src/include
parentb6041015e48c8987813b2220f59da4bf6c54383e (diff)
downloadtalos-hostboot-df4b0117660700e195864b761dfe92dd3467c686.tar.gz
talos-hostboot-df4b0117660700e195864b761dfe92dd3467c686.zip
More PNOR RP work - Task 3440 (Story 3330)
Also includes testcase work for Task 3388 Change-Id: Ib4ff920f351554fe457c171f601a38809ca6ac6f Functional PNOR RP code that works with the PNOR DD. Still missing the complete path but should be ready for use by the next level up. Task 3440 Change-Id: Id32a919f88da636c341116444e557387beaccdb2 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/230 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/devicefw/devfwreasoncodes.H2
-rw-r--r--src/include/usr/devicefw/userif.H10
-rw-r--r--src/include/usr/pnor/pnor_reasoncodes.H9
-rw-r--r--src/include/usr/pnor/pnorif.H32
4 files changed, 31 insertions, 22 deletions
diff --git a/src/include/usr/devicefw/devfwreasoncodes.H b/src/include/usr/devicefw/devfwreasoncodes.H
index 0f55f063d..16493ca5b 100644
--- a/src/include/usr/devicefw/devfwreasoncodes.H
+++ b/src/include/usr/devicefw/devfwreasoncodes.H
@@ -7,7 +7,7 @@ namespace DeviceFW
{
enum DevFwModuleId
{
- DEVFW_MOD_ASSOCIATOR = 0x00,
+ DEVFW_MOD_ASSOCIATOR = 0x01,
};
enum DevFwReasonCode
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index c1bbd864b..6c261caab 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -42,13 +42,13 @@ namespace DeviceFW
/**
* Construct a PNOR DD address
* address = 0000_0000_0000_000c_aaaa_aaaa_aaaa_aaaa
- * c=side, a=address
- * @param[in] chip Chip Select
- * @param[in] addr Offset (from zero) into selected flash chip
+ * c=chip, a=address
+ * @param[in] i_chip Chip Select
+ * @param[in] i_addr Offset (from zero) into selected flash chip
* @return 64-bit address to pass into PNOR device commands
*/
- #define DEVICE_PNOR_ADDRESS( chip, addr ) \
- DeviceFW::PNOR, ((static_cast<uint64_t>(chip)<<32)|static_cast<uint64_t>(addr))
+ #define DEVICE_PNOR_ADDRESS( i_chip, i_addr ) \
+ DeviceFW::PNOR, ((static_cast<uint64_t>(i_chip)<<32)|static_cast<uint64_t>(i_addr))
/**
diff --git a/src/include/usr/pnor/pnor_reasoncodes.H b/src/include/usr/pnor/pnor_reasoncodes.H
index 48ba21c00..0e7f002e4 100644
--- a/src/include/usr/pnor/pnor_reasoncodes.H
+++ b/src/include/usr/pnor/pnor_reasoncodes.H
@@ -7,12 +7,17 @@ namespace PNOR
{
enum PNORModuleId
{
- PNORRP_WAITFORMESSAGE = 0x01,
+ MOD_PNORRP_WAITFORMESSAGE = 0x01, /**< pnorrp.C : PnorRP::waitForMessage */
+ MOD_PNORRP_COMPUTEDEVICEADDR = 0x02, /**< pnorrp.C : PnorRP::computeDeviceAddr */
+ MOD_PNORRP_GETSECTIONINFO = 0x03, /**< pnorrp.C : PnorRP::getSectionInfo */
+ MOD_PNORRP_COMPUTESECTION = 0x04, /**< pnorrp.C : PnorRP::computeSection */
};
enum PNORReasonCode
{
- INVALID_MESSAGE = PNOR_COMP_ID | 0x01,
+ RC_INVALID_MESSAGE = PNOR_COMP_ID | 0x01,
+ RC_INVALID_ADDRESS = PNOR_COMP_ID | 0x02,
+ RC_INVALID_SECTION = PNOR_COMP_ID | 0x03,
};
};
diff --git a/src/include/usr/pnor/pnorif.H b/src/include/usr/pnor/pnorif.H
index 1b551d8ee..49f4e7879 100644
--- a/src/include/usr/pnor/pnorif.H
+++ b/src/include/usr/pnor/pnorif.H
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <builtins.h>
+#include <errl/errlentry.H>
namespace PNOR
{
@@ -14,7 +15,7 @@ enum SectionId
{
TOC, /**< Table of Contents */
GLOBAL_DATA, /**< Global Data */
- SBE_IPL, /**< Self-Boot Enginer IPL image */
+ SBE_IPL, /**< Self-Boot Engine IPL image */
HB_BASE_CODE, /**< Hostboot Base Image */
HB_DATA, /**< Hostboot Data */
HB_ERRLOGS, /**< Hostboot Error log Repository */
@@ -33,26 +34,29 @@ enum SectionId
};
/**
+ * Select a side of flash to access
+ */
+enum SideSelect
+{
+ SIDE_A, /**< A-side of flash */
+ SIDE_B, /**< B-side of flash */
+ SIDELESS, /**< Sideless data */
+};
+
+/**
* Information about a section of PNOR
*/
struct SectionInfo_t
{
SectionId id; /**< Identifier for this section */
+ SideSelect side; /**< Identifier for the side of flash */
const char* name; /**< Name of the section */
+
uint64_t vaddr; /**< Virtual address for the start of the section */
uint64_t size; /**< Actual size of content in bytes */
bool eccProtected; /**< Section is ECC protected */
};
-/**
- * Select a side of flash to access
- */
-enum SideSelect
-{
- SIDE_A = 0xA, /**< A-side of flash */
- SIDE_B = 0xB, /**< B-side of flash */
- SIDELESS = 0xF, /**< Sideless data */
-};
@@ -63,11 +67,11 @@ enum SideSelect
* @param[in] i_side Side select
* @param[out] o_info Location and size information
*
- * @return size_t Offset of section in bytes
+ * @return errlHndl_t Error log if request was invalid
*/
-void getSectionInfo( SectionId i_section,
- SideSelect i_side,
- SectionInfo_t& o_info );
+errlHndl_t getSectionInfo( SectionId i_section,
+ SideSelect i_side,
+ SectionInfo_t& o_info );
}
OpenPOWER on IntegriCloud