lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aW4QixwAJHaHWBBc@lore-desk>
Date: Mon, 19 Jan 2026 12:07:55 +0100
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Christian Marangi <ansuelsmth@...il.com>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, netdev@...r.kernel.org,
	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next v2 1/2] dt-bindings: net: airoha: npu: Add
 EN7581-7996 support

> > Airoha folks reported the NPU hw can't provide the PCIe Vendor/Device ID info
> > of the connected WiFi chip.
> > I guess we have the following options here:
> > - Rely on the firmware-name property as proposed in v1
> > - Access the PCIe bus from the NPU driver during probe in order to enumerate
> >   the PCIe devices and verify WiFi chip PCIe Vendor/Device ID
> > - During mt76 probe trigger the NPU fw reload if required. This approach would
> >   require adding a new callback in airoha_npu ops struct (please note I have
> >   not tested this approach and I not sure this is really doable).
> 
> What i'm wondering about is if the PCIe slots are hard coded in the
> firmware.  If somebody builds a board using different slots, they
> would then have different firmware? Or if they used the same slots,
> but swapped around the Ethernet and the WiFi, would it need different
> firmware?

As pointed out by Benjamin, the NPU is a generic Risc-V cpu cluster and it is
used to move packets from/to ethernet DMA rings to/from WiFi DMA rings without
involving the host cpu (similar to what we have for MTK with WED module).
I think the PCIe slot info is not necessary for the NPU to work since it is
configured by ethernet (airoha-eth) and wireless drivers (mt76) with DMA ring
addresses to use via the airoha npu ops APIs, NPU just moves data between the
DMA rings according to my understanding.

> 
> So is the firmware name a property of the board?

We need to run different binaries on the NPU based on the MT76 WiFi chip
available on the board since the MT76 DMA rings layout changes between MT76 SoC
revisions (e.g. Egle MT7996 vs Kite MT7992). In this sense, I agree, the
firmware name is a board property.

> 
> If the PCIe slots are actually hard coded in the NPU silicon, cannot
> be changed, then we might have a different solution, the firmware name
> might be placed into a .dtsi file, or even hard coded in the driver?

IIUC what you mean here, it seems the solution I proposed in v1 (using
firmware-name property), right?
In this case we can't hard code the firmware name in the NPU driver since
we can't understand the MT76 WiFi chip revision running on the board at
the moment (MT76 would need to provide this info during MT76 probe,
please take a look to the option 3 in my previous email).

> 
> > What do you think? Which one do you prefer?
> 
> I prefer to try to extract more information for the Airoha folks. What
> actually defines the firmware? Does the slots used matter? Does it
> matter what device goes in what slots? Is it all hard coded in
> silicon? Is there only one true hardware design and if you do anything
> else your board design is FUBAR, never to be supported?

I think the firmware is defined by the board hw configuration (e.g. MT76
SoC revision) and not by the specific PCIe slot used.
I do not think we have these info hardcoded in the silicon since NPU is a
generic RiscV cpu (this has been confirmed by airoha folks).

Regards,
Lorenzo

> 
>      Andrew

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ