You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking the unification of the MMZ allocator selection, CMA reservation, and OSAL module-loading conventions across every HiSilicon / Goke platform supported by openhisilicon + OpenIPC/firmware. Companion to #58 (ISP) and #82 (sensors).
The hi3516cv500 family was just brought in line with the hi3516ev200/ev300 reference shape — kernel-side CMA fallback, HIGHMEM disabled, 256 MiB CMA, open_* module naming, modprobe driven from load_hisilicon. The same modernisation applies to the rest of the family tree, with a couple of legacy V1/V2A platforms that need a different (mmz/) approach.
The pattern was established across these landed PRs:
OpenIPC/linux#37 — kernel-side hi_cma.c fallback: when load_hisilicon doesn't pass an mmz= zone in cmdline, synthesise one from dma_contiguous_default_area. Lets stock OpenIPC firmware with no U-Boot tweaks sysupgrade cleanly into the new world.
Numbers from current master (firmware) / upstream-patches+vendor branches (openipc/linux) / master (openhisilicon) on 2026-05-07.
Platform
Gen
Module naming (load_hisilicon)
HIGHMEM
CMA size
hi_cma fallback
mmz_allocator branches
Notes
hi3516cv500
V3.5
✅ modprobe open_* (40)
✅ off
✅ 256 MiB
✅ in vendor 4.9
hisi+cma
Reference shape (this PR series)
hi3516ev200
V4
✅ modprobe open_* (36)
✅ off
0 (DT-cma)
❌ needs port
hisi+cma
Original reference; no fallback patch yet
hi3516ev300
V4
(shares ev200 osdrv)
✅ off
0 (DT-cma)
❌ needs port
hisi+cma
hi3516cv300
V3
❌ insmod legacy (33)
❌ on
(none set)
❌ needs port
hisi+cma
9 sensors source-built, modules still vendor-named
hi3519v101
V3A
❌ insmod legacy (38)
❌ on
16 MiB
❌ needs port
hisi only
hi3516av200
V3A
(shares v101)
❌ on
16 MiB
❌ needs port
(n/a)
hi3516cv200
V2
❌ insmod legacy (28)
✅ off
(none set)
❌ needs port
hisi only
hi3516av100
V2A
❌ insmod legacy (26)
✅ off
(none set)
n/a — no hi_cma
hisi only
Standalone mmz/, no CMA path
hi3516cv100
V1
❌ insmod legacy (27)
✅ off
(none set)
n/a — no hi_cma
hisi only
Standalone mmz/, no CMA path
hi3536dv100
DVR
❌ insmod legacy (2)
✅ off
(none set)
n/a
(none)
hi3520dv200
DVR
❌ insmod legacy (1)
✅ off
(none set)
n/a
(none)
Just landed (#2065), uses minimal load script
Counts: "modprobe open_*" / "insmod legacy" reflect the count of active (uncommented) module-loading lines in general/package/hisilicon-osdrv-<chip>/files/script/load_hisilicon.
What "unified" means per dimension
1. Module naming → open_* everywhere
Goal: hisilicon-opensdk.mk installs verbatim from $(@D)/kernel/open_*.ko into $(KMOD_DST); no rename to hi_*/hi3516cv500_*/sys_config.ko. Matches what was done for cv500 in firmware#2064.
Why: load_hisilicon can drive everything via modprobe open_X (the upstream convention) instead of legacy insmod hi_X.ko filenames; the rmmod side already used open_* names in many scripts and silently no-op'd because nothing matched.
Goal: # CONFIG_HIGHMEM is not set + CONFIG_CMA_SIZE_MBYTES=256 in every *.generic.config for boards with ≥ 256 MiB RAM and the cma_allocator path. HIGHMEM creates a low/high boundary at 0xb0000000 that CMA reservations spanning it can't satisfy — atomic_pool_init panics on boot.
Scope: cv300, v101, av200 still have CONFIG_HIGHMEM=y. cv200 and lower don't have the cma_allocator path so HIGHMEM is moot for them.
3. Kernel-side CMA fallback default pool
Goal: port the hi_cma.c fallback — when no mmz= cmdline zone is registered, synthesise one from dma_contiguous_default_area so OSAL allocators don't return NULL. Lets sysupgrade work without U-Boot bootargs surgery.
Scope: ev200 (V4), cv300 (V3), v101 (V3A), cv200 (V2) vendor kernel branches in OpenIPC/linux. cv500 already done. av100/cv100 have no hi_cma.c (they use the standalone mmz/ path).
4. CMA-default reserved-memory in DT (V3.5+ kernels)
Already in cv500 / dv300 mainline-port DTSI via firmware#2050.
Will need to land for any future *_neo variants of other families when they materialise (cv300_neo, v101_neo, etc.).
ev200 + av100 ship a set_allocator helper that calls into U-Boot env to derive the MMZ zone string. Only those two; cv500 doesn't have one and works without (uses osmem/totalmem env vars directly in load_hisilicon).
Probably not worth unifying — cv500 simpler model is fine.
Recommended PR order
The work is mostly per-platform and parallelisable. Suggested order — easiest first, biggest blast radius last:
hi3516cv300 — port hi_cma fallback + opensdk install (drop renames) + load_hisilicon → modprobe open_* + disable HIGHMEM. Closest analog to the cv500 work; well-tested userspace.
hi3519v101 — same shape, fewer sensors, smaller module set.
hi3516ev200 + hi3516ev300 — already have open_* naming; port hi_cma fallback into hisilicon-hi3516ev200 linux branch so first-boot after firmware update doesn't need bootargs change.
hi3516av100, hi3516cv100 — different allocator (standalone mmz/, no hi_cma.c). Just the load_hisilicon → modprobe open_* rewrite + opensdk install simplification. Lower priority; legacy hardware.
Per-PR shape
Each platform's PR series follows the same template (mirror of cv500):
OpenIPC/firmware PR A: hisilicon-opensdk.mk — drop open_*.ko → hi_*/<chip>_* rename loop in the per-family install block; install verbatim. (#2064 cv500 example.)
OpenIPC/firmware PR B: general/package/hisilicon-osdrv-<chip>/files/script/load_hisilicon — rewrite insert_* chains from insmod hi_X.ko → modprobe open_X. The remove_* side typically already uses open_* names (silent no-op pre-fix). Bundled in same PR as A.
Overview
Tracking the unification of the MMZ allocator selection, CMA reservation, and OSAL module-loading conventions across every HiSilicon / Goke platform supported by openhisilicon + OpenIPC/firmware. Companion to #58 (ISP) and #82 (sensors).
The
hi3516cv500family was just brought in line with thehi3516ev200/ev300reference shape — kernel-side CMA fallback, HIGHMEM disabled, 256 MiB CMA,open_*module naming,modprobedriven fromload_hisilicon. The same modernisation applies to the rest of the family tree, with a couple of legacy V1/V2A platforms that need a different (mmz/) approach.The pattern was established across these landed PRs:
hi_cma.cfallback: whenload_hisilicondoesn't pass anmmz=zone in cmdline, synthesise one fromdma_contiguous_default_area. Lets stock OpenIPC firmware with no U-Boot tweakssysupgradecleanly into the new world.open_hwrngearly so userspace getrandom() doesn't block.load_hisilicon: skip cmdlinemem=when it equals total RAM (V4+CMA).open_*); rewriteload_hisilicontomodprobe open_*.End-to-end verified on hi3516av300 + IMX415 (CV500 family) at master+101d778: 33
open_*modules loaded, IMX415 detected, RTSP/HTTP serve 4K JPEG snapshots.Per-platform state
Numbers from current
master(firmware) /upstream-patches+vendor branches (openipc/linux) /master(openhisilicon) on 2026-05-07.modprobe open_*(40)modprobe open_*(36)insmodlegacy (33)insmodlegacy (38)insmodlegacy (28)insmodlegacy (26)mmz/, no CMA pathinsmodlegacy (27)mmz/, no CMA pathinsmodlegacy (2)insmodlegacy (1)Counts: "modprobe open_*" / "insmod legacy" reflect the count of active (uncommented) module-loading lines in
general/package/hisilicon-osdrv-<chip>/files/script/load_hisilicon.What "unified" means per dimension
1. Module naming →
open_*everywherehisilicon-opensdk.mkinstalls verbatim from$(@D)/kernel/open_*.kointo$(KMOD_DST); no rename tohi_*/hi3516cv500_*/sys_config.ko. Matches what was done for cv500 in firmware#2064.modprobe open_X(the upstream convention) instead of legacyinsmod hi_X.kofilenames; thermmodside already usedopen_*names in many scripts and silently no-op'd because nothing matched.2. HIGHMEM disable + sized CMA reservation
# CONFIG_HIGHMEM is not set+CONFIG_CMA_SIZE_MBYTES=256in every*.generic.configfor boards with ≥ 256 MiB RAM and the cma_allocator path. HIGHMEM creates a low/high boundary at 0xb0000000 that CMA reservations spanning it can't satisfy —atomic_pool_initpanics on boot.CONFIG_HIGHMEM=y. cv200 and lower don't have the cma_allocator path so HIGHMEM is moot for them.3. Kernel-side CMA fallback default pool
hi_cma.cfallback — when nommz=cmdline zone is registered, synthesise one fromdma_contiguous_default_areaso OSAL allocators don't return NULL. Lets sysupgrade work without U-Boot bootargs surgery.hi_cma.c(they use the standalonemmz/path).4. CMA-default reserved-memory in DT (V3.5+ kernels)
*_neovariants of other families when they materialise (cv300_neo, v101_neo, etc.).5.
set_allocatorscript (boot-time MMZ size negotiation)set_allocatorhelper that calls into U-Boot env to derive the MMZ zone string. Only those two; cv500 doesn't have one and works without (usesosmem/totalmemenv vars directly inload_hisilicon).Recommended PR order
The work is mostly per-platform and parallelisable. Suggested order — easiest first, biggest blast radius last:
open_*naming; port hi_cma fallback intohisilicon-hi3516ev200linux branch so first-boot after firmware update doesn't need bootargs change.mmz/, nohi_cma.c). Just the load_hisilicon →modprobe open_*rewrite + opensdk install simplification. Lower priority; legacy hardware.Per-PR shape
Each platform's PR series follows the same template (mirror of cv500):
hi_cma_get_zone() fallbackpatch — single commit, ~40 LOC. (feat: add hi3516cv200 SoC family support #37 for cv500 as reference.)hisilicon-opensdk.mk— dropopen_*.ko → hi_*/<chip>_*rename loop in the per-family install block; install verbatim. (#2064 cv500 example.)general/package/hisilicon-osdrv-<chip>/files/script/load_hisilicon— rewriteinsert_*chains frominsmod hi_X.ko→modprobe open_X. Theremove_*side typically already usesopen_*names (silent no-op pre-fix). Bundled in same PR as A.CONFIG_CMA_SIZE_MBYTES. (#2067 cv500 example.)Sub-issue / sub-PR table
open_*Issues/PRs will be linked here as they're opened.
Out of scope (intentionally)
*_neovariants. cv500_neo is the reference; cv300/v101/cv100/av100 don't have neo builds yet.🤖 Generated with Claude Code