Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3056637ybi; Mon, 10 Jun 2019 03:38:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjAniISx4qK2PV+5gqlSjm2klv4NkPa9GywJ0Rkyei1rYttgC2JZY37qqORDBHEpJrGB9r X-Received: by 2002:a17:90a:23ce:: with SMTP id g72mr20714455pje.77.1560163108541; Mon, 10 Jun 2019 03:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560163108; cv=none; d=google.com; s=arc-20160816; b=UI9cMSIX3zoN40sjC80IJnCn+xj0oFTETQBszhx7MBLb6dP31FoU9f4vyVAp6RIZCs cVHwddjQrcpF+UY4ycJmDRnvif8pgMkyLCDxwUnhL21wlvHRAo4n5hujx9+z4ysbGAIR 6140c8crTigI5HzHDBdajMfYqcfRkJfDzd/1togaPbzZHPhGG2RyKDE5jipb15a6GNEV 7gLGniQBtLyL2qmHYJ6FTqO97lyh2TLSSe2Sswyj2HII4dRxClYvEX11uQ2d3baVucki iLSE9T18F2PjX9byEiDZr3VVb0wEFnDgGRigeWgRPWAVb7hPbrErPBpjb2SwAyIPz1+2 5k0Q== 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=r305QCo5P0gxc9QlGp15x5GsIAzkkakzhE7eUqlUyUk=; b=B2jNnTqNTEkr0oIlJKPuIYDvN8SlmrwXX0wUunoRFx19sDyXy82Zqs1PzjB3kjEwpd kg/ks2G5TmdbmaKIKIFCkx0CRCkLUDMzXkmSGtt6Oa+64c2wcpwWthCQlGBoKCX7beYu vLGS9mKtsLIIZyGMomWzM23pRD0g4ttaVNtD3oC+HZpFGAjdxkN6Bz8En3nssZb52Mlm PfSofteR6IdeuRaeDwwuVEmJiXAeYC40xySPuIMZkvQS22McYqPefmtIyFQtXW2TBNX8 tFyTihmWWtTKzItSaZJ54dtBXk7mVUtiD7n2cO4q86KFh8qkCU3dOuowziooPztPmLAS z4eQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si8922000pgs.269.2019.06.10.03.38.12; Mon, 10 Jun 2019 03:38:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389532AbfFJKgv (ORCPT + 99 others); Mon, 10 Jun 2019 06:36:51 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:6479 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2389217AbfFJKgn (ORCPT ); Mon, 10 Jun 2019 06:36:43 -0400 X-UUID: fbe0b5d2e00a47b19b283de073143dad-20190610 X-UUID: fbe0b5d2e00a47b19b283de073143dad-20190610 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 697743266; Mon, 10 Jun 2019 18:36:35 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 10 Jun 2019 18:36:33 +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, 10 Jun 2019 18:36:33 +0800 From: Neal Liu To: Matt Mackall , Herbert Xu , Rob Herring , Mark Rutland , Matthias Brugger , Sean Wang CC: Neal Liu , , , , , , , Crystal Guo Subject: [PATCH v3 1/3] soc: mediatek: add SMC fid table for SIP interface Date: Mon, 10 Jun 2019 18:36:22 +0800 Message-ID: <1560162984-26104-2-git-send-email-neal.liu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1560162984-26104-1-git-send-email-neal.liu@mediatek.com> References: <1560162984-26104-1-git-send-email-neal.liu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: AB049FDEE81F782DF02F0C1296A73261E00F082DEA0E126DB98903FBC0B15F5C2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 1. Add a header file to provide SIP interface to ATF 2. Add hwrng SMC fid Signed-off-by: Neal Liu --- include/linux/soc/mediatek/mtk_sip_svc.h | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 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..e70c325 --- /dev/null +++ b/include/linux/soc/mediatek/mtk_sip_svc.h @@ -0,0 +1,33 @@ +/* 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 BIT(30) +#else +#define MTK_SIP_SMC_AARCH_BIT 0 +#endif + +/******************************************************************************* + * Defines for Mediatek runtime services func ids + ******************************************************************************/ + +/* Security related SMC call */ +/* HWRNG */ +#define MTK_SIP_KERNEL_GET_RND \ + (0x82000206 | MTK_SIP_SMC_AARCH_BIT) + +#endif /* _MTK_SECURE_API_H_ */ -- 1.7.9.5