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: 979345 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Y32Ns4D9"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42RMpQ6vw7z9s3T for ; Fri, 5 Oct 2018 18:08:45 +1000 (AEST) Received: from localhost ([::1]:33718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8LA9-0003d3-Tc for incoming@patchwork.ozlabs.org; Fri, 05 Oct 2018 04:08:41 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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);