From 114a75e27e8fd2aa81f2829885411ec00ebc5d18 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Fri, 28 Apr 2017 15:20:00 -0500 Subject: Fix PVR check for Nimbus DD1 Added check for bit 18 to distinguish between Nimbus DD1.0 and Cumulus DD1.0 Consolidated Nimbus DD1 checking to a common function Added printk output that shows which CPU we're running on Modified some existing printk output to use fewer characters Change-Id: I1c42df0051fc2d9cc5fa54d95f68c3bd26b86462 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39876 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Tested-by: Jenkins OP Build CI Reviewed-by: Corey V. Swenson Reviewed-by: Martin Gloff Reviewed-by: Christian R. Geddes Reviewed-by: Daniel M. Crowell --- src/include/arch/pvrformat.H | 12 ++++++++++-- src/include/sys/misc.h | 6 ++++++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/arch/pvrformat.H b/src/include/arch/pvrformat.H index 0e1c462b8..2559ce997 100644 --- a/src/include/arch/pvrformat.H +++ b/src/include/arch/pvrformat.H @@ -113,8 +113,8 @@ struct PVR_t */ enum { - CHIP_DD_MASK = 0x00FF0F0F, - IS_NIMBUS_DD1 = 0x004E0100, + NIMBUS_DD1_MASK = 0x00FF2F0F, + IS_NIMBUS_DD1 = 0x004E0100, // Field: chipType NIMBUS_CHIP = 0, @@ -132,6 +132,14 @@ struct PVR_t P8_VENICE = 0x4D, P9_ALL = 0x4E, }; + + /** + * @brief Return Major.Minor DD level + * @return 8-bit DD level + */ + inline bool isNimbusDD1() { + return ((word & NIMBUS_DD1_MASK) == IS_NIMBUS_DD1); + } }; #endif //_PVRFORMAT_H diff --git a/src/include/sys/misc.h b/src/include/sys/misc.h index cfe62c7d3..cf8b6a93b 100644 --- a/src/include/sys/misc.h +++ b/src/include/sys/misc.h @@ -138,6 +138,12 @@ enum ProcessorCoreType CORE_UNKNOWN, }; +/** + * Strings for ProcessorCoreType + * declared in misc.C + */ +extern const char* ProcessorCoreTypeStrings[CORE_UNKNOWN+1]; + /** @fn cpu_core_type() * @brief Determine the procesore core type. * -- cgit v1.2.3