summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2017-03-15 23:00:23 -0500
committerJoshua Hunsberger <jahunsbe@us.ibm.com>2017-11-27 11:41:48 -0600
commitf947010cb98574265b2e3c5bf8375c399216c4d3 (patch)
treec70e8db1edae6b2713a769ce6d2685346ee32029
parent4d5ec51c93204fe5fbab9af303f15d9df3f8f5c5 (diff)
downloadtalos-hcode-f947010cb98574265b2e3c5bf8375c399216c4d3.tar.gz
talos-hcode-f947010cb98574265b2e3c5bf8375c399216c4d3.zip
Centaur ring support - TOR API
Key_Cronus_Test=XIP_REGRESS - Updates to TOR API codes to allow user codes to call TOR API function on a Centaur image. Note that the API no longer needs the caller to supply and XIP section ID. - Updates to TOR API codes to take advantage of the improved data and meta-data representation in the ring Id codes and the more self-contained ring image which now has the TOR magic header. - Updates to xip_tool to allow dissection of Centaur image. - Additional updates to TOR API codes and ring Id codes to continue improving overall clarity of data, data structures and flow through TOR API, incl name changes to related data variables and structures. Change-Id: I215ded7829e61f2731e35a5524e8e2348be0b7ab Original-Change-Id: I42891b9662cc0c443d2b16ce866ac945dc2c58dc Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38018 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
-rw-r--r--import/chips/centaur/utils/imageProcs/cen_ringId.C76
-rw-r--r--import/chips/centaur/utils/imageProcs/cen_ringId.mk2
2 files changed, 76 insertions, 2 deletions
diff --git a/import/chips/centaur/utils/imageProcs/cen_ringId.C b/import/chips/centaur/utils/imageProcs/cen_ringId.C
index 9a4971e8..83b9fd5c 100644
--- a/import/chips/centaur/utils/imageProcs/cen_ringId.C
+++ b/import/chips/centaur/utils/imageProcs/cen_ringId.C
@@ -23,6 +23,9 @@
/* */
/* IBM_PROLOG_END_TAG */
+#include <string.h>
+#include <common_ringId.H>
+
namespace CEN_RID
{
@@ -140,4 +143,75 @@ const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
}; // namespace CEN
-}; // namespace CENTAUR
+}; // namespace CEN_RID
+
+
+using namespace CEN_RID;
+
+ChipletType_t CEN_RID::ringid_get_chiplet(RingId_t i_ringId)
+{
+ return RING_PROPERTIES[i_ringId].iv_type;
+}
+
+void CEN_RID::ringid_get_chiplet_properties(
+ ChipletType_t i_chiplet,
+ ChipletData_t** o_cpltData,
+ GenRingIdList** o_ringComm,
+ GenRingIdList** o_ringInst,
+ RingVariantOrder** o_varOrder,
+ uint8_t* o_varNumb)
+{
+ switch (i_chiplet)
+ {
+ case CEN_TYPE :
+ *o_cpltData = (ChipletData_t*) &CEN::g_chipletData;
+ *o_ringComm = (GenRingIdList*) CEN::RING_ID_LIST_COMMON;
+ *o_ringInst = NULL;
+ *o_varOrder = (RingVariantOrder*) CEN::RING_VARIANT_ORDER;
+ *o_varNumb = (*(*o_cpltData)).iv_num_ring_variants;
+ break;
+
+ default :
+ *o_cpltData = NULL;
+ *o_ringComm = NULL;
+ *o_ringInst = NULL;
+ *o_varOrder = NULL;
+ *o_varNumb = 0;
+ break;
+ }
+}
+
+GenRingIdList* CEN_RID::ringid_get_ring_properties(RingId_t i_ringId)
+{
+ ChipletData_t* l_cpltData;
+ GenRingIdList* l_ringList[2]; // 0: common, 1: instance
+ RingVariantOrder* l_varOrder;
+ uint8_t l_varNumb;
+ int i, j, n;
+
+ CEN_RID::ringid_get_chiplet_properties(
+ CEN_RID::ringid_get_chiplet(i_ringId),
+ &l_cpltData, &l_ringList[0], &l_ringList[1], &l_varOrder, &l_varNumb);
+
+ if (!l_ringList[0])
+ {
+ return NULL;
+ }
+
+ for (j = 0; j < 2; j++) // 0: common, 1: instance
+ {
+ n = (j ? l_cpltData->iv_num_instance_rings
+ : l_cpltData->iv_num_common_rings);
+
+ for (i = 0; i < n; i++)
+ {
+ if (!strcmp(l_ringList[j][i].ringName,
+ RING_PROPERTIES[i_ringId].iv_name))
+ {
+ return &(l_ringList[j][i]);
+ }
+ }
+ }
+
+ return NULL;
+}
diff --git a/import/chips/centaur/utils/imageProcs/cen_ringId.mk b/import/chips/centaur/utils/imageProcs/cen_ringId.mk
index 7628b127..5fb7f36b 100644
--- a/import/chips/centaur/utils/imageProcs/cen_ringId.mk
+++ b/import/chips/centaur/utils/imageProcs/cen_ringId.mk
@@ -22,6 +22,6 @@
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
-PROCEDURE = cen_ringId
+PROCEDURE=cen_ringId
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH)/chips/common/utils/imageProcs)
$(call BUILD_PROCEDURE)
OpenPOWER on IntegriCloud