From patchwork Fri Oct 5 08:07:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 10627519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C9A715E8 for ; Fri, 5 Oct 2018 08:09:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33D7329251 for ; Fri, 5 Oct 2018 08:09:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 275A329253; Fri, 5 Oct 2018 08:09:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C641229251 for ; Fri, 5 Oct 2018 08:09:16 +0000 (UTC) Received: from localhost ([::1]:33720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8LAh-0004N9-H0 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 05 Oct 2018 04:09:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8L9Z-0003c4-Rq for qemu-devel@nongnu.org; Fri, 05 Oct 2018 04:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8L9W-0005v1-NZ for qemu-devel@nongnu.org; Fri, 05 Oct 2018 04:08:05 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:55864) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8L9W-0005uN-2S for qemu-devel@nongnu.org; Fri, 05 Oct 2018 04:08:02 -0400 Received: by mail-wm1-x342.google.com with SMTP id 206-v6so959794wmb.5 for ; Fri, 05 Oct 2018 01:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=f9H1MqcL2M/+UMnNnIPQZjNEMDpYSQtL7Dw8PkSKPAQ=; b=Y32Ns4D9dznayfRuOnetMp0O0ao1UDq6EpEI/xUKpJscAKFmM96GKbvT/L5JojODJ9 lBLjsR0ObPG+Idc3BTODZrcPKpN7n2bMd7myByurd55+RmF6SZp2vnomFjQktu9/9HvX AT5FdrPvo9Bl96xPYdaF2ZN8Eope40/SENSrw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=f9H1MqcL2M/+UMnNnIPQZjNEMDpYSQtL7Dw8PkSKPAQ=; b=tupVK2Ke/8h+GnYXIN1RbRQrmVVzUV+gK6g0z+EkGr8GoRN2u0SjAbg0ic02FnEeOA xQ9ya2NEKBLJbWFJNPcXSwSHe7nAZmLtreLyjJUmhclPaMxiv0Unoem82WkNXgL87+IE aU6dp4lrncZ7qCgPW0wXVT77mUyKd9brEqEd+CGE+qJnDPxjnBAuMHJGRp52uVNB1YVR /eMfuCtfaKz53cfqfWFWOPBuLosLw1GkHFQXgP/T2rVFO4lEM2qwul+t8vnwWP+VVoA8 Hn2OMMSN/XE9Rkp8O/SvD4znmQJdA8myoPwHILxk9NaG707JpkRoGKMwguwmm7o7xli4 SgJw== X-Gm-Message-State: ABuFfohmLtl2uH7lwQJ4oBJoQuzZWwtgjPgqUlWdDfyTiaU64dn+4/IN pcy2lDGmvVFC+KXaW1uXRREdFg== X-Google-Smtp-Source: ACcGV60iHjRpFm+uZyErhbqc5YxTIJZryZr/tKqeK3Y+U+A5kwPh1/cdEtGEPhvL3yzthNCeUuDeJg== X-Received: by 2002:a1c:1d6:: with SMTP id 205-v6mr7268692wmb.0.1538726880717; Fri, 05 Oct 2018 01:08:00 -0700 (PDT) Received: from localhost.localdomain (static-qvn-qvu-167076.business.bouyguestelecom.com. [89.81.167.76]) by smtp.gmail.com with ESMTPSA id g76-v6sm1320836wmd.25.2018.10.05.01.07.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 01:07:59 -0700 (PDT) From: Jerome Forissier To: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 5 Oct 2018 10:07:29 +0200 Message-Id: <20181005080729.6480-1-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.15.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH] hw/arm/virt: add DT property /secure-chosen/sdtout-path being secure UART X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tee-dev@lists.linaro.org, Etienne Carriere , Jerome Forissier Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Bindings for /secure-chosen and /secure-chosen/stdout-path have been proposed 1.5 years ago [1] and implemented in OP-TEE at the same time [2]. This patch creates the property when the machine is secure. [1] https://patchwork.kernel.org/patch/9602401/ [2] https://github.com/OP-TEE/optee_os/commit/4dc31c52544a Signed-off-by: Jerome Forissier --- hw/arm/virt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 0b57f87abc..a0faa40d64 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -712,6 +712,10 @@ static void create_uart(const VirtMachineState *vms, qemu_irq *pic, int uart, /* Mark as not usable by the normal world */ qemu_fdt_setprop_string(vms->fdt, nodename, "status", "disabled"); qemu_fdt_setprop_string(vms->fdt, nodename, "secure-status", "okay"); + + qemu_fdt_add_subnode(vms->fdt, "/secure-chosen"); + qemu_fdt_setprop_string(vms->fdt, "/secure-chosen", "stdout-path", + nodename); } g_free(nodename);