From patchwork Tue Feb 28 05:15:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ananth N Mavinakayanahalli X-Patchwork-Id: 733284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vXRcK6LFgz9s9x for ; Tue, 28 Feb 2017 16:15:45 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vXRcK5PzQzDqLR for ; Tue, 28 Feb 2017 16:15:45 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vXRc46HGczDqJL for ; Tue, 28 Feb 2017 16:15:32 +1100 (AEDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1S5BEbn130632 for ; Tue, 28 Feb 2017 00:15:31 -0500 Received: from e28smtp04.in.ibm.com (e28smtp04.in.ibm.com [125.16.236.4]) by mx0a-001b2d01.pphosted.com with ESMTP id 28vm1wffn7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Feb 2017 00:15:30 -0500 Received: from localhost by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 28 Feb 2017 10:45:27 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp04.in.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 28 Feb 2017 10:45:25 +0530 Received: from d28relay10.in.ibm.com (d28relay10.in.ibm.com [9.184.220.161]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 5A4F2E005B for ; Tue, 28 Feb 2017 10:47:08 +0530 (IST) Received: from d28av07.in.ibm.com (d28av07.in.ibm.com [9.184.220.146]) by d28relay10.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1S5EICs17694818 for ; Tue, 28 Feb 2017 10:44:18 +0530 Received: from d28av07.in.ibm.com (localhost [127.0.0.1]) by d28av07.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v1S5FO5i027479 for ; Tue, 28 Feb 2017 10:45:24 +0530 Received: from thinktux.in.ibm.com (thinktux.in.ibm.com [9.124.35.66]) by d28av07.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v1S5FNmG027476 for ; Tue, 28 Feb 2017 10:45:23 +0530 From: Ananth N Mavinakayanahalli To: skiboot@lists.ozlabs.org Date: Tue, 28 Feb 2017 10:45:23 +0530 In-Reply-To: <148825885204.16559.4259406167378461185.stgit@thinktux.in.ibm.com> References: <148825885204.16559.4259406167378461185.stgit@thinktux.in.ibm.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022805-0012-0000-0000-000003BFEC28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022805-0013-0000-0000-00001B4303D6 Message-Id: <148825892386.16559.124706196398953223.stgit@thinktux.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-28_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702280047 Subject: [Skiboot] [RFC PATCH 4/4] hdata: Add additional SP information X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" ... obtained from HDAT. Signed-off-by: Ananth N Mavinakayanahalli --- hdata/fsp.c | 8 ++++++-- hdata/spira.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hdata/fsp.c b/hdata/fsp.c index 998724b..4823aff 100644 --- a/hdata/fsp.c +++ b/hdata/fsp.c @@ -39,12 +39,12 @@ static enum sp_type find_service_proc_type(const struct HDIF_common_hdr *spss, int index) { const struct spss_sp_impl *sp_impl; - int hw_ver, sw_ver, flags; + unsigned int hw_ver, sw_ver, flags, size; enum sp_type sp_type; bool functional, installed; /* Find an check the SP Implementation structure */ - sp_impl = HDIF_get_idata(spss, SPSS_IDATA_SP_IMPL, NULL); + sp_impl = HDIF_get_idata(spss, SPSS_IDATA_SP_IMPL, &size); if (!CHECK_SPPTR(sp_impl)) { prerror("SP #%d: SPSS/SP_Implementation not found !\n", index); return SP_BAD; @@ -85,6 +85,10 @@ static enum sp_type find_service_proc_type(const struct HDIF_common_hdr *spss, sp_impl->chip_version >> 4, sp_impl->chip_version & 0xf); + /* Check if SPINFO has additional SP information and print */ + if (size > 8) + prlog(PR_INFO, "SP Family is %s\n", sp_impl->sp_family); + return sp_type; } diff --git a/hdata/spira.h b/hdata/spira.h index 01ce4cb..a9338ee 100644 --- a/hdata/spira.h +++ b/hdata/spira.h @@ -262,6 +262,7 @@ struct spss_sp_impl { #define SPSS_SP_IMPL_FLAGS_PRIMARY 0x2000 u8 chip_version; u8 reserved; + u8 sp_family[64]; }; /* Idata index 3 is deprecated */