From patchwork Sat Oct 29 14:36:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 688796 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t5jrl25pyz9t1F for ; Sun, 30 Oct 2016 01:37:27 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3t5jrl1JNZzDvT1 for ; Sun, 30 Oct 2016 01:37:27 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 3t5jr92W65zDvTR for ; Sun, 30 Oct 2016 01:36:57 +1100 (AEDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9TEXpXm070111 for ; Sat, 29 Oct 2016 10:36:54 -0400 Received: from e23smtp05.au.ibm.com (e23smtp05.au.ibm.com [202.81.31.147]) by mx0a-001b2d01.pphosted.com with ESMTP id 26cueyvfj1-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Sat, 29 Oct 2016 10:36:54 -0400 Received: from localhost by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 30 Oct 2016 00:36:51 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp05.au.ibm.com (202.81.31.211) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 30 Oct 2016 00:36:49 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 9369C2BB0045 for ; Sun, 30 Oct 2016 01:36:48 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9TEam7t19529796 for ; Sun, 30 Oct 2016 01:36:48 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9TEamiZ010062 for ; Sun, 30 Oct 2016 01:36:48 +1100 Received: from hegdevasant.ibm.com ([9.126.238.44]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u9TEaehS009981; Sun, 30 Oct 2016 01:36:46 +1100 From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Sat, 29 Oct 2016 20:06:26 +0530 X-Mailer: git-send-email 2.5.5 In-Reply-To: <1477751795-20128-1-git-send-email-hegdevasant@linux.vnet.ibm.com> References: <1477751795-20128-1-git-send-email-hegdevasant@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102914-0016-0000-0000-000001E4BB46 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102914-0017-0000-0000-000005BB034D Message-Id: <1477751795-20128-4-git-send-email-hegdevasant@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-10-29_06:, , 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-1609300000 definitions=main-1610290264 Subject: [Skiboot] [PATCH v2 03/12] hdat: Add new fields to IPL params structure 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: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Add new fields to sys params structure and update sys family for p9. In P9 the compatible string is supplied by hostboot through the HDAT. This patch add support for using these strings to set the compatible property in the device tree rather than using the machine ID number scheme traditionally used in the HDAT. Signed-off-by: Oliver O'Halloran [Folded Oliver's changes to original patch - Vasant] Signed-off-by: Vasant Hegde --- hdata/spira.c | 63 +++++++++++++++++++++++++++++++++++++---------------------- hdata/spira.h | 17 +++++++++++++++- 2 files changed, 56 insertions(+), 24 deletions(-) diff --git a/hdata/spira.c b/hdata/spira.c index 59ffc1d..fa08824 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -752,8 +752,6 @@ static void add_nx(void) static void add_iplparams_sys_params(const void *iplp, struct dt_node *node) { const struct iplparams_sysparams *p; - u32 sys_type; - const char *sys_family; const struct HDIF_common_hdr *hdif = iplp; u16 version = be16_to_cpu(hdif->version); @@ -772,29 +770,48 @@ static void add_iplparams_sys_params(const void *iplp, struct dt_node *node) dt_add_property_nstr(node, "ibm,sys-model", p->sys_model, 4); - /* Compatible is 2 entries: ibm,powernv and ibm, + /* + * Compatible has up to three entries: + * "ibm,powernv", the system family and system type. + * + * On P9 and above the family and type strings come from the HDAT + * directly. On P8 we find it from the system ID numbers. */ - sys_type = be32_to_cpu(p->system_type); - switch(sys_type >> 28) { - case 0: - sys_family = "ibm,squadrons"; - break; - case 1: - sys_family = "ibm,eclipz"; - break; - case 2: - sys_family = "ibm,apollo"; - break; - case 3: - sys_family = "ibm,firenze"; - break; - default: - sys_family = NULL; - prerror("IPLPARAMS: Unknown system family\n"); - break; + if (proc_gen >= proc_gen_p9) { + /* + * FIXME: We haven't defined P9 system model. Hence append + * "ibm,firenze" so that we can boot the system. Remove + * this once we define P9 system model. + */ + dt_add_property_strings(dt_root, "compatible", + "ibm,powernv", "ibm,firenze", + p->sys_family_str, p->sys_type_str); + } else { + u32 sys_type = be32_to_cpu(p->system_type); + const char *sys_family; + + switch(sys_type >> 28) { + case 0: + sys_family = "ibm,squadrons"; + break; + case 1: + sys_family = "ibm,eclipz"; + break; + case 2: + sys_family = "ibm,apollo"; + break; + case 3: + sys_family = "ibm,firenze"; + break; + default: + sys_family = NULL; + prerror("IPLPARAMS: Unknown system family\n"); + break; + } + + dt_add_property_strings(dt_root, "compatible", "ibm,powernv", + sys_family); } - dt_add_property_strings(dt_root, "compatible", "ibm,powernv", - sys_family); /* Grab nest frequency when available */ if (version >= 0x005b) { diff --git a/hdata/spira.h b/hdata/spira.h index b4facb5..dee9902 100644 --- a/hdata/spira.h +++ b/hdata/spira.h @@ -325,6 +325,17 @@ struct iplparams_sysparams { uint8_t hw_page_table_size; /* >= 0x59 */ __be16 hv_disp_wheel; /* >= 0x58 */ __be32 nest_freq_mhz; /* >= 0x5b */ + uint8_t split_core_mode; /* >= 0x5c */ + uint8_t reserved[3]; + uint8_t sys_vendor[64]; /* >= 0x5f */ + /* >= 0x60 */ + __be16 sys_sec_setting; + __be16 tpm_config_bit; + __be16 tpm_drawer; + __be16 reserved2; + uint8_t hw_key_hash[64]; + uint8_t sys_family_str[64]; /* vendor,name */ + uint8_t sys_type_str[64]; /* vendor,type */ } __packed; /* Idata index 1: IPL parameters */ @@ -353,7 +364,11 @@ struct iplparams_iplparams { uint8_t huge_page_size; #define IPLPARAMS_HUGE_PG_SIZE_16G 0 uint8_t num_vlan_switches; - __be64 reserved2; + __be32 reserved2; + __be32 enlarge_io; /* >= 0x5a */ + uint8_t core_config; +#define IPLPARAMS_CORE_NORMAL 0x01 +#define IPLPARAMS_CORE_FUSE 0x01 }; /* Idata index 4: Platform Dump Descriptor */