Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2100261ybd; Mon, 24 Jun 2019 00:26:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqysjUdAPCglhaGi2AqSAghe6ZFdTT13sGvLH1AFG0HJmJcMdP9pdXODrxt8qv+NKfUXut4f X-Received: by 2002:a17:902:d695:: with SMTP id v21mr125830164ply.342.1561361179873; Mon, 24 Jun 2019 00:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561361179; cv=none; d=google.com; s=arc-20160816; b=owj3a97dTlSxp3SejUdDiTJNxYsjyFvnpPDmp8G7nqPKIYb+sbZCLyMWjvB1OuM+9P OSXDh0Ihig5Ld8SOd9wLQNNcs9OCu0JSZYDUhKV6wfOm+6OtPUFsj0OIiiCgt+xmodWh J5Xc6e0wGU958SdBMw8o0xUQ2rOzIuvaqZa5oR4gwuiP2KYSTslQJrAUziDjgID6pYJC tvjCBLriJSkTk/Oe0tjKXUX0xzYVWJ6neN6Vs6D5EQQJcBBd+WeKHPLrtlrRxLtvbEyD RoScJgJgNYwqXmPkkxqjrm7gHUflEVU+Zoendhs8LEhWMtG6TTWJo8OAZSan26dlUQGT UUQQ== 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=0+cYtnbMSlzT+458Smumre/pfT6Xob1OoUm9B1K+Iak=; b=uqBbM0pkEatV4YJKeNRDSAMKlfP3w6gs/UzWUYDZuR35RGlPNO+AvCJ+ef8tgGuB3K UAtn6sGXSBxlLZz23XUhD4yhpAEo1gpHf44TrkoREi3iIH5drPipgs5nxfdSx765sqHV 2sadRJPXonqKN6BKeU1kn9mc18PDAZX1R5/9mvWOIrG7X0YavLpjTRqFN1K/FLTKwAHb ODvEJXZgRlazr1yvHkiTev5nyxMcoFGqcMQz6yRFsrOu61VQi9sUkwWUvHluNA47+q2h sE96M96AJPPKXiOLDOPVW9m7SVNBinPC5i8MIV+eJgJMCG4vGpxQvdRABo7nJUG0N3Bu zxLA== 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 p15si3242674plr.255.2019.06.24.00.26.06; Mon, 24 Jun 2019 00:26: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 S1727870AbfFXHYi (ORCPT + 99 others); Mon, 24 Jun 2019 03:24:38 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:65524 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726548AbfFXHYi (ORCPT ); Mon, 24 Jun 2019 03:24:38 -0400 X-UUID: 6038677deac746839ca01a7844137d8d-20190624 X-UUID: 6038677deac746839ca01a7844137d8d-20190624 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 653087093; Mon, 24 Jun 2019 15:24:30 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 24 Jun 2019 15:24:28 +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, 24 Jun 2019 15:24:28 +0800 From: Neal Liu To: Matt Mackall , Herbert Xu , Rob Herring , Mark Rutland , Matthias Brugger , Sean Wang CC: Neal Liu , Crystal Guo , , , , , , Subject: [PATCH v4 1/3] soc: mediatek: add SMC fid table for SIP interface Date: Mon, 24 Jun 2019 15:24:10 +0800 Message-ID: <1561361052-13072-2-git-send-email-neal.liu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1561361052-13072-1-git-send-email-neal.liu@mediatek.com> References: <1561361052-13072-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 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..8cc8b5c --- /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 \ + (0x8200026A | MTK_SIP_SMC_AARCH_BIT) + +#endif /* _MTK_SECURE_API_H_ */ -- 1.7.9.5