Repository navigation
ambarella: detect the SoC from the machine string - #267
Conversation
An Ambarella camera got "SoC not recognised": these kernels list no UART in /proc/iomem, and manufacturers[] had no row for what /proc/cpuinfo names (#266, an S3L in an Amcrest IP4M-1026E). Every machine in the vendor kernel is called "Ambarella <soc> (Flattened Device Tree)", so the name comes from there. S3L and S3LM share the string. The exact part is a word the DSP firmware writes, reachable only through /dev/iav, so the report stops at S3L. Sensor addresses are the defaults of the SDK's VIN drivers. AR0521 is left out: it shares 0x6C with OV4689, and the onsemi probe runs first. Total RAM stays what the kernel sees. IAVMEM in the boot log ends at 512 MiB on a camera reported as 256 MiB, and Amboot computes it from a compile-time DRAM_SIZE, so it proves nothing. The DRAM config register is not in the programming manual. Only the parser is tested, in ambarella_test, with strings from the issue and the kernel source. It has not run on a camera.
PR Summary by QodoDetect Ambarella SoCs from the CPU machine string
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1.
|
Review of #267. No caller passes a zero outlen, but the header exports the parser and the guard is one line. The comment records that leaving chip_generation at 0 is deliberate, since ipctool has no Ambarella tables. CLAUDE.md now pins the execve() note to the one kernel it was seen on rather than to Dahua in general.
Refs #266. This is left open until the reporter has run it on the camera.
An Ambarella S3L camera gets "SoC not recognised": the kernel lists no UART in
/proc/iomem, andmanufacturers[]has no row forAmbarella. This adds a small HAL that reads the SoC name from/proc/cpuinfoand sets sensor addresses for the probe.What it reports:
S3L,S2L,A5Sand so on, fromAmbarella <soc> (Flattened Device Tree). S3L and S3LM share that string.Left out on purpose:
/dev/iav. Opening that on a live camera is too intrusive for a report.IAVMEMends at 512 MiB on a camera reported as 256 MiB. Amboot computes it from a compile-timeDRAM_SIZE, and the DRAM config register is not in the programming manual.__arm__only.Tested:
ambarella_test,anyka_test,longse_test,reginfo_test,sensors_test,hal_hisi_testandtools/test_pipeline.sh.ipctoolandipcinfo, andipcinfowith-DIPCHW_VENDORS=ambarella.Not tested:
/dev/i2c-*on Dahua's kernel is unconfirmed, and the sensor probably needs the vendor video stack running./procfiles. Only the parser is tested; the vendor match rests on the issue's own error line, which shows ipctool readingAmbarella.ipcinfosize budget.