From patchwork Fri Oct 1 10:46:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1535282 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ENYOJGzH; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HLRd832Zxz9t0G for ; Fri, 1 Oct 2021 20:47:08 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HLRd72X4vz2ypZ for ; Fri, 1 Oct 2021 20:47:07 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ENYOJGzH; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::102e; helo=mail-pj1-x102e.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ENYOJGzH; dkim-atps=neutral Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HLRd42Kx7z2yNC for ; Fri, 1 Oct 2021 20:47:02 +1000 (AEST) Received: by mail-pj1-x102e.google.com with SMTP id r7so6218585pjo.3 for ; Fri, 01 Oct 2021 03:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nvWAmT+zeVv1RxU+dL+aYOVYOBKq1fHTcSoMjEcL3M4=; b=ENYOJGzHIvltodrLhsc1dtdid4T+exyuuk16R+d/L4CBKDaQ8nP/WmLpElBIvkHXIk ElR2g8osAyRJmtOGCd6fLbs0x7CY5W4PcDEXwvpTMULUcgA968EKD9Xg0XM0UgJpR46f nUay+IsRw71WiiOkjKbOnsmoc9puEy/T0HVqCH3CtM9lCpSA0dcnURkA9jZZDK3FVMV0 J24BjG6AANjhMY/YahhLnxehrhwTy1/4aKVwGQuj+OLR52Sb9vA6qG9cAEQ2QH73Ou3+ D7gHcU+rAygFShTLyDNT9p+I6zBJEC3AhE/JvWryWPxMIN1A6SUpfxUPgVC66SNw5cqi mzBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nvWAmT+zeVv1RxU+dL+aYOVYOBKq1fHTcSoMjEcL3M4=; b=M3VbHgRmDErKwStFKdnsKRg280YbH+lIaNJM7pTo/cdV8eQU4GWHqVgXXhoNSwLYmY FZX5W/i8EQaSwd4DcjEIM0cOVi6BqlqCRjiTdyNHvCnQzIsnQ2m3x9YCaOcBFQ8CKARj XYkyG/FwY2mXuUGvhof0uKJqH+1mWpGSxbWCkyBpv4AjgWVIwVdFChN3YO4+Ac4wZHLl DemjO5kT+rAtrF4OlHvUsBof0su93zRd1gbBSOBfMqqFzP3s6hfXyB4vSYApq19BrLOi WE5Vx4NjzBDY2pLDygZlrRg/o9tBRbAe2pskWiI9M/My59sRamFaOFN1k/JeDsCREsd+ eUrg== X-Gm-Message-State: AOAM530/2Hf4akcyChPkXLMfi5hhGW4KS2IS4PvxQrhZsaELDHNebsXp fuidIxQSwBKphUKWV1y3dFiuHejvGQo= X-Google-Smtp-Source: ABdhPJzkgK29H+4cQOrt4cBBLLJw4qSraPV6O11s5KUECIUVrlRA5xTbzJkuuJETh8bXBMqXEuK+ng== X-Received: by 2002:a17:90b:3803:: with SMTP id mq3mr8537789pjb.213.1633085218669; Fri, 01 Oct 2021 03:46:58 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (115-64-153-41.tpgi.com.au. [115.64.153.41]) by smtp.gmail.com with ESMTPSA id e20sm7767532pjt.14.2021.10.01.03.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 03:46:58 -0700 (PDT) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Fri, 1 Oct 2021 20:46:47 +1000 Message-Id: <20211001104648.920820-1-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Skiboot] [PATCH v2 1/2] external/mambo: Updates for POWER10 configuration for DD2.0 X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 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" Update PVR and mambo f000f bits: - Set POWER10 to DD2.0 Update SIM_CTRL and SIM_CTRL1 bits: - Set the LPAR-per-core mode bit. This is required for SMT KVM to work. - Set ARC0/ARC1 bits which enable atomic RC update interrupts (not hardware updates), which matches implementation. - Enable DEXCR, HAIL, ROP, BHRB disable, block BHRB writes in PR=0, and RFC02628 on POWER10. Signed-off-by: Nicholas Piggin --- Since v1 "external/mambo: Updates for POWER9 and POWER10 configuration" this was split into 2 patches (POWER9 and POWER10), with some bits fixed up and a workaround for SIM_CTRL added. I couldn't get POWER9 lpar-per-thread small core mode to quite work, but at least disabling hardware atomic RC updates can be done. Thanks, Nick external/mambo/skiboot.tcl | 18 +++++++++++++++--- hw/xscom.c | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl index 91617b75c..8038d2a91 100644 --- a/external/mambo/skiboot.tcl +++ b/external/mambo/skiboot.tcl @@ -144,9 +144,11 @@ if { $default_config == "P9" } { } if { $default_config == "P10" } { - # PVR configured for POWER10 DD1.0 - myconf config processor/initial/PVR 0x800100 - myconf config processor/initial/SIM_CTRL1 0xc228100400000000 + # PVR configured for POWER10 DD2.0, big-core, LPAR-per-thread + # Small-core has bit 0x1000 set. + myconf config processor/initial/PVR 0x800200 + myconf config processor/initial/SIM_CTRL 0x0c1dd60000000000 + myconf config processor/initial/SIM_CTRL1 0xc0400c0400040a40 if { $mconf(numa) } { myconf config memory_region_id_shift 44 @@ -164,6 +166,16 @@ if { [info exists env(SKIBOOT_SIMCONF)] } { define machine myconf mysim +# Some mambo does not expose SIM_CTRL as a config option. Also set the SPRs +# after machine is defined. +if { $default_config == "P10" } { + for { set c 0 } { $c < $mconf(cpus) } { incr c } { + for { set t 0 } { $t < $mconf(threads) } { incr t } { + mysim mcm 0 cpu $c thread $t set spr ctrl 0x0c1dd60000000000 + } + } +} + # # Include various utilities # diff --git a/hw/xscom.c b/hw/xscom.c index 347457242..298fe0c90 100644 --- a/hw/xscom.c +++ b/hw/xscom.c @@ -826,7 +826,7 @@ int64_t xscom_read_cfam_chipid(uint32_t partid, uint32_t *chip_id) */ if (chip_quirk(QUIRK_NO_F000F)) { if (proc_gen == proc_gen_p10) - val = 0x120DA04980000000UL; /* P10 DD1.0 */ + val = 0x220DA04980000000UL; /* P10 DD2.0 */ else if (proc_gen == proc_gen_p9) val = 0x203D104980000000UL; /* P9 Nimbus DD2.3 */ else From patchwork Fri Oct 1 10:46:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1535283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=PzUscj+0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HLRdG6MsQz9t0G for ; Fri, 1 Oct 2021 20:47:14 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HLRdF6Tvwz306R for ; Fri, 1 Oct 2021 20:47:13 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=PzUscj+0; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::102b; helo=mail-pj1-x102b.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=PzUscj+0; dkim-atps=neutral Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HLRd42Pv7z2yNW for ; Fri, 1 Oct 2021 20:47:02 +1000 (AEST) Received: by mail-pj1-x102b.google.com with SMTP id v19so6241630pjh.2 for ; Fri, 01 Oct 2021 03:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3G6KHDhXwwPTDbIHJvRsgyVnMLf3jGW8b/dar0R/slM=; b=PzUscj+0T4vkQoZeIkFvVQHU6VywPUZl+TOfwh/TAVcI7sT78xhfNsbIx+KCvCWYtU kjKsJoxMzrrG3jCtEuy+PbER63Yn0SV3vZw5kUrQedP9Dxy1ASEG5UyNRJAdx3BP0B/O f+ekPp541vzODSKGb7Sf5w35Blpipm/7OZuAWEKam+b4ccuBWqIcWc5fkXrGFfyH7IHV 1Yq4eIeSO1MS2suF5IsgOI0DK7l+j+2ELk2tlsUpEtTQ2KdHXoY3qHHdVO2PLDHDI41s PYExYPk4o2IfuSceucmLjZAcyp9Nyug2ctnrw4yU7i7BjK+KMZ9ZlF15UQjaAtuqC3Q3 w67w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3G6KHDhXwwPTDbIHJvRsgyVnMLf3jGW8b/dar0R/slM=; b=DI23NHnpcTTPgxaj2xPTZL97CBosyku7HSMjhGizzRUG47JWmPtSpYHn+WnABr17Rc ECH96gGQGp4V76OnIyEa5SFRnRmAWIAYrkP7qh+G2FM4HzEJnoFB3aTwZ8RaTw0VUecn TaNtfkHVbZFjETod380QECg0F4RY0uq9/U6DSS2XBj3JHo3nxhOI2hdHTSLfR003jMPt oi2l4YLxWsoXGrVbrMAuDeRzp3pHemCsGsjBeR5+PvT6GtWM2qmXBlhFQQ68UIfz9TAF EO+oH6Y5JHWQ2NhfHwE+YhUjlTaLyI9xDdMn6DYwGVZewc4lKF0sbVxcmnLrRupfsIwj nZGQ== X-Gm-Message-State: AOAM532InYB5RKg5wSYL/KTGh1w2Hgo3Z2T090VFT/tsbco8JKAcNc/x bqOjHq4z0BXbXto6t536rDPKo1F59Ks= X-Google-Smtp-Source: ABdhPJwdl99xXNqz90rZIbgbcs9L0DLp4tSQ5YUcGHvMzy/QljCZRBwg7PkdHtKQ2lcHTJaP5ZufhA== X-Received: by 2002:a17:90a:9292:: with SMTP id n18mr18921021pjo.120.1633085220521; Fri, 01 Oct 2021 03:47:00 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (115-64-153-41.tpgi.com.au. [115.64.153.41]) by smtp.gmail.com with ESMTPSA id e20sm7767532pjt.14.2021.10.01.03.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 03:47:00 -0700 (PDT) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Fri, 1 Oct 2021 20:46:48 +1000 Message-Id: <20211001104648.920820-2-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20211001104648.920820-1-npiggin@gmail.com> References: <20211001104648.920820-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [PATCH v2 2/2] external/mambo: Updates POWER9 SIM_CTRL1 to remove hardware atomic RC X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 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" Update SIM_CTRL1 bits to set ARC0/1, which disables atomic RC updates in hardware which matches implementation. Comment some remaining quirks with the P9 configuration. Signed-off-by: Nicholas Piggin --- external/mambo/skiboot.tcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl index 8038d2a91..68bedbcfc 100644 --- a/external/mambo/skiboot.tcl +++ b/external/mambo/skiboot.tcl @@ -135,8 +135,11 @@ if { $default_config == "PEGASUS" } { if { $default_config == "P9" } { # PVR configured for POWER9 DD2.3 Scale out 24 Core (ie SMT4) + # This still is not configured with LPAR-per-thread, which will make + # multi-thread KVM not work properly. And possibly even small-core is + # not set correctly either. myconf config processor/initial/PVR 0x4e1203 - myconf config processor/initial/SIM_CTRL1 0x4228301710000000 + myconf config processor/initial/SIM_CTRL1 0x42283c1710000000 if { $mconf(numa) } { myconf config memory_region_id_shift 45