Page MenuHomeFreeBSD

[mips/broadcom] set sysctl "hw.model" by SoC ChipCommon ID
ClosedPublic

Authored by mizhka on Oct 20 2017, 7:28 AM.
Tags
Referenced Files
Unknown Object (File)
Jan 17 2024, 10:20 PM
Unknown Object (File)
Dec 20 2023, 11:11 PM
Unknown Object (File)
Dec 20 2023, 5:48 AM
Unknown Object (File)
Dec 15 2023, 4:39 AM
Unknown Object (File)
Dec 12 2023, 10:37 AM
Unknown Object (File)
Nov 24 2023, 7:04 AM
Unknown Object (File)
Nov 7 2023, 12:43 PM
Unknown Object (File)
Oct 6 2023, 11:41 AM
Subscribers

Details

Summary

Hi,

This is small patch to set "hw.model" by SoC ChipCommon ID. On BCM4718 it will be BCM4716, because 4716 is core for 4716,4717 & 4718.

It's useful in case of dmesg is already rotated, but you don't remember SoC model.

Test Plan

Tested on Netgear WNR3500L (BCM4718) and Asus RT-N53 (BCM5357).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Oct 21 2017, 11:41 AM
landonf requested changes to this revision.Oct 21 2017, 7:10 PM
landonf added inline comments.
sys/mips/broadcom/bcm_machdep.c
406

Is bhnd_format_chip_id() usable here?

This revision now requires changes to proceed.Oct 21 2017, 7:10 PM
sys/mips/broadcom/bcm_machdep.c
406

This is broadcom machdep, so I don't want implicit dependence from kernel on BHND. Logic is simple and small, so copy-paste of code looks better than compile dependence. BTW, BHND can be loaded as module, so dependence is not good.

sys/mips/broadcom/bcm_machdep.c
406

FWIW, the kernel (via broadcom machdep) already have a number of hard dependencies on BHND for PMU/PWRCTL support, device enumeration, and NVRAM parsing support. It'd be rather difficult to separate the two without reproducing a lot of the bhnd(4) platform support code that is common across MIPS/ARM/Wi-Fi targets.

sys/mips/broadcom/bcm_machdep.c
406

On DSL/cable platforms there is no BHND and CFE, but chipcommon is same. I agree that as of now there is hard points to avoid bhnd, but it may be worth to copy chipid printing suitable for all broadcom cases.

P.S. Small correction: DSL modems are CFE based, but there is no bcma here. AFAIK Old ones uses siba, but new ones are more FTD friendly. Cable modem has strangle bootloader, not CFE

landonf added inline comments.
sys/mips/broadcom/bcm_machdep.c
406

Yeah, the DSL/Cable modems seem to be odd ducks. Later DSL and cable modem SoCs appear(ed) to use what Broadcom calls "ubus", which is seemingly nearly (but not quite) identical to BCMA. They seem to be moving away from that in the more recent ARM DSL/Cable SoCs? (I haven't investigated in significant detail).

I'd honestly still prefer using bhnd_format_chip_id here, but it doesn't seem worth sweating over.

This revision is now accepted and ready to land.Oct 26 2017, 6:51 PM