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 B5D85C4345F for ; Wed, 17 Apr 2024 21:55:35 +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=P1UBc98MmUz6Ewvc7ZTdC8mt1aVMg2nWcbxzIcgTnLk=; b=hEO2k4dAduQE6F b66l7MW2D7JSM2bQAk9Lro9qyHgvS5vBUfnmAhRBnnrPKbv7rZMOyugqS4mOizx4VK8795NbbssTI 4xYJgrTZkiMj5gtSlddzrHh5gH/ALP1AZsyY4cxXBNdwGqrW9gUzguIGjZmSOCX/nMGpVoUo9zK6n xiqGdSETVZo4OgYwbwyDpFGccXkzsiSfvimprg7G5euaax3FUvmCiKGCAe4tVWyTeBVdGCACCWRN8 TiE1sjZF3zvovdKreMgCVqyhuSPp2kUU++oAGFyET1nTMvvT+xmMWgL8BTcXnpoNCj6JXFTkESMxX qe9rG1IJotsB7jHvHIgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxDFU-000000008p9-3I6t; Wed, 17 Apr 2024 21:55:24 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxDFQ-000000008of-3i7w for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2024 21:55:22 +0000 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.49.16.6] 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_145521_145174_F886DE0E X-CRM114-Status: GOOD ( 24.33 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel