From patchwork Mon Feb 5 04:00:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Currey X-Patchwork-Id: 869146 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 3zZYwG28jHz9sRm for ; Mon, 5 Feb 2018 15:07:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="goCe8g+S"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zZYwF3dzNzF0rh for ; Mon, 5 Feb 2018 15:07:57 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="goCe8g+S"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=russell.cc (client-ip=66.111.4.29; helo=out5-smtp.messagingengine.com; envelope-from=ruscur@russell.cc; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="goCe8g+S"; dkim-atps=neutral X-Greylist: delayed 439 seconds by postgrey-1.36 at bilbo; Mon, 05 Feb 2018 15:07:49 AEDT Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zZYw55vkRzF0rX for ; Mon, 5 Feb 2018 15:07:49 +1100 (AEDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4722F20B93; Sun, 4 Feb 2018 23:00:27 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Sun, 04 Feb 2018 23:00:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=GlgPOpwZ64MnankaAbQJCd2uBP6O3Gg+H3/QWOBl5Es=; b=goCe8g+S yKK1KleLET91j6pf9EwOE1S3L/Wjn9sLG7rXj8mqdPx/GSeZdcxSrp898RDFug+5 tR/5asWXVCdwug7HGZYgW99mlttrQMrhd3KF4GvMzRZgarhcHJuHHVAWe6Xvb9KD xf3tvYugVREpcgMX5WkMvyt5g63DF0iYI+eIOfTuY99MnpVYNA/JbjXwhkO2LBOE 4K1q4G6491I3XkYIuVrBXLlRqsfxaqQ6l/KR3vcotAMg+LZ8C66nhchDOHpOSN0k I2S7M3c5XM2DCJ6TGupQTynzYbQvdsQDsWBMdzfyPmgWo7eRFt4igf35anJv/HOo cnGw7QcxIle76A== X-ME-Sender: Received: from snap.au.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id E3A3324108; Sun, 4 Feb 2018 23:00:25 -0500 (EST) From: Russell Currey To: skiboot@lists.ozlabs.org Date: Mon, 5 Feb 2018 15:00:08 +1100 Message-Id: <20180205040008.28362-2-ruscur@russell.cc> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180205040008.28362-1-ruscur@russell.cc> References: <20180205040008.28362-1-ruscur@russell.cc> Subject: [Skiboot] [PATCH 2/2] phb3/phb4/p7ioc: Document supported TCE sizes in DT X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.25 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 a new property, "ibm,supported-tce-sizes", to advertise to Linux how big the available TCE sizes are. Each value is a bit shift, from smallest to largest. Signed-off-by: Russell Currey --- hw/p7ioc-phb.c | 5 +++++ hw/phb3.c | 5 +++++ hw/phb4.c | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c index 6c074518..b0a26e84 100644 --- a/hw/p7ioc-phb.c +++ b/hw/p7ioc-phb.c @@ -2596,6 +2596,11 @@ static void p7ioc_pcie_add_node(struct p7ioc_phb *p) tkill = reg[0] + PHB_TCE_KILL; dt_add_property_cells(np, "ibm,opal-tce-kill", hi32(tkill), lo32(tkill)); + dt_add_property_cells(np, "ibm,supported-tce-sizes", + 12, // 4K + 16, // 64K + 24, // 16M + 34); // 16G /* * Linux may use this property to allocate the diag data buffer, which diff --git a/hw/phb3.c b/hw/phb3.c index 0b4c3c32..0c4e1eb3 100644 --- a/hw/phb3.c +++ b/hw/phb3.c @@ -4469,6 +4469,11 @@ static void phb3_add_properties(struct phb3 *p) tkill = reg + PHB_TCE_KILL; dt_add_property_cells(np, "ibm,opal-tce-kill", hi32(tkill), lo32(tkill)); + dt_add_property_cells(np, "ibm,supported-tce-sizes", + 12, // 4K + 16, // 64K + 24, // 16M + 28); // 256M /* * Indicate to Linux that the architected IODA2 MSI EOI method diff --git a/hw/phb4.c b/hw/phb4.c index 0a7e3065..946f9ab6 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -4688,6 +4688,11 @@ static void phb4_add_properties(struct phb4 *p) /* M64 ranges start at 1 as MBT0 is used for M32 */ dt_add_property_cells(np, "ibm,opal-available-m64-ranges", 1, p->mbt_size - 1); + dt_add_property_cells(np, "ibm,supported-tce-sizes", + 12, // 4K + 16, // 64K + 21, // 2M + 30); // 1G /* Tell Linux about alignment limits for segment splits. *