From patchwork Tue Oct 24 01:31:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 829752 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 3yLbNb5gryz9s3w for ; Tue, 24 Oct 2017 12:32:15 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yLbNb4rMrzDql4 for ; Tue, 24 Oct 2017 12:32:15 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=ozlabs.ru (client-ip=107.173.13.209; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Received: from ozlabs.ru (ozlabs.ru [107.173.13.209]) by lists.ozlabs.org (Postfix) with ESMTP id 3yLbNS3Sd7zDqln for ; Tue, 24 Oct 2017 12:32:08 +1100 (AEDT) Received: from vpl1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 3E7523A60054; Mon, 23 Oct 2017 21:30:58 -0400 (EDT) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 24 Oct 2017 12:31:52 +1100 Message-Id: <20171024013153.28200-6-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171024013153.28200-1-aik@ozlabs.ru> References: <20171024013153.28200-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof v6 5/6] rtas: Store RTAS address and entry in the device tree X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kurz MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" At the moment we count on the guest kernel to update or create device tree properties pointing to the instantiated RTAS copy which is not very reliable. This stores rtas-base and rtas-size in the DT at the instantiation point so later on the H_UPDATE_DT hcall can supply QEMU with an updated location of RTAS. This superseeds f9a60de30 "Add private HCALL to inform updated RTAS base and entry". Signed-off-by: Alexey Kardashevskiy --- Changes: v5: * ditched rtas-entry, added rtas-size (which is always 20 bytes though) --- board-qemu/slof/rtas.fs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/board-qemu/slof/rtas.fs b/board-qemu/slof/rtas.fs index f1a4abe..092f5b1 100644 --- a/board-qemu/slof/rtas.fs +++ b/board-qemu/slof/rtas.fs @@ -176,7 +176,14 @@ rtas-node set-node : open true ; : close ; +: store-rtas-loc ( adr ) + s" /rtas" find-node >r + encode-int s" slof,rtas-base" r@ set-property + rtas-size encode-int s" slof,rtas-size" r> set-property +; + : instantiate-rtas ( adr -- entry ) + dup store-rtas-loc dup rtas-base swap rtas-size move rtas-entry rtas-base - + ;