From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 70C9E2367D1 for ; Mon, 15 Dec 2025 07:10:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765782607; cv=none; b=DxaFUUeOlBlSV6shN5VX7lDCd1rVJUGvSdjRpyonJ35Ks5t1QTa/yeBSeSh2XYW4Yru/Vcb6hQEuB6SX+u5liCyhpYwwEOlhZQIF98EAxK9NHGpVxhNfXlN/WC7Zg4OnogQHGQmoTe7iSiAekcqs9fmb9BNHpWpJbaZZhf2sQwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765782607; c=relaxed/simple; bh=FQjh4k3jyqVA7PBtuXbHS2kerI/YfgH7J0362Jxma1M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kCTZw0oEuoPKpsua5/54xtPgGaJk3v4SKbM+qL65Yokkn7DRhrEwh8UD03AwsjovUdOivfSl19fWyRsZoB4vAx9fTBSMcIbMAiFN/ooroE4YVUOegao1FHShpCN0Fwa+KqMWRDZU3NTM90Rk13E/loQhuNunErdGKRsEPk+/77Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Z9FjePqj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=iUco+T1c; arc=none smtp.client-ip=205.220.168.131 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) header.d=qualcomm.com header.i=@qualcomm.com header.b="Z9FjePqj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="iUco+T1c" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BEMr82D2233680 for ; Mon, 15 Dec 2025 07:10:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=xgNTXZ+zJiuxpHyRxeOIDEib JBU942iwPmUc9j5aWDQ=; b=Z9FjePqjDIW0FQVjbMf9QjcR61KvoG2DKQm8xPlc jEsD6TCGDNl7y9wk6tlj8FNXlwCsPvFzSxeRkOaY/IWm5mNBFmBTTHfXjrPq/YTr vxZlk+fL0GHdAKu55EkzA3u+V0aU4CwDL+oGrzysejov4iVz4Ta+EpS9PiGYlOk9 7GQLqOK/FCa+q7HoR8i94OQwz87E/jZu6oytPVW0lWj8IkLpxgonNwEQnvrQ1COo MYIljtzH/JEkmm2Ojvzo09iSF2eY6cQUPm6eK6IT8c8z2u/sKCby29iQhyhjSu63 f3DvS18BeDF94B572hIHct4PninEG+YUyPmT635f2lKcqA== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b11afbhmv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Dec 2025 07:10:02 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-29efd658fadso91763965ad.0 for ; Sun, 14 Dec 2025 23:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1765782602; x=1766387402; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xgNTXZ+zJiuxpHyRxeOIDEibJBU942iwPmUc9j5aWDQ=; b=iUco+T1c1ngU8P35/Aa4lE2AT48Eu3mISSucDoVcE2oeMDuQdTzkqfq5hCAUYK9U/z 7Vi8snKVYINQGq2ICpLEvwx5EXSy4XM/iFFranRbc9xfd4KcUQzovSzgZ+d+F0wQvs+z 8eyoz6fyC3Gub5nnosfv9N6Kl2z4pR+iFnFj0Kd1g4wfpBP2oe0JZhOrrqCHczz7aN9t gzTcB3J2/+5BtlJX6SL+PveC6yfyUgBWU4RKc/rzpx7trKT/DOZBC6TPb5+zRTFQA/BM ydeJxspYdE1Onw0WueSsPPyXr0VFyJDRQMQlRVsT+0Qcdcmn5v3Ay9NlP8HZYmK9IwGm hPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765782602; x=1766387402; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xgNTXZ+zJiuxpHyRxeOIDEibJBU942iwPmUc9j5aWDQ=; b=qVeup2lJg9ScfxEu7e1HJZ0gbkYaILoLaXsTbewQIEgJPtBo66JW+xVz7ZS276lx3h UEF75SJMTYDCrLkUF41ESiAyx/meRg8EMBPfsWKe47A4liMbqnEioRypazPLI3iCmx5k lrizxakdDpkf5jRhaaDcvxzO4JWsGu8sHpkRJdVlqR/tJ++rTkUVxRSR0/BNLKt32jzv 3dAaLtE73Si9yd3hN53Zg9+lm0K7yUc95fzr3uNhc6i/bVzt6CfdeHnHDzVZoBFGJdKe 9NmjGHqRnex/GxfUZrx08UChih1EwLK0/HiM6JS/q7EseWnhtDVhDrXYSi58J98E43Sw qayw== X-Forwarded-Encrypted: i=1; AJvYcCV8ZrY2UCvgxyazLrb2PzCHZsKYkpS+JPT7L5G/CVJLMl8ToixVuY3Sb27Y/x/V5ZBmwWNSG4di5mgOrrg=@vger.kernel.org X-Gm-Message-State: AOJu0YyVhNyLeWmvFSKvMIWdR9vBNSB5VG6K1FJ6SyR+4vcb92KmLZVn zvm9gz5N9CyaHI1BLj0DH6/5PaEiv62EQjlBhOVscLT7axRhuUCNNhwDrswLKh/z6CVi54YrjEX YfXbpyNAN1wEgzAftYf4iX3Mq6c/qkbFmE93reKaZFWw2XEz1aYgmgXp8qRSrHZSejws= X-Gm-Gg: AY/fxX6VMPQPyxQOH4VZjb3e6J3R3scYKZwJ73pENkWIQR1DPqvvtlnAbPc4Y/J5i0X 55sd/4dX/ADPW2O5VezT2SDccslU7mUFkisTiV3Ki+KwTHKvPrs8Peelm4reBn42ClMO2FMa9bD uLKgWZNP60O/4n1dB7q1jLRHhOFjpl7+p2g7nnQpEt5bhp1sOPwoE1IFod5kJYTuG+NKK03q+rX abN/fBVYTMm/qKtGcfMRLNXb9Xn6S1udNk41jOxWrH477gYGhRtKOwuzF4leRTOXuYKJTgE8HOv F0LpVE5ZxdHkqcXhN3yzuERhhZVOoYf5oSTGjGJVwLFcuH9d3Wd++lsFjhCNBpzLES74e8gbeKi 7vNF1Mr2JMS7I6lj+6VvKsOfLQ/aRw6PY93EJX6Tj5tGzCHFB6rK2yr4W X-Received: by 2002:a05:7022:a8c:b0:119:e56b:9581 with SMTP id a92af1059eb24-11f34bd90efmr8355589c88.6.1765782601355; Sun, 14 Dec 2025 23:10:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiYxyp1HunA9yKmRCZRrNyzmwwJf6Q4hj1m/mbGfVJpyDYOC7fCyNkpCJfzvyxoW5C7EdZEw== X-Received: by 2002:a05:7022:a8c:b0:119:e56b:9581 with SMTP id a92af1059eb24-11f34bd90efmr8355576c88.6.1765782600668; Sun, 14 Dec 2025 23:10:00 -0800 (PST) Received: from hu-qianyu-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11f2e2b51b2sm40191402c88.8.2025.12.14.23.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Dec 2025 23:10:00 -0800 (PST) Date: Sun, 14 Dec 2025 23:09:58 -0800 From: Qiang Yu To: Manivannan Sadhasivam Cc: Dmitry Baryshkov , mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Mayank Rana , Baochen Qiang Subject: Re: [PATCH v3] mhi: host: Add standard elf image download functionality Message-ID: References: <20251201-wlan_image_load_skip_512k-v3-1-bedb5498a58a@oss.qualcomm.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-Authority-Analysis: v=2.4 cv=TtDrRTXh c=1 sm=1 tr=0 ts=693fb44b cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=kj9zAlcOel0A:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=A0mC-r1KfrI2UX7ef1wA:9 a=CjuIK1q_8ugA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE1MDA2MiBTYWx0ZWRfXyG0nB50fjIgQ Qf8Dk1f9KXjcfj65yBAAq5vQy/yrsUcabzzIgdMVIUTfrsR65HTE83lJ88Qr8LAy/zh3M5D/hju uIb2HuzABEM05HoIYKZvpcOPGSdrAytW6iRJzdwkRJbvWqjE/2MMjNadib5EF8uvlc6qBgxdX8E bprF6uHZL+7CwNc7fK6th0J4JL+pQntv5g28qxTr6Xd7+k17PcdBD0ClvgMv3sHtYTiviD7prbu kTblXjCqO1QBCQ+vY4Y69AguUWry7/E1Wbd2J5GVyfHM387HUqEYLTXqvRjg2T1gtK3ka9dp8Ca 5GZHwPQbIixhL6ouJJLCYJKxfZTl9X7yuqOIDhdIY1Ta4zz8MH8zv5e/Jm9UAu27KoZspgU6fMe QWLXVJtbSguQ8AeeJjbUGyMl+WsjUA== X-Proofpoint-GUID: 4dPFKx0fjzMKL2i7IlxY73yX6E9_FCXM X-Proofpoint-ORIG-GUID: 4dPFKx0fjzMKL2i7IlxY73yX6E9_FCXM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-14_07,2025-12-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 adultscore=0 impostorscore=0 malwarescore=0 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512150062 On Sat, Dec 13, 2025 at 11:21:11AM +0900, Manivannan Sadhasivam wrote: > On Fri, Dec 12, 2025 at 09:24:06PM +0200, Dmitry Baryshkov wrote: > > On Fri, Dec 12, 2025 at 10:07:01AM +0900, Manivannan Sadhasivam wrote: > > > On Thu, Dec 11, 2025 at 03:57:54PM +0200, Dmitry Baryshkov wrote: > > > > On Thu, Dec 11, 2025 at 01:37:12AM -0800, Qiang Yu wrote: > > > > > On Wed, Dec 10, 2025 at 12:57:11AM +0200, Dmitry Baryshkov wrote: > > > > > > On Sun, Dec 07, 2025 at 10:35:26PM -0800, Qiang Yu wrote: > > > > > > > On Sat, Dec 06, 2025 at 01:25:34PM +0200, Dmitry Baryshkov wrote: > > > > > > > > On Mon, Dec 01, 2025 at 06:33:15PM -0800, Qiang Yu wrote: > > > > > > > > > From: Mayank Rana > > > > > > > > > > > > > > > > > > Currently, the FBC image is a non-standard ELF file that contains a single > > > > > > > > > ELF header, followed by segments for SBL, and WLAN FW. However, TME-L > > > > > > > > > (Trust Management Engine Lite) supported devices (eg. QCC2072) requires > > > > > > > > > separate ELF headers for SBL and WLAN FW segments due to TME-L image > > > > > > > > > authentication requirement. > > > > > > > > > > > > > > > > > > Current image format contains two sections in a single binary: > > > > > > > > > - First 512KB: ELF header + SBL segments > > > > > > > > > - Remaining: WLAN FW segments > > > > > > > > > > > > > > > > > > The TME-L supported image format contains two sections with two elf > > > > > > > > > headers in a single binary: > > > > > > > > > - First 512KB: First ELF header + SBL segments > > > > > > > > > - Remaining: Second ELF header + WLAN FW segments > > > > > > > > > > > > > > > > > > Download behavior: > > > > > > > > > - Legacy: 1. First 512KB via BHI (ELF header + SBL) > > > > > > > > > 2. Full image via BHIe > > > > > > > > > > > > > > > > > > - TME-L: 1. First 512KB via BHI (First ELF header + SBL) > > > > > > > > > 2. Remaining via BHIe (Second ELF header + WLAN FW segments) > > > > > > > > > > > > > > > > > > Add standard_elf_image flag to mhi_controller_config to indicate TME-L > > > > > > > > > supported image format. When set, MHI skips the first 512KB during WLAN FW > > > > > > > > > download over BHIe as it is loaded in BHI phase. > > > > > > > > > > > > > > > > What is standard about it? > > > > > > > > > > > > > > The TME-L requires standard elf image format which includes single EFL > > > > > > > header and WLAN FW segment. > > > > > > > > > > > > > > The "standard_elf_image" seems misleading. Since the new image format is > > > > > > > required for TME-L image authentication, how about using > > > > > > > tme_supported_image? > > > > > > > > > > > > Just elf_image? > > > > > > > > > > Is it too generic for this specific use case. Current image format also > > > > > contains elf header. > > > > > > > > upload_elf_image? > > > > > > > > > > Nope. What does 'upload' even mean here? The 'TIS and ELF' spec v1.2 clearly > > > defines that an ELF executable can have only one ELF header. So I'd prefer > > > 'standard_elf_image' to differentiate it from the non-spec-conformant ELF image > > > used previously. > > > > What kind of ELF image was used previously? Could you please explain > > what do 'First ELF header' vs 'Second ELF header' mean here? > > > > I don't have the details of it, but Qiang should be able to explain. But AFAIC, > that was a non-standard ELF image and the new one is going to be spec > conformant. > Previous image format: ELF header + SBL segments + WLAN FW segments The TME-L supported image format: First ELF header + SBL segments + Second ELF header + WLAN FW segments As per 'TIS and ELF' spec v1.2 Mani mentioned, the previous image format is also standard elf image. But it doesn't meet the requirement of TME-L because we need separate elf header for SBL and WL FW for TME-L authentication. So the commit message stating "Currently, the FBC image is a non-standard ELF file that contains a single ELF header, followed by segments for SBL, and WLAN FW" is not correct and standard_elf_image is not accurate. Can we avoid saying anything about standard in commit message? Flags eg. separate_elf_header and tme_supported_image are more accurate. - Qiang Yu