summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorMike Baiocchi <baiocchi@us.ibm.com>2013-09-20 14:47:15 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-28 12:21:53 -0500
commita094332bbe8807c8f24aeb79f34be063845cea10 (patch)
tree7b05b516287bd27d971ee8404a980bfad311ac2b /src/include/usr
parent7b8d4a482ca2d110f3bf67b7a8e1bed758318420 (diff)
downloadtalos-hostboot-a094332bbe8807c8f24aeb79f34be063845cea10.tar.gz
talos-hostboot-a094332bbe8807c8f24aeb79f34be063845cea10.zip
Initial Support for Updating SBE SEEPROM
This initial commit will be used to create the new SBE directories and files. It also supports the usr functions to find and copy SBE PNOR images. NOTE: It will not enable Updating SBE SEEPROMs in the IPL. Change-Id: I3f545a134493c7595ce50fd885478bbe606de472 RTC: 47032 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6311 Tested-by: Jenkins Server Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/hbotcompid.H10
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatAttributeService.H1
-rw-r--r--src/include/usr/isteps/istep09list.H2
-rw-r--r--src/include/usr/sbe/sbeif.H72
-rw-r--r--src/include/usr/sbe/sbereasoncodes.H88
-rw-r--r--src/include/usr/vmmconst.h5
6 files changed, 177 insertions, 1 deletions
diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H
index 994aac1de..9425f569f 100644
--- a/src/include/usr/hbotcompid.H
+++ b/src/include/usr/hbotcompid.H
@@ -282,7 +282,6 @@ const char VPD_COMP_NAME[] = "vpd";
//@{
const compId_t SECURE_COMP_ID = 0x1E00;
const char SECURE_COMP_NAME[] = "secure";
-//@}
/** @name IPC
* IPC - Inter Processor Communication component
@@ -308,6 +307,15 @@ const compId_t DEVTREE_COMP_ID = 0x2100;
const char DEVTREE_COMP_NAME[] = "devtree";
//@}
+/** @name SBE
+ * SBE utility component
+ */
+//@{
+const compId_t SBE_COMP_ID = 0x2200;
+const char SBE_COMP_NAME[] = "sbe";
+//@}
+
+
/** @name RESERVED
* Reserved component ID. x3100 is the component ID
* of FipS ERRL component. Due to our use of
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index 6d3c0f41c..bcbf50612 100644
--- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
+++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
@@ -1025,6 +1025,7 @@ fapi::ReturnCode fapiPlatGetSpdAttrAccessor (
fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
fapi::platAttrSvc::fapiPlatGetEnableAttr ( fapi::ID, PTARGET, VAL )
+
//------------------------------------------------------------------------------
// MACROS to support MVPD attributes
//------------------------------------------------------------------------------
diff --git a/src/include/usr/isteps/istep09list.H b/src/include/usr/isteps/istep09list.H
index a273d58bc..87a018f21 100644
--- a/src/include/usr/isteps/istep09list.H
+++ b/src/include/usr/isteps/istep09list.H
@@ -95,6 +95,8 @@ const DepModInfo g_istep09Dependancies = {
{
DEP_LIB(libactivate_powerbus.so),
DEP_LIB(libdram_initialization.so),
+ DEP_LIB(libsbe.so),
+ DEP_LIB(libbuild_winkle_images.so),
{ 0 },
}
};
diff --git a/src/include/usr/sbe/sbeif.H b/src/include/usr/sbe/sbeif.H
new file mode 100644
index 000000000..4570aaf85
--- /dev/null
+++ b/src/include/usr/sbe/sbeif.H
@@ -0,0 +1,72 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/sbe/sbeif.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* 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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef _SBEIF_H
+#define _SBEIF_H
+
+#include <errl/errlentry.H>
+#include <pnor/pnorif.H>
+
+namespace SBE
+{
+ // Each SBE Image stored in PNOR has a 64-byte version associated with it
+ // (like a SHA hash of the image)
+ const size_t SBE_IMAGE_VERSION_SIZE = 64; // 64 bytes
+
+ typedef uint8_t sbe_image_version_t[SBE_IMAGE_VERSION_SIZE];
+
+
+ /**
+ * @brief Gets a pointer to the proper SBE image in PNOR
+ *
+ * @param[in] i_target Target used to find right SBE Image in PNOR
+ *
+ * @param[out] o_imgPtr Pointer to SBE Image mapped in PNOR
+ * Note: Pointer moved past any header(s)
+ *
+ * @param[out] o_imgSize Size of the SBE Image in PNOR
+ * Note: Size does not include any header(s)
+ *
+ * @param[out] o_version Pointer to SBE Image Version Struct
+ * If Pointer is NULL, version not returned;
+ * Else sbe_image_version_t is filled in
+ *
+ * @return errlHndl_t Error log handle on failure.
+ */
+ errlHndl_t findSBEInPnor(TARGETING::Target* i_target,
+ void*& o_imgPt,
+ size_t& o_imgSize,
+ sbe_image_version_t* o_version = NULL);
+
+
+ /**
+ * @brief Iterates through all the functional processors and updates
+ * the SBE Image in a SEEPROM, if necessary.
+ *
+ * @return errlHndl_t Error log handle on failure.
+ */
+ errlHndl_t updateProcessorSbeSeeproms();
+
+
+} //end namespace SBE
+
+#endif /* _SBEIF_H */
diff --git a/src/include/usr/sbe/sbereasoncodes.H b/src/include/usr/sbe/sbereasoncodes.H
new file mode 100644
index 000000000..44416aa95
--- /dev/null
+++ b/src/include/usr/sbe/sbereasoncodes.H
@@ -0,0 +1,88 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/vpd/vpdreasoncodes.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* 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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __SBEREASONCODES_H
+#define __SBEREASONCODES_H
+
+// -----------------------------------------------
+// Includes
+// -----------------------------------------------
+#include <hbotcompid.H>
+
+namespace SBE
+{
+
+/**
+* @enum SbeModuleid
+*
+* @brief Module Ids used in created errorlogs. Indicates which
+* functions an error log was created in.
+*
+*/
+enum sbeModuleId
+{
+ SBE_INVALID_MODULE = 0x00,
+ SBE_FIND_IN_PNOR = 0x01,
+ SBE_UPDATE_SEEPROMS = 0x02,
+ SBE_GETSET_MVPD_VERSION = 0x03,
+ SBE_READ_PNOR_VERSION = 0x04,
+ SBE_READ_SBE_FROM_PNOR = 0x05,
+ SBE_CREATE_TEST_SPACE = 0x06,
+ SBE_CLEANUP_TEST_SPACE = 0x07,
+ SBE_GET_TARGET_INFO_STATE = 0x08,
+ SBE_GET_SEEPROM_INFO = 0x09,
+};
+
+/**
+ * @enum sbeReasonCode
+ *
+ * @brief Reasoncodes used to describe what errors are being indicated.
+ *
+ */
+enum sbeReasonCode
+{
+ SBE_INVALID_REASONCODE = SBE_COMP_ID | 0x00, // Invalid RC
+ SBE_ALLOC_BLOCK_FAIL = SBE_COMP_ID | 0x01,
+ SBE_SET_PERMISSION_FAIL = SBE_COMP_ID | 0x02,
+ SBE_REMOVE_PAGES_FAIL = SBE_COMP_ID | 0x03,
+ SBE_REMOVE_PAGES_FOR_EC = SBE_COMP_ID | 0x04,
+ SBE_REMOVE_PAGES_CLEANUP = SBE_COMP_ID | 0x05,
+ SBE_UNSUPPORTED_TOC = SBE_COMP_ID | 0x06,
+ SBE_INVALID_EYECATCHER = SBE_COMP_ID | 0x07,
+ SBE_EC_NOT_FOUND = SBE_COMP_ID | 0x08,
+ SBE_XIP_IMG_SIZE_FAIL = SBE_COMP_ID | 0x09,
+ SBE_MVPD_LEN_INVALID = SBE_COMP_ID | 0x0A,
+ SBE_VERSION_NOT_FOUND = SBE_COMP_ID | 0x0B,
+
+ // SBE_UPDATE_REQUEST_REIPL Must have one unique use
+ // for Shutdown path. FSP relies on it.
+ // termination_rc
+ SBE_UPDATE_REQUEST_REIPL = SBE_COMP_ID | 0x0C,
+
+ SBE_INVALID_INPUT = SBE_COMP_ID | 0x0D,
+ SBE_INVALID_SEEPROM_SIDE = SBE_COMP_ID | 0x0E,
+ SBE_ECC_FAIL = SBE_COMP_ID | 0x0F,
+};
+
+}; // end SBE
+
+#endif
diff --git a/src/include/usr/vmmconst.h b/src/include/usr/vmmconst.h
index fbb787ea1..d1d0d38a8 100644
--- a/src/include/usr/vmmconst.h
+++ b/src/include/usr/vmmconst.h
@@ -80,6 +80,11 @@
/** PNOR Resource Provider is at 2GB */
#define VMM_VADDR_PNOR_RP (2 * GIGABYTE)
+/** SBE Update process is at 3GB, uses 256KB */
+#define VMM_VADDR_SBE_UPDATE (3 * GIGABYTE)
+#define VMM_SBE_UPDATE_SIZE (256*KILOBYTE)
+#define VMM_VADDR_SBE_UPDATE_END (VMM_VADDR_SBE_UPDATE + VMM_SBE_UPDATE_SIZE)
+
/** Attribute Resource Provider */
// Note: Not simplified to make it easier to extract with the PNOR targeting
// image generator script
OpenPOWER on IntegriCloud