Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1333465ybi; Thu, 30 May 2019 15:52:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwC/CtcmlkUpMKEVqLFNFxhyj1HaUQfe0rn9Ywebb1eg5OvvoyV2Hr+RpJgSsrS39qOQ9C8 X-Received: by 2002:a17:90a:6505:: with SMTP id i5mr4059323pjj.13.1559256742595; Thu, 30 May 2019 15:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559256742; cv=none; d=google.com; s=arc-20160816; b=UUO9WlvMaUbz5NAdtUTm8vo5yla82lOEpbQCZZuyGi4PYy4I29KuIuYytROAR0h4H1 MDGnAx04taY3QwPImal1QE07IWreWOM/Ougqn0+YtSvvKF1+aRZ4zvGtkXlxZJK6qkea ZiFf6zLgPgKf9rs3oKHmqzY1BHdC1BIBY48BsFDkK2qWe1TwEPSRkzWFJbVOhkamEQGb 0dGVVWPxpcBXSSPBc9wjSHQUaxzAacG0vEjbKcXq4KaXbK+jEeWvMo1y1iEQV32vjbZp trOpWDmt4lIWbx6GZPMsVN6sHcnD4kdOAc6q1tDWnQTbO9VxxZprvKaGZfPBZKFGEqcs MTPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fZZyMC9eCrimHcXCaLobqBCBB5ZNIoC2foRioLJUplg=; b=cbbnEzopqd9+QlAw/I8otCGZw/s7I3BiqK7NAoSjEZTAFd7/jq0fPguwRSwrEi9RUr PIG1fyY2hAJtQC4JJZ6BsqDVU7SRTMTWW1Q/FJNjLjloOuoqa6gglf59JyupAj3D8Sdk FwpVZT7latgw1SHhjm1/XyMeFAwpFLt3fflPjrniRfZyNqQq2OCjv4PgOHuP0IOcST9I VpRAyczkueIQl5xq1W2UYl34DeTOkZNP4kaOvfabCvKEJy62VfEPY+JeRVN6O0RUjSee 5Og7A2gHrKtpO+m1x5gRYW7Sgcmf1g4d9GWQb2sIHvz6M/ntqSk457cwrof0c88deRfn v+8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1M9ZC5AN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si4081720pgj.127.2019.05.30.15.52.06; Thu, 30 May 2019 15:52:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1M9ZC5AN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726684AbfE3Wut (ORCPT + 99 others); Thu, 30 May 2019 18:50:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:58216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbfE3Wut (ORCPT ); Thu, 30 May 2019 18:50:49 -0400 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6638B262B7; Thu, 30 May 2019 22:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559256647; bh=hjWqKFlJP4/yUgQMwqUdhZkErpO8lhwWKHylFyTK9uA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=1M9ZC5ANvJgXHP4foCQorjUJ/I07kCeNHrXMQm5rWFcbagVU/aeM244UAXe+MxPuK fjXDzTxT7RK7oEIZeiMY95zZfE+HiIZ28GB1/Lvg2sqlrwv17x8NjVM18bvSbDV21c wSahg+yB57xeRoyJEUxQWmJxsI9JHrbxJUP0+6Mc= Received: by mail-wm1-f53.google.com with SMTP id y3so4879919wmm.2; Thu, 30 May 2019 15:50:47 -0700 (PDT) X-Gm-Message-State: APjAAAUoQ8gRf8cMdv/D6dzPAelgs6Mff+UNTthW8Xv/HIyzhh8HmXcL CTnIJzDcOiPKcJ4qIYmI0EhAAc+OtE23Pup5iUs= X-Received: by 2002:a1c:c2d5:: with SMTP id s204mr3672258wmf.174.1559256645963; Thu, 30 May 2019 15:50:45 -0700 (PDT) MIME-Version: 1.0 References: <1558946326-13630-1-git-send-email-neal.liu@mediatek.com> <1558946326-13630-2-git-send-email-neal.liu@mediatek.com> In-Reply-To: <1558946326-13630-2-git-send-email-neal.liu@mediatek.com> From: Sean Wang Date: Thu, 30 May 2019 15:50:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/3] soc: mediatek: add SMC fid table for SIP interface To: Neal Liu Cc: Matt Mackall , Herbert Xu , Rob Herring , Mark Rutland , Matthias Brugger , linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , lkml , wsd_upstream@mediatek.com, Crystal Guo Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Neal, On Mon, May 27, 2019 at 1:39 AM Neal Liu wrote: > > 1. Add a header file to provide SIP interface to ARM Trusted > Firmware(ATF) > 2. Add hwrng SMC fid > > Signed-off-by: Neal Liu > --- > include/linux/soc/mediatek/mtk_sip_svc.h | 51 ++++++++++++++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 include/linux/soc/mediatek/mtk_sip_svc.h > > diff --git a/include/linux/soc/mediatek/mtk_sip_svc.h b/include/linux/soc/mediatek/mtk_sip_svc.h > new file mode 100644 > index 0000000..f65d403 > --- /dev/null > +++ b/include/linux/soc/mediatek/mtk_sip_svc.h > @@ -0,0 +1,51 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (c) 2019 MediaTek Inc. > + */ > + > +#ifndef _MTK_SECURE_API_H_ > +#define _MTK_SECURE_API_H_ > + > +#include > + > +/* Error Code */ > +#define SIP_SVC_E_SUCCESS 0 > +#define SIP_SVC_E_NOT_SUPPORTED -1 > +#define SIP_SVC_E_INVALID_PARAMS -2 > +#define SIP_SVC_E_INVALID_RANGE -3 > +#define SIP_SVC_E_PERMISSION_DENY -4 > + > +#ifdef CONFIG_ARM64 > +#define MTK_SIP_SMC_AARCH_BIT 0x40000000 #define MTK_SIP_SMC_AARCH_BIT BIT(30) > +#else > +#define MTK_SIP_SMC_AARCH_BIT 0x00000000 #define MTK_SIP_SMC_AARCH_BIT 0 > +#endif > + > +/******************************************************************************* > + * Defines for Mediatek runtime services func ids > + ******************************************************************************/ It would be good if remove the trivial and below all unused comments. > + > +/* Debug feature and ATF related SMC call */ > + > +/* CPU operations related SMC call */ > + > +/* SPM related SMC call */ > + > +/* Low power related SMC call */ > + > +/* AMMS related SMC call */ > + > +/* Security related SMC call */ > +/* HWRNG */ > +#define MTK_SIP_KERNEL_GET_RND \ > + (0x82000206 | MTK_SIP_SMC_AARCH_BIT) > + > +/* Storage Encryption related SMC call */ > + > +/* Platform related SMC call */ > + > +/* Pheripheral related SMC call */ > + > +/* MM related SMC call */ > + > +#endif /* _MTK_SECURE_API_H_ */ > -- > 1.7.9.5 >