From patchwork Wed Oct 4 05:40:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 821165 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 3y6Prb01Xwz9s82 for ; Wed, 4 Oct 2017 16:40:47 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3y6PrZ5zbDzDqm0 for ; Wed, 4 Oct 2017 16:40:46 +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 3y6PrX4TpvzDqls for ; Wed, 4 Oct 2017 16:40:44 +1100 (AEDT) Received: from vpl1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id AFA343A60054; Wed, 4 Oct 2017 01:38:54 -0400 (EDT) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Wed, 4 Oct 2017 16:40:01 +1100 Message-Id: <20171004054001.42031-4-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171004054001.42031-1-aik@ozlabs.ru> References: <20171004054001.42031-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof v4 3/3] 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 , Aravinda Prasad 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-entry 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 --- board-qemu/slof/rtas.fs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board-qemu/slof/rtas.fs b/board-qemu/slof/rtas.fs index 219bcda..7f3b4c0 100644 --- a/board-qemu/slof/rtas.fs +++ b/board-qemu/slof/rtas.fs @@ -178,8 +178,13 @@ rtas-node set-node : close ; : instantiate-rtas ( adr -- entry ) + s" /rtas" find-node >r + dup encode-int s" slof,rtas-base" r@ set-property + dup rtas-base swap rtas-size move rtas-entry rtas-base - + + + dup encode-int s" slof,rtas-entry" r> set-property ; device-end