Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2587777rdb; Fri, 22 Sep 2023 03:09:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCX7NPfQER48ZyU4LsO6ysISY7pnf//WsNaqimRY1xHHINODqdtQAGY+6V5LiM8rCXOSGx X-Received: by 2002:a05:6a20:8e1c:b0:14b:8b82:867f with SMTP id y28-20020a056a208e1c00b0014b8b82867fmr8606532pzj.50.1695377359177; Fri, 22 Sep 2023 03:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695377359; cv=none; d=google.com; s=arc-20160816; b=e7bZA8doXZJoNBsXwkwGXUuNnKunlXPsdSX5g6UhATE6fzWKPJs1VkjtKl/3AhrcRv c1IaQCR3u8tQRdoLxR/pT7EktORW64GuSPoC/DDhcbz31PrYJn+5tRcqxXUfiB31Fi0R zTceLsoG+lftU56GSa7xWdC3eSZpZMo1CepJDxKIJpTVATYGxuFx7Fpg8bjr/GEMhX3/ trWDPt6YXL1bh0MdKIk0dJNByUUcvmvYe1YR+3j6SSRCo6MYD9yXC2d81QLzbxlhtrkG Smj3nNG1o/n95tAw7wUEiPHyeWlnO7g6zmer9Wq9R43O9LzlylC0xpGPUzDZ/NijNsY1 eBvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+JwwlBzCFvTy70FS/Vn+gbSkGBfGHsWNi/HmdDU77y8=; fh=ptlDsvdbJVPxxEoLWhjmu2mkqyrhsBz6RBiyqfFuAIU=; b=lnwBaTvQdhXf3aK78CraZYQPQ7IwcQliZ9xxAFTrLvAhFKZ3dpVMAIoicTJrFOx6Sf C+/mUZr+YZAD3Y8GCCkFOLiALc/tF++CkSx6UwuBTm7rpV4Yj0yEOq2seqv4jdV/fw8Z ZJdUMlOr8JrNjV1tHndhWrt2oEI5tVqpsi1kEsCuo4xpnlsgqDC9O0hp6I77WkyzBMSi ocilPqxi1O+Xo3C2vMa53SLtUIbj2AKCDs+T9k/poqfZvm9JXCYseDhQWcS9+R3Q0I5o dawe8VdxbzD8vuNFfflqDQqmV+XOIJPjdYbGf2deCJlZ2AUpMBEPupyZoiNXsXmxuDTY xGDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i1h9hc1v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id l4-20020a17090a49c400b0026f930e8b06si5777389pjm.118.2023.09.22.03.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 03:09:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i1h9hc1v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 739CE829E924; Fri, 22 Sep 2023 02:46:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232503AbjIVJqS (ORCPT + 99 others); Fri, 22 Sep 2023 05:46:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232939AbjIVJqO (ORCPT ); Fri, 22 Sep 2023 05:46:14 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74DDD1AC; Fri, 22 Sep 2023 02:46:07 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230921121946.3025771-2-yong.liang.choong@linux.intel.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 22 Sep 2023 02:46:27 -0700 (PDT) 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 > >