Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3632826ybi; Sun, 2 Jun 2019 19:39:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzicSrntaQlp1ufRdUKILIJw1Y5kZaq/N0t4NyjPLO4af9tzTGhOeyk/H2TE618HJKsaozX X-Received: by 2002:a63:31d8:: with SMTP id x207mr24309672pgx.403.1559529598627; Sun, 02 Jun 2019 19:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559529598; cv=none; d=google.com; s=arc-20160816; b=U/BiO5OK1zqyrwnNGtWb0QZ3y0ClvZq/5Yk9zgs+k6hnC1DzdY22bTSB1rcQLBRqhx CW3tPp/6FMFc2hGORoMD//y4W14F27/ykAjWy5dvQQVHuu/C1W/HhWOAd0biRlkB8EoQ dwK8xCYkcGUJdqqzY8YUjQKEYCQVp59mbP/BHBIRpTM1xusHd52UujAlgXq7/QgJ6opQ P5BwvIUDVPQoZi+fI0bnW1fk2M2cFp7jWppeBKDPKU5HVPZtiQd7VALslMSd/W6juDFe yeVdjzis15QK1bgIME+k9QOPFtiBYL8GRHBpC4jrmaiCvfjxLunU4F2Hd4UMtUk9sMgg lodQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=QcWJBRRbjBGBYfoJMWxsFUPnkR9viwZIFx2Gp6nK/l0=; b=j6nTupPuwycjLkT3OWhmg5qwOvDK04uIbrNU8QuH5voQ2t35OeYl8YQjaJAaWW2Gi4 b6lhufUADuKTtUTqfqsPZP7vlhZG8jXW0xNOlR585vxRaB9wwzxEs52f/pAek2wM/Nvq UFZ2y2Yp5lVdG9CwZF2YPb3GoNDJet/fhvsD2aI11rtyeAI7pTHYyoDoxHWf95h4+lCB L+Yqi04oPdGIBE6Ap2KZJd48zgbgrKukcBEk+BHD5qOvturjgvhYE5OuBMu5MsGIbk+8 cLwOdfcSBhBLiIg9NDZ3a9W+XAaJNi0TDLbv1NPFxf9pW3pJj2Gn5GtGtnPxzOTk+Ol9 HLwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k26si15162751pgl.70.2019.06.02.19.39.44; Sun, 02 Jun 2019 19:39:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726463AbfFCCjk (ORCPT + 99 others); Sun, 2 Jun 2019 22:39:40 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:44256 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726270AbfFCCjk (ORCPT ); Sun, 2 Jun 2019 22:39:40 -0400 X-UUID: d9b9fdf348414a908333ce071f8181ea-20190603 X-UUID: d9b9fdf348414a908333ce071f8181ea-20190603 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 491747659; Mon, 03 Jun 2019 10:39:34 +0800 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 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" 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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.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