From patchwork Mon Feb 18 14:34:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 158617 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2563489jaa; Mon, 18 Feb 2019 06:34:26 -0800 (PST) X-Google-Smtp-Source: AHgI3IYHYjS+9BuS4n5jdEkVGzBiK26WOS0KbJ7qci/qYVDEKg4OlypI/gzp/EXIZZbXkHv7tU2z X-Received: by 2002:a17:902:7b85:: with SMTP id w5mr21084828pll.288.1550500466180; Mon, 18 Feb 2019 06:34:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550500466; cv=none; d=google.com; s=arc-20160816; b=CZm8EdbdSBkUTjqcAfR0mTlDIcikRQHCyN1TSGS1/h69pNWxK+K/lVWAiBqc79W2fY ywa1VgpDgfIhHgQfoGGOh6pC9/Khzea14qJmLVIhoZN0sgyHT+tXID9Pxjxg/47A7muy OLx8NVdrI2k9SDz8VoFHl+zpjQ9swX66AuP7gHU1Ls7ODEOY+b6HGSwGh+fVQ+M+JiQf +Ks7LJ6wBY9WhLO/Bex4ca2uEaFWWHrhf6zD5rXV3T3vqwvqWLmG7lJn+18K8g229Mns YLy7jDNiwyH2t7ZGqhaFhBls6APZW3EasQyUXWZQDcuCdriTZh48WAgam4FcnZK+70nD PEPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=16nUhBdGl6srAaOMhAlikxcXfndOVWu7JwCu15HxeQE=; b=krM9s/zQ64jfpYLM7LWAuUhGN2ZhaJ7uZP7wiVlyZeVPfQmI/RWzHBOENW+ihKnXDS 53R6iOcCa7J/Wk4cyEvPk3ltEkqLo2a+dzpW++/nlOcu9FTxG0M71sdctVSeXWD9SLwr GSAcKbL4JlnWp2Er7Ahs4S/1DlpigCbDPMUsh8lpl5/2jT20dgera4NZD4T3N7bxH/Ae 98xu8aEjSkIWLN/3jJAyH6ESXHXTLYnmBkwwNovDGCzmROxaXFgAAfQg+fjf/6Y15Brt ioxQErPFnrKEDLe9d+eavKTqxLwuaDHzzDgJx4F0IMha76xuzcGWSsS7/qwBYrPnX21s l4uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=a0MRjGIn; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si12953854pgk.56.2019.02.18.06.34.25; Mon, 18 Feb 2019 06:34:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=a0MRjGIn; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732776AbfBROeZ (ORCPT + 3 others); Mon, 18 Feb 2019 09:34:25 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:59692 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387866AbfBROeY (ORCPT ); Mon, 18 Feb 2019 09:34:24 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190218143423euoutp024b02ed6f7a041d3526cd4c3d124285a1~Ee-TbQOf91529115291euoutp02L; Mon, 18 Feb 2019 14:34:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190218143423euoutp024b02ed6f7a041d3526cd4c3d124285a1~Ee-TbQOf91529115291euoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550500463; bh=16nUhBdGl6srAaOMhAlikxcXfndOVWu7JwCu15HxeQE=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=a0MRjGInCh6xMOpSoXy00dHlRwej3zRhOcocRCtcp0JSpeJNcdgiYaovgomX0Mc1+ NnrVIEZ9VVIXxUojxRUXx66izliKd8Fa7jiMgHA6T6UNDleRgWH5WdfgLJAqKJi4bS yfPy43QwJbdQ2ZYjWPxXr1eax8NfYLIowEgNNWYo= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190218143422eucas1p16ab9dd40ca9b491f8d4f35feca7480b9~Ee-TCelel2004220042eucas1p1O; Mon, 18 Feb 2019 14:34:22 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 81.A0.04294.E62CA6C5; Mon, 18 Feb 2019 14:34:22 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190218143422eucas1p1d1bb8b41255990eba819b60cb1b668f4~Ee-SaANVI2685426854eucas1p1n; Mon, 18 Feb 2019 14:34:22 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-ff-5c6ac26e37cf Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 81.13.04128.D62CA6C5; Mon, 18 Feb 2019 14:34:21 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PN400ECCLT2NV10@eusync1.samsung.com>; Mon, 18 Feb 2019 14:34:21 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Joonyoung Shim , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz , Seung-Woo Kim Subject: [PATCH 2/4] ARM: exynos: Add Exynos SMC values for secure memory write Date: Mon, 18 Feb 2019 15:34:10 +0100 Message-id: <20190218143412.6865-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190218143412.6865-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKIsWRmVeSWpSXmKPExsWy7djP87p5h7JiDM68ULHYOGM9q8X1L89Z LV7cu8hicf78BnaLGef3MVmsPXIXyJr8ks2B3WPTqk42j74tqxg9Pm+SC2CO4rJJSc3JLEst 0rdL4MrYfWs6c8EdtoobP14wNjBeZO1i5OSQEDCR2HW0k6mLkYtDSGAFo8Sti82sEM5nRokp C16ywVRN63gKVbWMUWLlhWMsEE4Dk8Tpq2uZQKrYBAwlut52gXWICKhKfG5bwA5SxCzQxSTR tnM62EJhgUCJTds62UFsFqCiw5daGbsYOTh4BWwkvp/nhNgmL7F6wwFmEJtTwFZie+8msGUS Ah9ZJaY1gGwGKXKR+P/mBROELSNxeXI3VFEzo0T7jFnsEE4Po8TWOTugnrCWOHwc4m1mAT6J SdumM4NslhDglehoE4Io8ZD4uvYf1GsTGCXeNhxhBlILGBlWMYqnlhbnpqcWG+WllusVJ+YW l+al6yXn525iBEbW6X/Hv+xg3PUn6RCjAAejEg/vguVZMUKsiWXFlbmHGCU4mJVEeE8dAArx piRWVqUW5ccXleakFh9ilOZgURLnrWZ4EC0kkJ5YkpqdmlqQWgSTZeLglGpg7IiUcHheUyM9 5eps2a+Fkn+13vKKnFpq87wq/XfQUbn0A2Iv1V9Num13saL0Y6hWWMLCpjOap3x69ggd9zPl b7+yPid869K2Hdk3HwVLyujXqvU7nZLd7r+03tymWFwv/0C12Jvr5su69oiYfxTv9k2TSdrN dERFMrXFpzqKr2d+r+iRbdpKLMUZiYZazEXFiQBw/Sp5qAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNJMWRmVeSWpSXmKPExsVy+t/xy7q5h7JiDFZPtLLYOGM9q8X1L89Z LV7cu8hicf78BnaLGef3MVmsPXIXyJr8ks2B3WPTqk42j74tqxg9Pm+SC2CO4rJJSc3JLEst 0rdL4MrYfWs6c8EdtoobP14wNjBeZO1i5OSQEDCRmNbxlKmLkYtDSGAJo8TuC93sEE4Tk8SD SafYQKrYBAwlut52gdkiAqoSn9sWgBUxC/QwSdz/9Iili5GDQ1jAX+LU6SKQGhagmsOXWhlB wrwCNhLfz3NCLJOXWL3hADOIzSlgK7G9dxNYpxBQyepl1RMYeRYwMqxiFEktLc5Nzy020itO zC0uzUvXS87P3cQIDJJtx35u2cHY9S74EKMAB6MSD++C5VkxQqyJZcWVuYcYJTiYlUR4Tx0A CvGmJFZWpRblxxeV5qQWH2KU5mBREuc9b1AZJSSQnliSmp2aWpBaBJNl4uCUamDklU2Osrif E6C8PGBJ8JaunfeU482YvFTVtigvOp7cuV1HumKhn6ksw6Tv+pq8Ela72te5/OFufK6rtje+ ZnZ+3xwDq+MhKdeX8UZdmfNxb/NiVoX3Qd+PL76x7se34raZ8Uk/r53yvzajpLCj+vs1rqW/ xCcr1/ecco+bsN68le3+3Mknr89QYinOSDTUYi4qTgQAoQ1NBQ4CAAA= X-CMS-MailID: 20190218143422eucas1p1d1bb8b41255990eba819b60cb1b668f4 CMS-TYPE: 201P X-CMS-RootMailID: 20190218143422eucas1p1d1bb8b41255990eba819b60cb1b668f4 References: <20190218143412.6865-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add defines for the (secure)-memory write for Exynos Secure Monitor Call. The values comes from the vendor kernel. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/smc.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 diff --git a/arch/arm/mach-exynos/smc.h b/arch/arm/mach-exynos/smc.h index f355185d4239..e523e9604ffc 100644 --- a/arch/arm/mach-exynos/smc.h +++ b/arch/arm/mach-exynos/smc.h @@ -25,6 +25,13 @@ #define SMC_CMD_L2X0INVALL (-24) #define SMC_CMD_L2X0DEBUG (-25) +/* For Accessing CP15/SFR (General) */ +#define SMC_CMD_REG (-101) + +/* defines for SMC_CMD_REG */ +#define SMC_REG_CLASS_SFR_W (0x1 << 30) +#define SMC_REG_ID_SFR_W(ADDR) (SMC_REG_CLASS_SFR_W | ((ADDR) >> 2)) + #ifndef __ASSEMBLY__ extern void exynos_smc(u32 cmd, u32 arg1, u32 arg2, u32 arg3);