From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14DB9CD4F43 for ; Fri, 22 Sep 2023 09:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uPb83AqWCRHRbZ2hzUTZIKxsAZ0cYLWgciJcon0XqkQ=; b=x/a7LeGbvWPN1J 9o/KAbFUPN3SAoqs5IeVxDusNiNjOowEj10bQ8S1Kt10mJm4CJb+r+GXo7U6kxkmF4clLIBMc/dQx pRwHwbgV8WuX2yUimnEvZPVghAVbvOo9pcaTue/9QWMoe0hLRhM2WOQSN1uOG31X12yj1Q1Z6nLFr heZqlX4WnI9JId7H9NpKWFeY936qyB+aLtEsU9yvEKiG2McBWSnKFCfWb0AOAYid2tJL0Duc5omX6 gJCt3NjWEbuKaUNzVmYhI0WnpC3Q+wm06bjSoZKk2x40gGPd+e6CREjmYhDZeqcMjrFUxwpUfcYNf j6gSNGix/XR93vwuTxeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qjcjm-008cr5-2h; Fri, 22 Sep 2023 09:46:14 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qjcjj-008cpZ-1u for linux-arm-kernel@lists.infradead.org; Fri, 22 Sep 2023 09:46:13 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id DCA0ACE23A8; Fri, 22 Sep 2023 09:46:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B323C433C7; Fri, 22 Sep 2023 09:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695375967; bh=2ZqJg/JyagscC0zGrbJOL5exgL9GpMI8zoZzbRLoF7E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i1h9hc1vyL0d8fPYkZb5zjoNiQWrTzzy1UDHQi43TnS5vQG3oCUVHGV5CACeQmXV4 hv2g/krywG9c+snlMzxsinwKjADXi0ZxxdDRv7UlO0wmcqcQ7sXGHnqsy2O4JlJvjr yBuQ+A/6MXrwNBm9vKlClwtxzXUXV5WmuR4EtFrPBmYYc+a+I8ozQkgbtzByDB74dJ Yss8T/iwWJlChVk46FIOC2IW/gzC6Mu41gGF5E+5jlyqCSsTC8xjFnOaTS69pb8igl sRcswxE7sfkCoIagyUp9JFI9cFVtwYpIpmDN3pUUkksRveUDMTmZTVBUBEwdVKjFAS LUoen6AzOSbQw== Date: Fri, 22 Sep 2023 10:45:52 +0100 From: Simon Horman To: Choong Yong Liang Cc: Rajneesh Bhardwaj , David E Box , Hans de Goede , Mark Gross , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Marek =?utf-8?B?QmVow7pu?= , Jean Delvare , Guenter Roeck , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Philipp Zabel , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Wong Vee Khee , Jon Hunter , Jesse Brandeburg , Revanth Kumar Uppala , Shenwei Wang , Andrey Konovalov , Jochen Henneberg , David E Box , Andrew Halaney , Bartosz Golaszewski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, bpf@vger.kernel.org, Voon Wei Feng , Tan Tee Min , Michael Sit Wei Hong , Lai Peter Jun Ann Subject: Re: [PATCH net-next v3 1/5] arch: x86: Add IPC mailbox accessor function and add SoC register access Message-ID: <20230922094552.GY224399@kernel.org> References: <20230921121946.3025771-1-yong.liang.choong@linux.intel.com> <20230921121946.3025771-2-yong.liang.choong@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230921121946.3025771-2-yong.liang.choong@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230922_024611_993651_97F724A8 X-CRM114-Status: GOOD ( 17.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 21, 2023 at 08:19:42PM +0800, Choong Yong Liang wrote: > From: "David E. Box" > > - Exports intel_pmc_ipc() for host access to the PMC IPC mailbox > - Add support to use IPC command allows host to access SoC registers > through PMC firmware that are otherwise inaccessible to the host due to > security policies. > > Signed-off-by: David E. Box > Signed-off-by: Chao Qin > Signed-off-by: Choong Yong Liang ... > diff --git a/include/linux/platform_data/x86/intel_pmc_ipc.h b/include/linux/platform_data/x86/intel_pmc_ipc.h > new file mode 100644 > index 000000000000..25ba57b8a7ea > --- /dev/null > +++ b/include/linux/platform_data/x86/intel_pmc_ipc.h > @@ -0,0 +1,34 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Intel Core SoC Power Management Controller Header File > + * > + * Copyright (c) 2023, Intel Corporation. > + * All Rights Reserved. > + * > + * Authors: Choong Yong Liang > + * David E. Box > + */ > +#ifndef INTEL_PMC_IPC_H > +#define INTEL_PMC_IPC_H > + > +#define IPC_SOC_REGISTER_ACCESS 0xAA > +#define IPC_SOC_SUB_CMD_READ 0x00 > +#define IPC_SOC_SUB_CMD_WRITE 0x01 > + > +struct pmc_ipc_cmd { > + u32 cmd; > + u32 sub_cmd; > + u32 size; > + u32 wbuf[4]; > +}; > + > +/** > + * intel_pmc_core_ipc() - PMC IPC Mailbox accessor nit: intel_pmc_ipc() > + * @ipc_cmd: struct pmc_ipc_cmd prepared with input to send > + * @rbuf: Allocated u32[4] array for returned IPC data > + * > + * Return: 0 on success. Non-zero on mailbox error > + */ > +int intel_pmc_ipc(struct pmc_ipc_cmd *ipc_cmd, u32 *rbuf); > + > +#endif /* INTEL_PMC_IPC_H */ > -- > 2.25.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel