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 E351E606A32C for ; Wed, 2 Dec 2026 21:34:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=GSmmmuI5; dkim=fail reason="signature verification failed" (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=gvGkwi2S; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=aUMRln6U 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-Unsubscribe-Post:List-Owner; bh=aADaGahtl2f9kCESUkiOcBi0R6S4GSsQx7nDYLyNIYo=; b=GSmmmuI5eWADxe5l/RKe1GVBke JbXOPU2jUWCinDpFTaQVJ7Purqjp4oHJbK77mWMy44ocHGyG7mlWhFNbFT1C2x4351DB7ek9peLce tubnUzXR1+YjHJ136T1dELn2SDj77IdNTDIg/mjvDwLLlozBXPghyTwwEbnofJJnhwq61QoRUEIZW 9ShD4eMFkB9sU0QjLA3V3whqcGLIKxEzaNt5SuwESyavoP/5jl08/izWeeiLMQU2snTSQz8OkXgCT QUMKI82ywhdNopxp8T2FqD0AP9/jxglGgs8TlFw79kFlTXzS1xSFSMec6Q5rG2QqbigoMI3iTv//I lxSCvgmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYryC-0000000CqB0-13l5; Wed, 02 Dec 2026 21:34:32 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYry8-0000000CqA7-3o6A for linux-riscv@lists.infradead.org; Wed, 02 Dec 2026 21:34:30 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B2LH7422211886 for ; Wed, 2 Dec 2026 21:34:28 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= omqYWhVqMOT50g1k6P+qZSjcEmapQunIcBNENfkNHQM=; b=gvGkwi2SR3qzO3WZ t1FnAT0htujBdlcOcrcWa8gI5WW+pCDOW8KUPk3NzsAjMenWbR5nQnjUYTeWZ2MZ M7kUP1ecLoTJk0eWaG6p7ChTB9ncssUYgVyGq0uDXikGwuAaUPkEX6kOJ4UGKtXD OlNGHru8wTg9FugIzFERTyGaYwXzK7Hw8av0ugjSBanzhiM5Hw4jjnp6DaXXCWMG /EtZPzBbun9qI94fAQjwxSsyXsV+41D8KQMOjwC+1C3sao+aV86qAF6YYL6QqgxW lq3lGVW1I+euUYIBneHIPPXH8nZ87jSwBoWql9DtUL0WDiB0JjGI3O0kHvvQNEsH 21FEgg== 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 4jaj432eqn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 02 Dec 2026 21:34:28 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-386b8624cf7so3408334eec.1 for ; Wed, 02 Dec 2026 13:34:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796247267; x=1796852067; 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=omqYWhVqMOT50g1k6P+qZSjcEmapQunIcBNENfkNHQM=; b=aUMRln6URzaxM11tVcqQovDaP5gJxzA3HdS4I6za3dPpYU7ZThpEwmdvv/bEk+Q3p2 pH810jBE/CaRizk8oynq/HKukHpQ8W0fngmFNso0D/VGPQF8lPIR6Dj0vTAXsoX4WRpi qyGdYwXkgfPxSQyFHvO32rSfHPhHUvLBqSVo4/HiYmg4dDVGgA8juljazgySWo6XCsC2 40ZLXKltaznC+WsJB8dJFDx10XLxu/LqS1wcomaKVqy+wvlJVjTIj+mgbcfjRh/Sj2HB 3eHresGNna1CBkg7LdvUgjuvxH/6OmMEqbt/DGGkbgxv9unY9P8XaEcvbNXwzco6/OJS 370A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796247267; x=1796852067; 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=omqYWhVqMOT50g1k6P+qZSjcEmapQunIcBNENfkNHQM=; b=lEiM5tla3Wxmr5PBQICESVnpDaMxwTVuwW//I/ZaN+84JUU7wgjywORhvqMUMPfSDo eHM35L8CePTUIL5tSHCb/ppMCQ1aFztULXt3BbQLYUlpxBakNgZC9fGZ6cFv5P2GebJ9 DIBCNSyhPOIIzWExUm9PJzvGLoKMMwUlnGgUJ//ueZ9nz8UVR8XXz0sH07rHmz2xa+bX j5evZQVomT+RkTdpm/XHdBtPiamv/MqjY1Fl73jVhwe0yYQyqDbQn3ghNjpTArvHFHOc MszNWtTjHinquiHiWUCWRHF1LkEobgwkbpzzZ9PJEYsnEHuDF0LLo5otbwsqehTuRgvH +HTg== X-Forwarded-Encrypted: i=1; AL+hErGzHQQx1xsdDnr6qfBovcj5utGne89+VW68+RiH83KJqmWitiMbyTONB8leRPxJoa0P6QUiJ3WtZ58kOA==@lists.infradead.org X-Gm-Message-State: APuU4Z+zJT/V5KShUBTU4Ue6bVcOV0ivoDixzm6rr3LGIyVB3Rl2ku2C iYqt7NqLsmDhqFYlCSxubEvvZokvZvvUACl0IyeEuZx3yc0ESBRRIyuSD97bqYGwXuAhA0fb8D+ YCXm75Nm5XBq5x36YZkTBuN18KADo3fRjDzp5oBQNOjzXSD0goOs6HH3v6nPOpsLcdTgfKT4= X-Gm-Gg: AZFdTZfCB+pX2zhPolEofJ1Lk8l00vs2EZ55xuydIvC9EDmsNTDjYSSj3IBu8k3shzq 5wa2tJ10RGfXBECezBQoVE5eJLaog1RaK6hpmawuiFvMRQBlmumIBtWszxPP7J9czlNtSye3mkF 4UpQfm7C8PpGpzHICJ2URKivb2J1tGYFoKgRq1RHdpi6bbBN6NXHHvkJwhMk1z4vNPG0E2hT7+P xpcaiTS03yVWqLZsLjTJkyTgMwxXwilE2U1kSgDx6UHJ3ySI51azIGeyH39YZ/WtXtMF8AZJrHx Xe1ekGpMi99hL13d13eg6Oo4AebBEV4otbXYa4AiB1EXivxnuU1rsNFAGUBQlp/9RPV1e5Yf3CT vy5LaQf4tIUinjIlQHCwHgub3Vhvx0A9fOa8JeW8ydVIdY24azR5UoilenT4EDlzcuF2Hs3Fjs8 RGKcaOTwGJxwQLOnX6HWWTo/7VFM8= X-Received: by 2002:a05:7300:d108:b0:386:c6dd:2616 with SMTP id 5a478bee46e88-386c6dd29ffmr26366022eec.41.1796247267421; Wed, 02 Dec 2026 13:34:27 -0800 (PST) X-Received: by 2002:a05:7300:d108:b0:386:c6dd:2616 with SMTP id 5a478bee46e88-386c6dd29ffmr26366007eec.41.1796247266979; Wed, 02 Dec 2026 13:34:26 -0800 (PST) Received: from localhost (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-386f6651e2asm47454691eec.27.2026.12.02.13.34.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 13:34:26 -0800 (PST) Date: Wed, 2 Dec 2026 13:34:21 -0800 From: Jonathan Cameron To: Jason Gunthorpe Cc: Alexandre Ghiti , Albert Ou , Ard Biesheuvel , Catalin Marinas , Jonathan Corbet , Ilias Apalodimas , Justin Stitt , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-riscv@lists.infradead.org, llvm@lists.linux.dev, Mark Rutland , Bill Wendling , Nathan Chancellor , Nick Desaulniers , Palmer Dabbelt , Paul Walmsley , Randy Dunlap , Shuah Khan , Will Deacon , linux-integrity@vger.kernel.org, patches@lists.linux.dev, Piotr =?ISO-8859-1?Q?Kr=F3l?= , Ross Philipson Subject: Re: [PATCH v3 11/11] efi/arm64: Implement ARM64 DRTM in the stub Message-ID: <20261202133421.00005177@oss.qualcomm.com> In-Reply-To: <11-v3-22d1a1eb7d2e+17de-arm64_drtm_jgg@nvidia.com> References: <0-v3-22d1a1eb7d2e+17de-arm64_drtm_jgg@nvidia.com> <11-v3-22d1a1eb7d2e+17de-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-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDA4NSBTYWx0ZWRfXw6kBDBewSn6c wWGKCvMiWcRekCYXWhhxk6Tqxk05C1xbRBCatT6qDJqL4640ETc4b34P7VoV7XKsMa8Rbv/jiCk azPZ33oQuGg8JNt+aUSAuGL91ainaQrnaoJftSsNVtZ5V3XhBCbAq5j6z6aGnO2dQca6I7iYyEX yKxo4FcoNlHvBpvIONRRXdJTD8bGeWJyAQQ78eGjMlAfz1mSJeBhAg9crGA/XMiiixtvNfSmM8e vzmsnNIm58KaGyKg+ahw2XfJVr354HGJ1nhXndaYeupRYZwTGYf5zIeytI/1Qu6dhCM5U93YuY2 OdT2w0gGodixq0paRdVnYPU89u4BfkYfEhPlE5mNT3G8Ghl3a5XCHxhlnihA6jw4LXRGSG5nssH gl7rhYQW22aFOm4GS5BY/KpbOn9o+K6tUq/D1jhFH094xNmM04eP3iHKCNb37o7/tWxPI6ZsPuj 9cEoTZOvSZjVE7eDr2w== X-Authority-Analysis: v=2.4 cv=X7nHu2Te c=1 sm=1 tr=0 ts=6b108ee4 cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=kj9zAlcOel0A:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=Ikd4Dj_1AAAA:8 a=EUspDBNiAAAA:8 a=RkTgK740hJReAd0VgacA:9 a=CjuIK1q_8ugA:10 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDA4NSBTYWx0ZWRfX1Sqih6w+eAx7 FATEAJhuRg0iFFuE9fBVkdVSpS9ex+Prz3xdwffcGLtFYB366acyekutB9i8wELZ3ruZVR5LYBj SSJHpdC/O+tSEtL4nHd0urNW+RiCYik= X-Proofpoint-GUID: h15t2k3z3w9ftVgr6hOZ1xNPQRT6HEET X-Proofpoint-ORIG-GUID: h15t2k3z3w9ftVgr6hOZ1xNPQRT6HEET 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-12-02_06,2026-12-02_07,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 adultscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 spamscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020085 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_133428_992023_F5508380 X-CRM114-Status: GOOD ( 23.06 ) X-Spam-Score: -2.8 (--) 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.4 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, 20 Nov 2026 13:52:04 -0400 Jason Gunthorpe wrote: > Provide an implementation of the CONFIG_EFI_STUB_DRTM protocol for ARM64 > DEN0113 >= v1.1. > > First, it queries the FW for support and collects all the > information. This is needed to compute the extra_size, which comes > from FW reporting how much memory it needs during the launch for the > DLME Data and DCE-owned data. The generic stub ensures there is > trailing memory after Image for this. > > Then the DRTM_PARAMETERS launch structure is computed using the > offsets in the efi_info. > > Finally, the stub does ExitBootServices and calls the actual launch. > > The feature discovery process is deliberately fairly verbose to help > debug any FW weirdness in the field. Enable it with efi=debug > > It looks something like: > > EFI stub: DRTM: interface version 1.4 > EFI stub: DEBUG: DRTM: TPM algorithm 0xc, TPM hashing unavailable, PCR schemas 0x1 > EFI stub: DEBUG: DRTM: minimum DLME data 73728 bytes, Normal-world DCE 0 bytes > EFI stub: Decompressing Linux Kernel... > EFI stub: Generating empty DTB > EFI stub: Exiting boot services... > EFI stub: DEBUG: DRTM: will launch, selected launch features 0x0 > [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x000f0510] > > Eventually the launch'd kernel is going to require built in crypto > libraries that match what the FW is using so it can validate some of the > information left behind during early boot. Refuse to launch if these are > not built in and build in the most common ones from the ARM64_DRTM > kconfig. > > Signed-off-by: Jason Gunthorpe Naturally I focused on the important stuff - see below. Reviewed-by: Jonathan Cameron > + > +efi_status_t efi_drtm_prepare_launch(const struct efi_image_info *image_info, > + unsigned long fdt_addr) > +{ > + struct arm64_drtm_handoff *handoff = > + efistub_drtm_handoff(image_info); That is under 80 chars on one line. > + struct arm_drtm_parameters *params; > + unsigned long measured_offset; _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv