From patchwork Fri Nov 24 14:47:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 10074185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 751296037F for ; Fri, 24 Nov 2017 15:15:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 665F02A221 for ; Fri, 24 Nov 2017 15:15:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A4E92A22F; Fri, 24 Nov 2017 15:15:51 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA8512A221 for ; Fri, 24 Nov 2017 15:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=YemhimQADlEtjE902DQfhf+NE8V4U5Uf0a247yUq92Q=; b=Z6Ihkn79EUHKhkhhURSeSx9Gyy FVVhaLvw3a5GElbSRiSPAKZrlDDOfQyGPDOU5u0Kn6nC1vmYY977IaYbC2h6LY58brYhg2HJj3wIQ nzROI4akpULKUR/2rumN1kmh/kB8b1Ukaed/GdzeCM+A5cvBy3x2ThuPsL3KtIIVHxqX/3cL9XZVz 1kOFivQtJlxhMuyWcRlswTNQC2ZZY7QOl9zzIAJPafz6awAVh5OoSHhItvQYjvGveTatsO1qNaXk5 KIk/WYCdM8CXYmcnWxJUE3Ij5yBjeyiHGeoQLGvSsrH21qp57NTVluQcrR+pb50MtwZfO28dF99ZI IRtP/nDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eIFhj-0006WF-8v; Fri, 24 Nov 2017 15:15:47 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eIFHt-0008Cf-29 for linux-arm-kernel@lists.infradead.org; Fri, 24 Nov 2017 14:49:10 +0000 Received: by mail-wm0-x242.google.com with SMTP id b189so22888658wmd.0 for ; Fri, 24 Nov 2017 06:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=WvR5ro0sdyV0+iIZNDlfJ+l02P52I+Ctk07QlLu4GYc=; b=jiJbQlX/Ge9X8jggTvtwaHmSvQ9tshS5svD1/esN73fgL8DFy9A+usFcNXBP8rg+kK RHK2WSvFsCmiig4Hk/d/D/TCnC1kGGTfu0GEp6CbfYNgBnxppEtPICiVvQGmmOP/6w5M H94ngdizUFlhAsQTuF0Xg6FRBN5siPg9Mi/nE= 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:in-reply-to :references:in-reply-to:references; bh=WvR5ro0sdyV0+iIZNDlfJ+l02P52I+Ctk07QlLu4GYc=; b=my3fKwi1Hahul1U29VWxd26qgVAlK7SMcuohMDFZErjrDZ8zEzmwACb+JgRd4y0N0Y 647eGGgHFuwJK+6NwNg9j4kabgeE6CPWnU36Q16vi2SWOuOCvpkRTkrqhrcL9nQJc68+ bQIgRdD1LPqudUiuHGqnBqWpoZXeOSdwSzC5EjSWvX2Y8TtsK11TtvcXZ349p1gCO98c y/PQXoyTtuqySO46NSUKtGst5pc6ZjjTSzDg1sMGAeqgCPkquOktqymFXK8OQqsBVifA p69e+QaZpJWcUBCcKaFNh+hqbzYQXdCcf5dPQXwhEl0ActR9joukjUHoEDfkkWH4QQWX blrw== X-Gm-Message-State: AJaThX4vcV/KS52XEMbi7sYfk61dVd0etheITapB+prEGpOLfV2fJPuC cQwFP2mmXt8mppyJD8PWcAm+Mg== X-Google-Smtp-Source: AGs4zMYOP5/kGzFJB6Jpmw0qKYi3UMvValYMsNWIYbF8jKIUmglJw/LObdsrwoqRkeB5uRzVwsYvmw== X-Received: by 10.28.213.143 with SMTP id m137mr9587943wmg.67.1511534924634; Fri, 24 Nov 2017 06:48:44 -0800 (PST) Received: from jfw540.home (ANice-653-1-499-163.w86-205.abo.wanadoo.fr. [86.205.111.163]) by smtp.gmail.com with ESMTPSA id l31sm37189661wrc.50.2017.11.24.06.48.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Nov 2017 06:48:44 -0800 (PST) From: Jerome Forissier To: Jens Wiklander , linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] tee: optee: GET_OS_REVISION: document a2 as a build identifier Date: Fri, 24 Nov 2017 15:47:17 +0100 Message-Id: <23a6eaf6eeeb7111649280ecd6fd6be3d7900a07.1511533457.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171124_064905_345067_D3322737 X-CRM114-Status: GOOD ( 11.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jerome Forissier MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In the OPTEE_SMC_CALL_GET_OS_REVISION request, the previously reserved parameter a2 is now documented as being an optional build identifier (such as an SCM revision or commit ID, for instance). A new structure optee_smc_call_get_os_revision_result is introduced to be used when querying the secure OS version, instead of re-using the struct defined for OPTEE_SMC_CALLS_REVISION. Signed-off-by: Jerome Forissier --- drivers/tee/optee/optee_smc.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/tee/optee/optee_smc.h b/drivers/tee/optee/optee_smc.h index 069c8e1429de..d0b67c65ea8f 100644 --- a/drivers/tee/optee/optee_smc.h +++ b/drivers/tee/optee/optee_smc.h @@ -112,12 +112,20 @@ struct optee_smc_calls_revision_result { * Trusted OS, not of the API. * * Returns revision in a0-1 in the same way as OPTEE_SMC_CALLS_REVISION - * described above. + * described above. May optionally return a 32-bit build identifier in a2, + * with zero meaning unspecified. */ #define OPTEE_SMC_FUNCID_GET_OS_REVISION OPTEE_MSG_FUNCID_GET_OS_REVISION #define OPTEE_SMC_CALL_GET_OS_REVISION \ OPTEE_SMC_FAST_CALL_VAL(OPTEE_SMC_FUNCID_GET_OS_REVISION) +struct optee_smc_call_get_os_revision_result { + unsigned long major; + unsigned long minor; + unsigned long build_id; + unsigned long reserved1; +}; + /* * Call with struct optee_msg_arg as argument *