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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45A90C433FE for ; Thu, 6 Jan 2022 11:00:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238222AbiAFLAA (ORCPT ); Thu, 6 Jan 2022 06:00:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238102AbiAFK77 (ORCPT ); Thu, 6 Jan 2022 05:59:59 -0500 Received: from mail.marcansoft.com (marcansoft.com [IPv6:2a01:298:fe:f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3C9C061245; Thu, 6 Jan 2022 02:59:59 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 1413A41F5D; Thu, 6 Jan 2022 10:59:47 +0000 (UTC) Message-ID: Date: Thu, 6 Jan 2022 19:59:44 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH v2 03/35] brcmfmac: firmware: Handle per-board clm_blob files Content-Language: en-US To: Arend van Spriel , Kalle Valo , "David S. Miller" , Jakub Kicinski , Rob Herring , "Rafael J. Wysocki" , Len Brown , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Dmitry Osipenko Cc: Sven Peter , Alyssa Rosenzweig , Mark Kettenis , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Pieter-Paul Giesberts , Linus Walleij , Hans de Goede , "John W. Linville" , "brian m. carlson" , Andy Shevchenko , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com References: <20220104072658.69756-1-marcan@marcan.st> <20220104072658.69756-4-marcan@marcan.st> <955f3b68-f1aa-767c-2539-7b8362372a60@broadcom.com> From: Hector Martin In-Reply-To: <955f3b68-f1aa-767c-2539-7b8362372a60@broadcom.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2022/01/06 19:19, Arend van Spriel wrote: > On 1/4/2022 8:26 AM, Hector Martin wrote: >> Teach brcm_alt_fw_paths to correctly split off variable length >> extensions, and enable alt firmware lookups for the CLM blob firmware >> requests. >> >> Apple platforms have per-board CLM blob files. > > Are you sure? I am not involved in development for Apple platforms, but > in general we build a CLM blob specific for a chip revision. As always > with the blobs they are created at a certain point in time and that is > mostly why you need another one for a newer platform. Apple tends to do > things a bit different so you could be right though. Anyway, despite my > doubts on this it does not change the need for per-board firmware files. Yup, I'm sure. The 2021 MacBook Pro 14" and the MacBook Pro 16", both using BCM4387 and both released simultaneously, have different CLM blobs; they're even a significantly different size. Running `strings` on the files yields: CLM DATA Oly.Maldives 1.61.4 ClmImport: 1.63.1 v3 Final 210923 CLM DATA Oly.Madagascar 1.61.4 ClmImport: 1.63.1 v4 Final 210923 The data shows significant differences and since the file format is opaque I can't know what's going on. Even if it's safe to use one file for both, unless there is some way for me to programmatically identify this fact so I can incorporate that logic into my firmware copier, I would much rather just keep them separate like Apple does. > So all firmware files are attempted with board-specific path now. Yes, I figured I'd keep things uniform. Technically for Apple platforms the CLM blob and firmware are only per-board and possibly per-antenna (they don't need the module variants, those are for nvram only), but there's no real harm in unifying it and using the same firmware naming alt path list for everything. -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub