From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792601530; b=OyN3o1FM2b4UgSPZS/7ibCotA1CIgxz6oRowxg9PeMpqUJMcB0I6AysS/AAOnVSThD7B z6GCQLc23IAfZ0h2oRvE8/4/mqh63R06Jei1Xt+7gCzXM8jAa1pDJGC6mDLcRQ9DNqMKr 2ApmzO3C3YVe8QrdB5/2LKCgCIstUVak+x7NS215UMoNQqB4YM1DNsTg88KH7Hy+hd6gv tXhHC8WtjGnppJ9rXsHf//d0v6hxNvc7kEl+F/hemTlDpV3rbR6Hifzyeou/3YxHY3Crc cCJlVVk+C8dzQE9fDA8K9Q/T1/+1nqcwGb2VyK1fheg8adJqKEyw5kNhLTet25sedNg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792601530; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Date:From: To:Cc:Subject:Message-ID:In-Reply-To:References:Organization:X-Mailer: MIME-Version:Content-Type:Content-Transfer-Encoding: X-Proofpoint-Spam-Info:X-Authority-Analysis:X-Proofpoint-GUID: X-Proofpoint-ORIG-GUID:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=3Qwd5IeDpUYoKVbi14CXRmp0vCTcpiIpKFvrCb+PUaQ=; b=arHh2yg8RC16AzVZQf0RpbwRJ2F6BzEVQ5KCoX9AyoJFTd6iP1ZyJzpioSWR+p5Id/pS VDWJTk/Jp2u3PshYWumqlo4XCof6MO533gev4KZVk8rL6Ac9f35ayNxTVuZe5wE4AprfM BgZoYkWLXxDL1PqJKTQaqHAMNM7SNu6JTKtu02Gj6GDFYFoIPjeOURqHiF20gm8K4Bb+7 vhY3otPaeabwZtPSu5Eg3ETX/Rq7im7DWXpDJnMwsqthnoe6Og1QooHi+tQDEv5mJumpF dRpq2QFd2B7hzoTT3eBy4yumD32dvSEcJVH8sG/jkIS2V4hgFyubRuLaX2WB//CcHSw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=fGBW0L6P; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=QQjpQpmx; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 430E0606A31F for ; Wed, 21 Oct 2026 16:52:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 430E0606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=fGBW0L6P; dkim=pass (2048-bit key, unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=QQjpQpmx Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69LFTwkU4158357 for ; Wed, 21 Oct 2026 16:52:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 3Qwd5IeDpUYoKVbi14CXRmp0vCTcpiIpKFvrCb+PUaQ=; b=fGBW0L6PCB1n3raX d/aUhPmemf5kyrJMb2V994vfSQxb8ZW1AUflWoJbMqxkNdQMkyX60NaRpWzwG2ZR dyDNPyramva9fABPmwqppOy5x+y3G2Xjpzu+HJAQ8qTdGMQEDtxA5BLJJps0Gfbc 0RS6PuOx2PIHdwu3bJdDo33JYwkVD1p+N8Eahl+8OsJIsrCWmXNci7Ks5pmN/stb gumg0KOS4MOx3tLDNhDJjMnuFbAjLxfI2H6AicbgZ1SvXdgPAikr3eeNDm/5NzI1 ReUtxdLTy3hBPhb9/wjImsppuSRvPHiJNWyrz7U7vS8e4LyChMQCIA5S5oPDbcDF hGURjw== Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hex5q8xy8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 21 Oct 2026 16:52:07 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-3510d0baf63so2170750eec.1 for ; Wed, 21 Oct 2026 09:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792601527; x=1793206327; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=3Qwd5IeDpUYoKVbi14CXRmp0vCTcpiIpKFvrCb+PUaQ=; b=QQjpQpmxczgrpr2meAC6qTgPsJ4ZmJ91pnxGxL09Sesa1rfJJ+QmYIiqzX/3ZN2Whc PGHUczg9OAvRA0sX9sIDqu77sBzAiBbu7jGYKhjLqjsw2zunSyFSZrk/9dIw43rWgx87 IVATm2JqsZfxBJA4hz7gvE+ZQkKi5tu3ZcAv3WPj72XLC61Kfbn/vxwFtyI0+LKC4Fg9 N7c6i0MEQt4EgFAEAjH6SeD6iQGD2AApA1yq+2zxXGXf/7tUfU8F3yLM6Mcr02afFF0F fC6EP1lR68xmmprG7i052+aNcNNEAIDBPU11lgff4/LOklidQA8lbZ0lsxRZbkFmV+xj 424g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792601527; x=1793206327; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=3Qwd5IeDpUYoKVbi14CXRmp0vCTcpiIpKFvrCb+PUaQ=; b=uJZsw1fRkAUagH0Zw/f78r6x/zr97e713whkK6BlRFZYlJ0yTBsCyLiO4mAZo8OFhn Dvx76eOus0Zlo1EzodFq5vBA+b4EET/MM4s/jSelT1/SfxbkZsz+vJzFuUjY0+trp6T5 YD/UvGSgCKc0PbhYHCwOec5qNxkL7xiw83fUxaceEdja7oYxJvTbVc5rPekIiKgtnQBR r9ETaDZToyO1Fb1EXntxFt6RyiL8VqCtR1vCtdZt6p6yyURCu7aJc7YfiMa59/qCiQgW H4ZrxnoN4WtpHy1EQSvCiLWe7yEx2WG6+NOHu0cE62B0MeAU/5eZrVRx6Dkn+zb3dmTl AkXw== X-Forwarded-Encrypted: i=1; AKwUvBwY7TzNLL/e6PLrM9rhZZvh0cXHElbvTkySR+pkB2nzPSX66HnVpxgc0IkxRGz2yy9xjBaA8kPt11g=@vger.kernel.org X-Gm-Message-State: AFq9FYKDMRe8BZzYM2H94RhmIWaW8Vco7pOSmMpE17S7GSO9yxTUGYLd 39FEDcH0gEg8kvGM5Ql7XMjH42alFnDJd+oyrDM77+v4X/1sjIy2fjL16p/ahiYOZkoLZeWT582 X4N3P9J+OjTFC84Uu+natk9K6XSpjjVwGi4Lj7oMl9bI3OOgR+7L2gVT6rh5ZkpI= X-Gm-Gg: AYBFou3Y7km02vTsZKdPWQIhlzzukKzPHZg1zcdKrJo+kJA/+Fkftm6PlYXw/S17l+q 93/JKwLC9dgwzTpn6ZB2yAsY/m5npBsZ4OnbIND3uV3Cne+Q1MKNmQNKx9g1GEfu6fK2jabng63 uQICOKfYHJJ+xePKgW5gTfJAj7lbfs2wK5CvSkcMTdAIqyB7BgjumOcppZexSorTApQNlO1iJ1q anskcgrdUYfJOIgO1rpnM4triyVkQd09PP7OylwSiSObVuo0B0xxV+iYxYYGbir9eX3ROLL5Oy/ WNrLw67PZ9R3pdCF3eXgdsRqShgDCNUuYC11eIFVUuPBdK5mDUqsde4YbCaAzxMNN60RhvHBv/9 ZwyMEt+vCApAYDxY6IuQ8DixjJ3Vpb1YfxTIY8E+HMQ== X-Received: by 2002:a05:7300:fb83:b0:359:8492:2107 with SMTP id 5a478bee46e88-3674c43c286mr5506648eec.10.1792601526892; Wed, 21 Oct 2026 09:52:06 -0700 (PDT) X-Received: by 2002:a05:7300:fb83:b0:359:8492:2107 with SMTP id 5a478bee46e88-3674c43c286mr5506599eec.10.1792601526326; Wed, 21 Oct 2026 09:52:06 -0700 (PDT) Received: from localhost (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3674206d1f1sm8700283eec.28.2026.10.21.09.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2026 09:52:06 -0700 (PDT) Date: Wed, 21 Oct 2026 09:51:55 -0700 From: Jonathan Cameron To: Jason Gunthorpe Cc: Alexandre Ghiti , Albert Ou , Ard Biesheuvel , Arnd Bergmann , Catalin Marinas , Jonathan Corbet , David Sterba , Ilias Apalodimas , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Paul Walmsley , Randy Dunlap , Simon Glass , Shuah Khan , Nick Terrell , Will Deacon , Alexandre Ghiti , Conor Dooley , linux-integrity@vger.kernel.org, Palmer Dabbelt , patches@lists.linux.dev, Piotr =?ISO-8859-1?Q?Kr=F3l?= , Ross Philipson , Sami Tolvanen , Song Shuai Subject: Re: [PATCH v2 07/15] efi/libstub: Add generic arch callbacks for DRTM Message-ID: <20261021095155.00003fc2@oss.qualcomm.com> In-Reply-To: <7-v2-989a18390eb1+486-arm64_drtm_jgg@nvidia.com> References: <0-v2-989a18390eb1+486-arm64_drtm_jgg@nvidia.com> <7-v2-989a18390eb1+486-arm64_drtm_jgg@nvidia.com> Organization: Qualcomm X-Mailer: Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32) X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIxMDA2NyBTYWx0ZWRfX5d3pDHpOVoKW GxEIsQ8QP6yDo8iEb+AfQbs/OMr3q+xdWyjzjW3DhPXUtJlHatdeUkPoyTiKJbTC1TakDEfKsmr HamDynfZJO6pdeLVX7tUCG04ZVMVE+0= X-Authority-Analysis: v=2.4 cv=eJaGH3p1 c=1 sm=1 tr=0 ts=6ad8edb7 cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=kj9zAlcOel0A:10 a=660iZSQnnn4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=Ikd4Dj_1AAAA:8 a=EUspDBNiAAAA:8 a=PZHjKiIRVRR-A8qzlogA:9 a=CjuIK1q_8ugA:10 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-GUID: OqgdLH6dPmPKQ0HaCcMHGETaWQi3K6Lx X-Proofpoint-ORIG-GUID: OqgdLH6dPmPKQ0HaCcMHGETaWQi3K6Lx X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIxMDA2NyBTYWx0ZWRfX5JLhxacoEwni yndcxh/E47v4XuNamA3nYk96D2v78smU7LH4H9yotJoENhxOvWtQ0ZEIx5S9x4G2WSg6kg0YjBP xZZ7eZT3qYEfG6mhuNuLCrWy6WtID2iEn3uEBtV5IthFCYdCkea3tnHZBpPGNt3bOA7Yv4YTQL7 LDrs6DD6FG99I3yD160EOvHnc9oGwzbyaQIqVQRQ2dWv6d1asDilcep0kvqJSKTitPD8XC8GefG qqZlyg53j+erwrcuZKT+AJExMKCW4boncpPzGCm4+LpIAOGed6XqUnUDt/CDVTDl9zTsH96y2f3 uCJhkg1nZyaHyN+KXC9w/dvKb4lgwZQnvdyRogjd/dWKe1oo+TPxjrm8yKz8Qc8Ou8cv+laHzYM eTRKgmsCY8r9RK4pXngGZC2w5luKbtiFLWy8+Ckrj5qLUC5J3RFKpILuETQA3qBOpqvuLicAjLY dMLDBiwp+S4pGFOfGKw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-21_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 adultscore=0 spamscore=0 clxscore=1015 bulkscore=0 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610210067 On Fri, 2 Oct 2026 20:31:44 -0300 Jason Gunthorpe wrote: > If the architecture supports an EFI stub launched version of DRTM, it > can select the kconfig and provide the hooks under its architecture > build. > > Have the common code parse a drtm=enforce|auto|off kernel command line > parameter to set the boot behavior. Support commas in the args list since > there will be more options here down the road. > > efi_drtm_prepare() is called before doing any decompression or image > relocation. It should figure out if DRTM is supported, policy-permitted, > and how much memory efi_drtm_get_extra_size() should return. > > The image handling is revised to allocate extra_size at the end of > the normal image. The architecture can use this to store any > information needed for the DRTM flow. It is always contiguous with > Image, which is a requirement of ARM's specification. > > efi_drtm_prepare_launch() is called while still in EFI boot services after > Image is fully prepared in its final location. > > efi_drtm_launch() is called after exiting boot services and must > jump into the kernel through the DRTM flow. If it returns, then the > normal launch is tried (auto mode). > > The extra_size is allocated directly after the Image. Handle the > trivial zboot flow now, and vmlinux in the following patch. > > Signed-off-by: Jason Gunthorpe Seems fine to me. Some of the functions affected have annoyingly complex flows already but this isn't obviously making things worse! Reviewed-by: Jonathan Cameron From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B16AE606A31D for ; Wed, 21 Oct 2026 16:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=HY7U6S65; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=lLveXIaE; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=fGBW0L6P; dkim=neutral header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=AFJIijY/ 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:MIME-Version:References:In-Reply-To: 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=h65GjKK82S9Z1XyH8Grbh6SART9f0bVoHq5bZX9W0YQ=; b=HY7U6S6554p4Fw 9OCDFj4iUXijtyZwOmkiehMTM/kYxx8R4IXHiIx3joPqLaY3Jz/EpBNiLUXj5MbpKZZ2I0b9GCm6Z xwLJHAIYDZPvBMcQdCz89QPcipc4JuyrtoNbKJb/JNExA2qSK5jtR1cOc7SFAnWaasTuT9x9aVqoA 0Z0NHUJ1hoDx0whDb+e+gOhj1FJzW6nu8sMVGqswx8xjMCJD4Z1zcX6K/wDK8iqzQxWYj1VFcwkS+ bzJWgYYXG9VlW76brUSMgsiQsMCxfmbmRyHkCqR6u4y71YsOntUO1JWL8G4EGzJ0kfypfdaW5HGJt gOtmXvhFByjDyWgwdAkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJZXy-0000000CTe3-2Mij; Wed, 21 Oct 2026 16:52:14 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJZXw-0000000CTc8-3azw for linux-riscv@bombadil.infradead.org; Wed, 21 Oct 2026 16:52:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=3Qwd5IeDpUYoKVbi14CXRmp0vCTcpiIpKFvrCb+PUaQ=; b=lLveXIaEZ3NQID68HEuWRdlAdo Gq7xJv5z8NonsID73FiKx+yUDPKNYBBJPB1tSasA3SaLFzJC0+dhMmUYwe4oMaBaNDPPXYWTfb77t v3ASv4XhAxxQGNZ9+8aVXr6WlMa0tyO3Ie9gT8d/LyyfRlL2jNe+0txIxg8FK76ZLL6S28lxKinMs np4RxIdWONb3THexrjFbgCUoIAZboqmJKKXk/YhhXkZmUICxuN29sEA9CNR+vs1adFrcNvQ41Reok b7b/P6tSPMxXizhen5JCNfulgeq4Kz2264VORSrtQfdNR7se32ac/ziNS+lPVYvDSahXSSjr9mjAS Hu7aIl/g==; Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by desiato.infradead.org with esmtps (Exim 4.99.5 #2 (Red Hat Linux)) id 1xJZXt-000000062Y7-4BJS for linux-riscv@lists.infradead.org; Wed, 21 Oct 2026 16:52:11 +0000 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69LFUA4b1481770 for ; Wed, 21 Oct 2026 16:52:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 3Qwd5IeDpUYoKVbi14CXRmp0vCTcpiIpKFvrCb+PUaQ=; b=fGBW0L6PCB1n3raX d/aUhPmemf5kyrJMb2V994vfSQxb8ZW1AUflWoJbMqxkNdQMkyX60NaRpWzwG2ZR dyDNPyramva9fABPmwqppOy5x+y3G2Xjpzu+HJAQ8qTdGMQEDtxA5BLJJps0Gfbc 0RS6PuOx2PIHdwu3bJdDo33JYwkVD1p+N8Eahl+8OsJIsrCWmXNci7Ks5pmN/stb gumg0KOS4MOx3tLDNhDJjMnuFbAjLxfI2H6AicbgZ1SvXdgPAikr3eeNDm/5NzI1 ReUtxdLTy3hBPhb9/wjImsppuSRvPHiJNWyrz7U7vS8e4LyChMQCIA5S5oPDbcDF hGURjw== Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hegs04a4r-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 21 Oct 2026 16:52:07 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-3510d0baf63so2170745eec.1 for ; Wed, 21 Oct 2026 09:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792601527; x=1793206327; darn=lists.infradead.org; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=3Qwd5IeDpUYoKVbi14CXRmp0vCTcpiIpKFvrCb+PUaQ=; b=AFJIijY/DUD2mLNvDDPl9+krQE5P5GYjxU5qARdO5Dg7uOc1MWoYA1hSROS5KJXLZF +ZiO3FUyew9Lzz2Fv8n0s8w5Vl8xsKB1rEFEcdc0I4lEqjKLzqLTWyoxo2uNdDiOb8I+ sgw/c3Q6ohOVvPa9BMT4f8NrP3jemYYjIaFxyQgVM7+JSO3+CIDffsVz/S+KMYW7QZ7H p/Ngb+2/PVbYCM4XBK6LxN0ehWYJ1ehIkGir2Tq5vTcOCQd5yoMCORMs71PlryBAfXlo ebghK52Ek177YBGAjoKztkeVJRHKH7C+WTooDzPc76LcjkQE+yNGP//7j6aEaqEdYXQZ TSSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792601527; x=1793206327; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=3Qwd5IeDpUYoKVbi14CXRmp0vCTcpiIpKFvrCb+PUaQ=; b=ejxLsQKpH3ph6c9dXYDNatWUJpU07d7YvJjMDbo3BvOeG7YHIKY3rPgy0gD5XZnzrT /dAWce2wKayOZNPnUBpBm3Q7qQww6+iNXAEF1EQ5eoXsO/mrvuIPspsVcmSJQ+ZVnXmR 3CGUUSs/8AOgEfXkQkImkV7ytNrGk/9GuflwoUFjFrHz5ySnKwPbTdBR797LEpU+w5cR ZwzZihPgv2eFBkHbKx4Qnk1FOxuvg23F35QdBJsnHY3UtfHhA8XpPN+3gPRT/3CkSx60 +jrkTBkGtyBPziokUaU4FXFOFtcW3c+5X1pSuRKXHi8mexrvYrEgSWyscj/2Pt9Ogjai 0vag== X-Forwarded-Encrypted: i=1; AKwUvBwl/OX6yjp+kjnrWunmDxVtwvD6DezBmJdDnrOFd+PRgFdWuABJE8tn9uYKmThoU7iMELmNczBORYpIHA==@lists.infradead.org X-Gm-Message-State: AFq9FYIyILhx0otGyi7cKP2lnqxdV2AxaZ/dsiG9FH/2dtGP3dN91JwF VeTWTb84S5i7eHedO5kS7qhhHJKHKHGsSQfCLwRythYnuvmN5rgZaYcK2uPnPirF908QUn+p1KT 0vok0qp0HVueVLDeYEGj4DVNsaCcEgqLezhLJpZP97LO7+KmhhOSNarpELJ/MfPxA1jTv29s= X-Gm-Gg: AYBFou2YQXVh8GNCsNIw81/YwGzdq+b2MOwn652LUN4+JQRHvtiRZf6y0BwMgsq88e+ WY/pw2Qa1QbIqyOyH4MQrT++idvjR7qI6DO3hLewhWbwhHVLanI3Wd9YiuxWiVwKAVv86RBPT7L zXTi5UnOjd3yFKPMoEX7IBfh0ckuJOzBW1ddC4mbLztaoetEYtBjz2vYetS4JMgHUJkwOplBNGQ IpuoSXHCZzwe9z6sUOBVBeqpzKowDyhlIzHK/d4qe2h/4iJaNzM5rXT97coORLFHYt2/+MJOHas jkh9QnUDGYc8H0mFiKbrI8SGdKqVeSmAZpYx669D2q5FmXLMdRvG0KmX1LNVu+XLIjGo7qkUEAp 53NG/qg/YJp5QQwaWbLZma4criMiv3KkHVNaxIjo12A== X-Received: by 2002:a05:7300:fb83:b0:359:8492:2107 with SMTP id 5a478bee46e88-3674c43c286mr5506634eec.10.1792601526866; Wed, 21 Oct 2026 09:52:06 -0700 (PDT) X-Received: by 2002:a05:7300:fb83:b0:359:8492:2107 with SMTP id 5a478bee46e88-3674c43c286mr5506599eec.10.1792601526326; Wed, 21 Oct 2026 09:52:06 -0700 (PDT) Received: from localhost (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3674206d1f1sm8700283eec.28.2026.10.21.09.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2026 09:52:06 -0700 (PDT) Date: Wed, 21 Oct 2026 09:51:55 -0700 From: Jonathan Cameron To: Jason Gunthorpe Cc: Alexandre Ghiti , Albert Ou , Ard Biesheuvel , Arnd Bergmann , Catalin Marinas , Jonathan Corbet , David Sterba , Ilias Apalodimas , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Paul Walmsley , Randy Dunlap , Simon Glass , Shuah Khan , Nick Terrell , Will Deacon , Alexandre Ghiti , Conor Dooley , linux-integrity@vger.kernel.org, Palmer Dabbelt , patches@lists.linux.dev, Piotr =?ISO-8859-1?Q?Kr=F3l?= , Ross Philipson , Sami Tolvanen , Song Shuai Subject: Re: [PATCH v2 07/15] efi/libstub: Add generic arch callbacks for DRTM Message-ID: <20261021095155.00003fc2@oss.qualcomm.com> In-Reply-To: <7-v2-989a18390eb1+486-arm64_drtm_jgg@nvidia.com> References: <0-v2-989a18390eb1+486-arm64_drtm_jgg@nvidia.com> <7-v2-989a18390eb1+486-arm64_drtm_jgg@nvidia.com> Organization: Qualcomm X-Mailer: Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32) X-Archived-By: MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=S/NMU4sP c=1 sm=1 tr=0 ts=6ad8edb7 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=kj9zAlcOel0A:10 a=660iZSQnnn4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=Ikd4Dj_1AAAA:8 a=EUspDBNiAAAA:8 a=PZHjKiIRVRR-A8qzlogA:9 a=CjuIK1q_8ugA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIxMDA2NyBTYWx0ZWRfXzmVKRLmvUZuV Wpqos+gNLglRB5MLjldFVQzKsMKOhcu1qzdOxYsVfa2FUjzIhZs7Mp84u+uZyrMRgWj5WVT7GON +LCTVo3wI2a2INsX6HdHOe7bABuXdfES6HGbPzm0eEF45rlRjDrfyIQoJbFJfJ3jOcVkPaEJ9vn TPNlz7i+IA2s+0hsCVOZZYvZvUaTA9MUwro+trhb89LB6R0F1ktV7v14kl1yp+Tp8jceAObcWYN yrDd3FJBVfrhKoAMYq6+eYOHqQpRVIFKLFzhf9nQDoByTNjP4b0DAYCJoOkubDHzXkg1WUsyTOD G9jVGBuRSXC2mn42afqiAguxQntAlVHRzdm8PghRxzG18DS6exS7qDpfWJ+AZDeOfbr3qV7Ivqk n3wQmQ3/hIMECbkAwl6iWUBWWizhGS7ytbb4f48zQspQZ2fDHEkUM4Cv5H4z7xnZfvNQm9J5Cq1 p0KY+JIgdT8S3f80x6A== X-Proofpoint-ORIG-GUID: bfEfCGsvr650JlTuQE_07cHbBNGqu_PR X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIxMDA2NyBTYWx0ZWRfX0QuYRXMAiRSt /CA2ZNfcsD5jGd3XEaud0/jw/DLUJ18sae+z/UZJfmYG522b9N7yBWp2JI0heusURaXbelsPU0+ Q2I2OdPpkuef3njO3vBNWwACyZjk/Js= X-Proofpoint-GUID: bfEfCGsvr650JlTuQE_07cHbBNGqu_PR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-21_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610210067 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261021_175210_360902_33247396 X-CRM114-Status: GOOD ( 21.95 ) X-Spam-Score: -0.9 (/) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Fri, 2 Oct 2026 20:31:44 -0300 Jason Gunthorpe wrote: > If the architecture supports an EFI stub launched version of DRTM, it > can select the kconfig and provide the hooks under its architecture > build. > > Have the common code parse a drtm=enforce|auto|off kernel command line > parameter to set the boot behavior. Support commas in the args list since > there will be more options here down the road. > > efi_drtm_prepare() is called before doing any decompression or image > relocation. It should figure out if DRTM is supported, policy-permitted, > and how much memory efi_drtm_get_extra_size() should return. > > The image handling is revised to allocate extra_size at the end of > the normal image. The architecture can use this to store any > information needed for the DRTM flow. It is always contiguous with > Image, which is a requirement of ARM's specification. > > efi_drtm_prepare_launch() is called while still in EFI boot services after > Image is fully prepared in its final location. > > efi_drtm_launch() is called after exiting boot services and must > jump into the kernel through the DRTM flow. If it returns, then the > normal launch is tried (auto mode). > > The extra_size is allocated directly after the Image. Handle the > trivial zboot flow now, and vmlinux in the following patch. > > Signed-off-by: Jason Gunthorpe Seems fine to me. Some of the functions affected have annoyingly complex flows already but this isn't obviously making things worse! Reviewed-by: Jonathan Cameron _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv