Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4526150yba; Tue, 7 May 2019 21:00:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJgEkr6Ic7atU/4uMfIY0c5l/ygEdlYyJP3I6tt5vsTbwVWyJUK/cpajx0xd/XyCofXhvX X-Received: by 2002:a63:e408:: with SMTP id a8mr25882488pgi.146.1557288019963; Tue, 07 May 2019 21:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557288019; cv=none; d=google.com; s=arc-20160816; b=Brj9XD+Oi0ekchfXvYi/KgXtuFo9PrSv8XAVNob/m7/frK3Jd44KIfqKAndeZ0ZUfe FnrRwT5WcYlNB2B0y1F7HjxogeFTPw2Z0EKYX3IcY8jjlsRrtFTQv8EssGhIO26/QNjm WcBUc7ATpdYapRzL7m/ZTmIZZpaBLi276FCtjnbjn+eBrT6toheKYCup4nV4o9EUUsVR b/WyL1oG4AMbNoqItOZMWKB15hDrV4taz5MWcQQtwsXHppCVIRLryCxTKqA8OoeOterR YJ79n/CNd+IqvmWEdothqK1v/YKE1kAGizHJh8ZiIDcupZHFUbzuCrnZP2UpwGiRLX72 d5SQ== 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=27op2wNh91v9sdOMZdZtsfTw6++Aqi6XCUXHBqkWOdw=; b=fPWmKgcmqfql8LEhEbpJKL7JZO54EUjEEc95VaE+B58vwmr5htmkY/4gdKy2309vca hmAIEPMU6B93BOyBT8B3cZ0VmvWZSFb2oeYtraFgV5KiRmIaE1b/QCuCI21845WCNWuG v/iFOGS+IaC8DzS1h9UFu1tVeAOdGZMR2EP8DU1wo9TwhMMBEoOoXh678tYlcpAChUia fhXtu1v7Pys72YztczwKAgQXFDX1LbOF+jnWIRuhwa72BES9LYavCh1inoiXQIp5QXaB rgOGN1Hdya58u2YRbGZQuUWBDLXYpi5J76tdq3CXWSPRHeDmCO3qxW0lEBI2VmdM2lws /G5w== 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 133si18521213pga.130.2019.05.07.21.00.05; Tue, 07 May 2019 21:00:19 -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 S1726653AbfEHD7i (ORCPT + 99 others); Tue, 7 May 2019 23:59:38 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:29195 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726704AbfEHD7h (ORCPT ); Tue, 7 May 2019 23:59:37 -0400 X-UUID: 9fe62396b5f04edd99181fcd54e6794f-20190508 X-UUID: 9fe62396b5f04edd99181fcd54e6794f-20190508 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1355854725; Wed, 08 May 2019 11:59:33 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 8 May 2019 11:59:31 +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; Wed, 8 May 2019 11:59:31 +0800 From: To: , , , , CC: , , , , , Neal Liu Subject: [PATCH 1/3] soc: mediatek: add SMC fid table for SIP interface Date: Wed, 8 May 2019 11:58:55 +0800 Message-ID: <1557287937-2410-2-git-send-email-neal.liu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1557287937-2410-1-git-send-email-neal.liu@mediatek.com> References: <1557287937-2410-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 From: Neal Liu 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 | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 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..ac73f68 --- /dev/null +++ b/include/linux/soc/mediatek/mtk_sip_svc.h @@ -0,0 +1,55 @@ +/* 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