From patchwork Thu Aug 10 06:02:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Neuling X-Patchwork-Id: 800084 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xScy03yVSz9sNc for ; Thu, 10 Aug 2017 16:03:20 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xScy03CSyzDqyS for ; Thu, 10 Aug 2017 16:03:20 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xScxf3sFtzDqs9 for ; Thu, 10 Aug 2017 16:03:02 +1000 (AEST) Received: from localhost.localdomain (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 3xScxf1XkLz9sNv; Thu, 10 Aug 2017 16:03:02 +1000 (AEST) Received: by localhost.localdomain (Postfix, from userid 1000) id 2CFDAEED7EB; Thu, 10 Aug 2017 16:03:02 +1000 (AEST) From: Michael Neuling To: stewart@linux.vnet.ibm.com Date: Thu, 10 Aug 2017 16:02:51 +1000 Message-Id: <20170810060253.11928-2-mikey@neuling.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170810060253.11928-1-mikey@neuling.org> References: <20170810060253.11928-1-mikey@neuling.org> Subject: [Skiboot] [PATCH 2/4] hdat: Add POWER9 DD2.0 specific pa_features 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: , Cc: skiboot@lists.ozlabs.org, mikey@neuling.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Same as the default but with TM off. Signed-off-by: Michael Neuling --- hdata/cpu-common.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/hdata/cpu-common.c b/hdata/cpu-common.c index f40d08b398..01228f3d15 100644 --- a/hdata/cpu-common.c +++ b/hdata/cpu-common.c @@ -53,6 +53,17 @@ struct dt_node * add_core_common(struct dt_node *cpus, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 48 .. 55 */ 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, /* 56 .. 63 */ }; + const uint8_t pa_features_p9n_dd20[] = { + 64, 0, + 0xf6, 0x3f, 0xc7, 0xc0, 0x80, 0xd0, 0x80, 0x00, /* 0 .. 7 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8 .. 15 */ + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, /* 16 .. 23 */ + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, /* 24 .. 31 */ + 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, /* 32 .. 39 */ + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 40 .. 47 */ + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 48 .. 55 */ + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 56 .. 63 */ + }; const uint8_t pa_features_p9[] = { 64, 0, 0xf6, 0x3f, 0xc7, 0xc0, 0x80, 0xd0, 0x80, 0x00, /* 0 .. 7 */ @@ -99,9 +110,17 @@ struct dt_node * add_core_common(struct dt_node *cpus, break; case PVR_TYPE_P9: name = "PowerPC,POWER9"; - if ((PVR_VERS_MAJ(version) == 1) && is_power9n(version)) { + if (is_power9n(version) && + (PVR_VERS_MAJ(version) == 1)) { + /* P9N DD1 */ pa_features = pa_features_p9n_dd1; pa_features_size = sizeof(pa_features_p9n_dd1); + } else if (is_power9n(version) && + (PVR_VERS_MAJ(version) == 2) && + (PVR_VERS_MIN(version) == 0)) { + /* P9N DD2.0 */ + pa_features = pa_features_p9n_dd20; + pa_features_size = sizeof(pa_features_p9n_dd20); } else { pa_features = pa_features_p9; pa_features_size = sizeof(pa_features_p9);