Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3541350ybi; Mon, 27 May 2019 01:40:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzq5VdKEDgrRaspCk/K/08W8Myi4MgOZfl18TgMAlDuss+9AQhV6BzkZfVjFR8WD9z85tF X-Received: by 2002:a63:5964:: with SMTP id j36mr123215575pgm.384.1558946409520; Mon, 27 May 2019 01:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558946409; cv=none; d=google.com; s=arc-20160816; b=bw9ELscAvhYrTJATNR9+D3cV+E1Wa5oOGWik2qSzHHCfedHj/hUIr+G5IhfV002xm5 BZNiAYJEoRDUGagSkvhSL2kpNXWbMFC8FszJReyXNU2Mbg08NCRBa37B7pZZjiZ0Nv16 MKa0s9r0UKfy/rJwV24mSQfRp+Xo3UBunGyj+RXeaGrJQuPno8aFpR1O2tgUc2SROwDc sV0PPXXsLk7UtZK1cnKypc/Qzea62hTE6wF8MsiZz/RR+H4X/BixR6+1M+u+9I62P81O Q1mm5rq0PIfZ162KqyJ+gFm3OfSSoXa0eT4eD8CGax/y17vrNLDyUBwoGrXIpqENzZWM WuXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=g49g0vm6lQBTMRh4cxg4/gJqCGtLu+8gP6ZQmVMQh7U=; b=NjllUfPFLZTxbdXoEKW/k5Sx4uYVQQGYDwcU43fACbuiFedCoQ6pfojd2CsKwsg3yr ygWETLz3xlhPU1dFfx7ZyFkT49k+QVq+M+GZAi59Ys/Ph6vEQUxdeflUvTmd3IxhVInf k6Q7zJ0Rw8T6IMGJHt7QRoaGR3hpeASQoqm3iy0Lud5plWnvXvvBU2K2F1fbfpqjGvxc KLACn3T4yPiL8BIC41gG9uwaiWBsYrQhcUq4LuQcfR8mqoo7yiMVlIxedRXAGhWVaV3k cTiqQQ8eFfjJFoNwJGBQfNqs2p9Ms2pussRBMVpEuPFo7CSTf59oB7hoJSJBaMC1CC6t K+uA== 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 d197si16842976pga.110.2019.05.27.01.39.54; Mon, 27 May 2019 01:40:09 -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 S1726501AbfE0Ij3 (ORCPT + 99 others); Mon, 27 May 2019 04:39:29 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:33853 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726282AbfE0Ij2 (ORCPT ); Mon, 27 May 2019 04:39:28 -0400 X-UUID: bf1d95354e3543b588a19fde8c97c38b-20190527 X-UUID: bf1d95354e3543b588a19fde8c97c38b-20190527 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1882384691; Mon, 27 May 2019 16:39:09 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 27 May 2019 16:39:08 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 27 May 2019 16:39:08 +0800 From: Neal Liu To: Matt Mackall , Herbert Xu , Rob Herring , Mark Rutland , Matthias Brugger , Sean Wang CC: Neal Liu , , , , , lkml , , Crystal Guo Subject: [PATCH v2 1/3] soc: mediatek: add SMC fid table for SIP interface Date: Mon, 27 May 2019 16:38:44 +0800 Message-ID: <1558946326-13630-2-git-send-email-neal.liu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1558946326-13630-1-git-send-email-neal.liu@mediatek.com> References: <1558946326-13630-1-git-send-email-neal.liu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 +#else +#define MTK_SIP_SMC_AARCH_BIT 0x00000000 +#endif + +/******************************************************************************* + * Defines for Mediatek runtime services func ids + ******************************************************************************/ + +/* 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