From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE22AC28CC5 for ; Mon, 3 Jun 2019 02:39:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5BD727AF6 for ; Mon, 3 Jun 2019 02:39:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dcm5wzao" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5BD727AF6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XLifhtJPsCKKcz9gGmX5vQLcm0rod5UWeYYnupcmfzI=; b=dcm5wzaoYN1xo7 CgvdPCwGN0A4CXXX3gCuEd7xjj1/70oMJw7G5y8tRQ6073u1zuqt6QzySAgxfHrY+X57KVYMH0Qp0 C7CjoKuCZi0ooB0EhVO6T534k++D7Mla5+38q5qEBt31W3fX4zFgeytPjb/4g6ipBCoTfHNXh2yWB n/E80322rAj3UzzO76Qx9rCOdL7U4+rgWfFr+3n/FmNb/tl8CuOpGYKXKoNjW0ZXDKUhx50RyVkaT TRE9D89SYm6To2P6ejgDcjNzjOIla/zX2mFXwLXCcFbGIdrTplf/+zZ0qFAk/9UwnXgYyebEN8TEQ NDDncWhTFgHPG+sGqUPw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXcsx-0003cv-5e; Mon, 03 Jun 2019 02:39:43 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXcst-0003bk-Jv; Mon, 03 Jun 2019 02:39:41 +0000 X-UUID: b1fca94f8a5e4fb9b4b56963448b73a4-20190602 X-UUID: b1fca94f8a5e4fb9b4b56963448b73a4-20190602 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1353427873; Sun, 02 Jun 2019 18:39:36 -0800 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 2 Jun 2019 19:39:34 -0700 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 3 Jun 2019 10:39:33 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 3 Jun 2019 10:39:33 +0800 Message-ID: <1559529573.6663.12.camel@mtkswgap22> Subject: Re: [PATCH v2 1/3] soc: mediatek: add SMC fid table for SIP interface From: Neal Liu To: Sean Wang Date: Mon, 3 Jun 2019 10:39:33 +0800 In-Reply-To: References: <1558946326-13630-1-git-send-email-neal.liu@mediatek.com> <1558946326-13630-2-git-send-email-neal.liu@mediatek.com> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190602_193939_658709_031C6663 X-CRM114-Status: GOOD ( 17.83 ) 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: Mark Rutland , "devicetree@vger.kernel.org" , Herbert Xu , wsd_upstream , lkml , Rob Herring , "moderated list:ARM/Mediatek SoC support" , "linux-crypto@vger.kernel.org" , Matt Mackall , Matthias Brugger , Crystal Guo =?UTF-8?Q?=28=E9=83=AD=E6=99=B6=29?= , linux-arm Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Sean, On Fri, 2019-05-31 at 06:50 +0800, Sean Wang wrote: > 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. Okay, I'll keep the necessary parts, thanks > > > + > > +/* 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 > > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel