Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp914946lqb; Wed, 17 Apr 2024 14:55:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhenD/KtGtY6MpmNGoy2LCEiqKE++iyvthyWqLP0SEXOz7fmRignlE4xOo+onUACd0vOZRxHygu8dTUSkQs+hJ1mlLNVuvEHC8ngVISg== X-Google-Smtp-Source: AGHT+IFCWbVvZ3Ft44ptWDljxIJakJMzrG6LjCdPw5EgbTpmL7eMaZommsuSdel8YP1Z02XnMcmY X-Received: by 2002:a2e:9545:0:b0:2d6:c23f:7dff with SMTP id t5-20020a2e9545000000b002d6c23f7dffmr261604ljh.44.1713390940226; Wed, 17 Apr 2024 14:55:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713390940; cv=pass; d=google.com; s=arc-20160816; b=eMttXq5RQ70QVmeBI3HjT9x4RxuqxD4mWs23IURQA/dK354kNwaxUcIAbN7kwhxi7T zpw586NVJEg6lurLHUyBAqpnNSLomafYYblWUxGwDgjTlwhoW6HolRiAeeAflyI95ht+ R155Fha2T2JQwsObRHu6MA0j1ol/XKH6YghPq11Sk2Fg3YijgWi8/ZgnqbYImPVukGkI f6KCuk2bLMebZF7TbblQGTprLnSw2fRf7GSuyPqzj8mZJ+OcWQicSE9cDpjQx7on+G8i BaXBDsUF+a5lfUNUmdUwqHTVulYUCOBn7Icra3zuTz8+WHCGE8a1F0X9FDTWJJp22eFQ OQbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TDIAnHm/ZUhSuPlUruXFmA+SpAnGyjShzKLJ5rfhgtk=; fh=gKEUGfDLSR7wmAN7VLqpD320ilxhW6pNJ/gTQRZsaAw=; b=S2OcmCzWNWPNoCeN23ew17jwlDedhkiSfAHPEC0aD4wZJvR4FoXkdN+Mfyx0ekkICK AdwGp9T//XLSBM81IpUjQSPpkf3p5F+FeDZ1+ZxQxfvpyDnLnmuEjdvroHNz1B6eP4kv WVx63sRbnWYPi6KmXUJmgwN6MkXKFp06xVSX2p0K3MLt8D7j7Z10NfhefEe7VLirZ6R7 rcyeihepZS7PX6s6KnmsGPuIhisP6Dm+pC/foW/XFYXeUmPrMy9oCSH7U03mdd1J9kti mda5/OMhqijuKjcuMUgbovnE+LNaVe1V/F11vu0foca/tEpjafyyAuZ4E40vdQXf7Pn3 M5OQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=R9CkucTj; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-149270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149270-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z22-20020aa7c656000000b0056e57cbe92fsi75944edr.168.2024.04.17.14.55.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 14:55:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=R9CkucTj; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-149270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149270-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ECF3A1F21A99 for ; Wed, 17 Apr 2024 21:55:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 734C213B7AF; Wed, 17 Apr 2024 21:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="R9CkucTj" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20F3212E1DE; Wed, 17 Apr 2024 21:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713390928; cv=none; b=Wa+IWGgcHn53cNMNAKxgOBQsgAHDl4CWib8cwPY/vTZ/Dg/75RrWL/B64wmR9E+hsk0mi2jbI77z9Vz48OH6ifIZOuQNh7rIjAx8GqFn3ZFtDQMfmesaYDQWUp2N8RDX5MTDzqSEl9XjrJbdDeHBR6PQeyaTPh4M7jrfXLVL99E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713390928; c=relaxed/simple; bh=ev4z2iRO1kF+bMaP55rRGKH6OK9Jeje9YeGmXIt+15g=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CJlFzAfQ9/cO7HZPvG35hAN0SfVWMCYKgD+FIvZwZB4jTodrMCoV1Xi7wYj/Igv8Ejbxsgj+Z9w7a2RxJMGiNMN/v8Le5/4jnTXUhP+AAvEDg8+fGHd4cQ7YFrQB77CkR2BEFohWIWCh8yJpSWhPkcBM+XRPNL2D0gBGTXXOLcA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=R9CkucTj; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43HLSujJ016011; Wed, 17 Apr 2024 21:55:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=TDIAnHm/ZUhSuPlUruXFm A+SpAnGyjShzKLJ5rfhgtk=; b=R9CkucTjyCITUuWsyhAuUdunoCJCAiMlyGV3e mGr3/PoGdVF2ayXNRRglagEmhe3daC22jhL2L2yiM7SFQM+ZJ4O5jIp5MjIl06LC JKqSqDXVsvExdyllvHCfZc41Ge13iTcnsjq1ptr3RYpinYDIpCL5voD8arn7WPhz ++v2JF02IvloWwx3nKXLyNUDUP98IAoG+4whaRnn1a6zCt8XLsnlGBaiNnpz2sup 5Nz/CS1gftLURBMutCLa+CHKnml/OXgf5+mpKDsMQT5WccgwfJ73gsLV/go5Qqdo KfDEvghRESRSCW731UaSqT2OxFkL5t8tsZuJGFCr1eUUZbzAA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xj8auth2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Apr 2024 21:55:11 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43HLsggm015445 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Apr 2024 21:54:42 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 17 Apr 2024 14:54:41 -0700 Date: Wed, 17 Apr 2024 14:54:41 -0700 From: Elliot Berman To: Sudeep Holla CC: Bjorn Andersson , Konrad Dybcio , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Andy Yan , Lorenzo Pieralisi , "Mark Rutland" , Bartosz Golaszewski , Satya Durga Srinivasu Prabhala , Melody Olvera , Shivendra Pratap , , , , Florian Fainelli , , Subject: Re: [PATCH v2 0/4] Implement vendor resets for PSCI SYSTEM_RESET2 Message-ID: <20240417140957985-0700.eberman@hu-eberman-lv.qualcomm.com> References: <20240414-arm-psci-system_reset2-vendor-reboots-v2-0-da9a055a648f@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: Fj2qyuwf4HChIqXQIWRk-MgKV3h44KJW X-Proofpoint-GUID: Fj2qyuwf4HChIqXQIWRk-MgKV3h44KJW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-17_18,2024-04-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=846 clxscore=1011 mlxscore=0 suspectscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404170156 On Tue, Apr 16, 2024 at 10:35:22AM +0100, Sudeep Holla wrote: > On Sun, Apr 14, 2024 at 12:30:23PM -0700, Elliot Berman wrote: > > The PSCI SYSTEM_RESET2 call allows vendor firmware to define additional > > reset types which could be mapped to the reboot argument. > > > > Setting up reboot on Qualcomm devices can be inconsistent from chipset > > to chipset. > > That doesn't sound good. Do you mean PSCI SYSTEM_RESET doesn't work as > expected ? Does it mean it is not conformant to the specification ? > I was motivating the reason for using SYSTEM_RESET2. How to set the PMIC register and IMEM cookie can change between chipsets. Using SYSTEM_RESET2 alows us to abstract how to perform the reset. > > Generally, there is a PMIC register that gets written to > > decide the reboot type. There is also sometimes a cookie that can be > > written to indicate that the bootloader should behave differently than a > > regular boot. These knobs evolve over product generations and require > > more drivers. Qualcomm firmwares are beginning to expose vendor > > SYSTEM_RESET2 types to simplify driver requirements from Linux. > > > > Why can't this be fully userspace driven ? What is the need to keep the > cookie in the DT ? As Dmitry pointed out, this information isn't discoverable. I suppose we could technically use bootconfig or kernel command-line to convey the map although I think devicetree is the right spot for this mapping. - Other vendor-specific bits for PSCI are described in the devicetree. One example is the suspend param (e.g. the StateID) for cpu idle states. - Describing firmware bits in the DT isn't unprecedented, and putting this information outside the DT means that other OSes (besides Linux) need their own way to convey this information. - PSCI would be the odd one out that reboot mode map is not described in DT. Other reboot-mode drivers specify the mapping in the DT. Userspace that runs with firmware that support vendor reset2 need to make sure they can configure the mapping early enough. Thanks, Elliot