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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <03555d09-e506-4f48-a073-b06b63e1af4a@ti.com>
Date: Thu, 12 Jun 2025 10:49:17 +0530
From: MD Danish Anwar <danishanwar@...com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Meghana Malladi <m-malladi@...com>, Paolo Abeni <pabeni@...hat.com>,
        Eric
 Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew+netdev@...n.ch>, <linux-kernel@...r.kernel.org>,
        <netdev@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
        <srk@...com>, Vignesh Raghavendra <vigneshr@...com>,
        Roger Quadros
	<rogerq@...nel.org>
Subject: Re: [PATCH net-next] net: ti: icssg-prueth: Read firmware-names from
 device tree

Hi Jakub

On 12/06/25 5:32 am, Jakub Kicinski wrote:
> On Tue, 10 Jun 2025 10:55:01 +0530 MD Danish Anwar wrote:
>> Refactor the way firmware names are handled for the ICSSG PRUETH driver.
>> Instead of using hardcoded firmware name arrays for different modes (EMAC,
>> SWITCH, HSR), the driver now reads the firmware names from the device tree
>> property "firmware-name". Only the EMAC firmware names are specified in the
>> device tree property. The firmware names for all other supported modes are
>> generated dynamically based on the EMAC firmware names by replacing
>> substrings (e.g., "eth" with "sw" or "hsr") as appropriate.
> 
> Could you include an example?

Sure. Below are the firmwares used currently for PRU0 core

EMAC: ti-pruss/am65x-sr2-pru0-prueth-fw.elf
SW  : ti-pruss/am65x-sr2-pru0-prusw-fw.elf
HSR : ti-pruss/am65x-sr2-pru0-pruhsr-fw.elf

If you look closely you'll see the names of all three firmwares are same
except for the operating mode.

In general for PRU0 core, firmware name is,

	ti-pruss/am65x-sr2-pru0-pru<mode>-fw.elf

Since the EMAC firmware names are defined in DT, I am reading those
directly and for other modes just swapping mode name. i.e. eth -> sw or
eth -> hsr.

I will add this example in commit msg in next revision.

> 
>> This improves flexibility and allows firmware names to be customized via
>> the device tree, reducing the need for code changes when firmware names
>> change for different platforms.
> 
> You seem to be deleting the old constants. Is there no need to keep
> backward compatibility with DT blobs which don't have the firmware-name
> properties ?

ICSSG-PRUETH driver is only supported by AM65x and AM64x and both the
DTs have the firmware name property. So I don't think there is any need
to maintain the older hard coded values.

AM65x -
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso#n28:~:text=pru2_1%3E%2C%20%3C%26rtu2_1%3E%2C%20%3C%26tx_pru2_1%3E%3B-,firmware%2Dname,-%3D%20%22ti%2Dpruss/am65x

AM64x -
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/arch/arm64/boot/dts/ti/k3-am642-evm.dts#:~:text=tx_pru1_1%3E%3B-,firmware%2Dname,-%3D%20%22ti%2Dpruss

Let me know if this is okay.

-- 
Thanks and Regards,
Danish

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ